Github user mgrzenda commented on a diff in the pull request:
https://github.com/apache/incubator-samoa/pull/61#discussion_r125298088
--- 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;
+
+/**
--- End diff --
Class is reported in the prediction file we create as a class label (not as
a double) to avoid confusion. Hence, it is a String. Moreover, Samoa internally
occasionally reports shorter table of votes than the number of classes (when
remaining votes are zero). Hence, keeping explicit named vote object with
explicit class label/value of vote it refers to seemed to us to be safer than
relying on knowing that e.g. index 5 of the table is the value of votes for
third class. From a wider perspective, now that Kafka extension is ready,
similarly to saving accuracy of the methods, I believe both files will not be
created under extremely high load. Otherwise, in case high throughput is
expected, accuracy and prediction files should be produced in a stream manner
(similarly to what e.g. Spark does) i.e. as part* files. Hence, in the case of
this code (and other border case problems such as these) perhaps clarity to
performance could be preferred. To sum up, we suggest keeping current solu
tion based on Vote class (and not drop Vote class, which is what we understand
you suggested).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---