Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
med:lab_5 [2018/05/12 23:23]
pszwed [Kod]
med:lab_5 [2018/05/12 23:24]
pszwed [Kod]
Line 104: Line 104:
 saver.writeBatch(); saver.writeBatch();
 </code> </code>
 +
 +5.4.2
 +<code java>
 +Classifier cls;
 +cls = new NaiveBayes();
 +
 +Evaluation eval = new Evaluation(data);
 +eval.crossValidateModel(cls, data, 10, new Random(1));
 +
 +eval.toSummaryString()
 +eval.confusionMatrix()
 +System.out.printf(Locale.US,
 +"[prec recall fmeasure]:\t%f\t%f\t%f\n",
 +eval.weightedPrecision(),
 +eval.weightedRecall(),
 +eval.weightedFMeasure());
 +
 +</code>
 +
 +
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0