[
https://issues.apache.org/jira/browse/SAMOA-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16072488#comment-16072488
]
ASF GitHub Bot commented on SAMOA-68:
-------------------------------------
Github user mgrzenda commented on a diff in the pull request:
https://github.com/apache/incubator-samoa/pull/61#discussion_r125297279
--- Diff:
samoa-api/src/main/java/org/apache/samoa/evaluation/EvaluatorProcessor.java ---
@@ -179,6 +211,28 @@ private void addMeasurement() {
}
}
+ /**
+ * This method is used to create one line of a text file containing
predictions and votes (for classification only).
+ * In case, this is the first line a header line is also added
+ */
+ private void addVote() {
+ List<Vote> votes = new Vector<>();
+ Collections.addAll(votes, evaluator.getPredictionVotes());
+ Vote[] finalVotes = votes.toArray(new Vote[votes.size()]);
+ learningCurve.setVote(finalVotes);
+ logger.debug("evaluator id = {}", this.id);
+
--- End diff --
The important role of Vote-related methods in LearningCurve is to ensure
that Vote objects are placed every time in the same sequence (which is done by
setVote()). This is important to ensure that individual columns are printed in
every line of prediction file in the same sequence. Hence, we suggest to keep
the current solution, which uses learningCurve. The addVoteName() method is
consistent with addMeasurementName() used for the same reason for measurements.
> Saving true and predicted labels to file
> ----------------------------------------
>
> Key: SAMOA-68
> URL: https://issues.apache.org/jira/browse/SAMOA-68
> Project: SAMOA
> Issue Type: New Feature
> Components: SAMOA-API
> Reporter: Maciej Grzenda
> Labels: features
>
> Currently PrequentialEvaluation task supports dumpFile option. With this
> option model performance can be saved to a file. However, in some cases it
> would be good to save also individual predictions made by a model. This is
> useful for model debugging and method development.
> This could be also used to visualize model output, calculate custom
> performance indicators (e.g. model accuracy for instances of a certain class
> or sharing the same feature value). Such saving of model output (if done)
> should be made for every instance. Hence, a new option making it possible to
> dump predictions to a separate file seems justified. For classification, it
> should include votes made for individual classes, if available.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)