[
https://issues.apache.org/jira/browse/SAMOA-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059473#comment-16059473
]
ASF GitHub Bot commented on SAMOA-68:
-------------------------------------
Github user gdfm commented on a diff in the pull request:
https://github.com/apache/incubator-samoa/pull/61#discussion_r123517484
--- Diff: samoa-api/src/main/java/org/apache/samoa/moa/core/Vote.java ---
@@ -0,0 +1,90 @@
+package org.apache.samoa.moa.core;
+
+/*
+ * #%L
+ * SAMOA
+ * %%
+ * Copyright (C) 2014 - 2015 Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.samoa.moa.AbstractMOAObject;
+
+/**
+ * Class for storing votes.
+ *
+ * @author Maciej Grzenda ([email protected])
+ * @author Jerzy Jegier ([email protected])
+ *
+ */
+public class Vote extends AbstractMOAObject {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String name;
+ protected String value;
+ // protected int fractionDigits;
+
+ public Vote(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public Vote(String name, double value) {
+ this(name, value, 3);
+ }
+
+ public Vote(String name, double value, int fractionDigits) {
+ this(name, Double.toString(value));
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public static Vote getVoteNamed(String name,
--- End diff --
I think this method is not used, and it would be more efficient to use a
map anyway.
Can it be removed?
> 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)