Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Predictions on test set

$
0
0
hi

I try to get the prediction of an instance but not possible my code is:

LinearRegression linear = new LinearRegression();
linear.buildClassifier(entrenamiento);

double pred = linear.classifyInstance(test.instance(0));
System.out.print("ID: " + test.instance(i).value(0));
System.out.print(", actual: " + test.classAttribute().value((int) test.instance(0).classValue()));
System.out.println(", predicted: " + test.classAttribute().value((int) pred));



I tested with weka and I get the perfect result:

=== Predictions on test set ===

inst# actual predicted error
1 ? 12 ?


thanks..

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>