quintinali commented on a change in pull request #31: SDAP-118 create a new
ranking module
URL:
https://github.com/apache/incubator-sdap-mudrod/pull/31#discussion_r199642631
##########
File path:
ranking/src/main/java/org/apache/sdap/mudrod/ranking/common/LearnerFactory.java
##########
@@ -11,47 +11,44 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sdap.mudrod.ssearch.ranking;
+package org.apache.sdap.mudrod.ranking.common;
+import org.apache.sdap.mudrod.discoveryengine.MudrodAbstract;
+import org.apache.sdap.mudrod.driver.ESDriver;
import org.apache.sdap.mudrod.driver.SparkDriver;
+import org.apache.sdap.mudrod.main.MudrodConstants;
+import org.apache.sdap.mudrod.ranking.ranksvm.SVMLearner;
import org.apache.spark.SparkContext;
import org.apache.spark.mllib.classification.SVMModel;
import org.apache.spark.mllib.regression.LabeledPoint;
import java.io.Serializable;
+import java.util.Properties;
/**
* Supports the ability to importing classifier into memory
*/
-public class Learner implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- SVMModel model = null;
- transient SparkContext sc = null;
+public class LearnerFactory extends MudrodAbstract {
Review comment:
To create a SVMLearner, the LearnerFactory should pass props, spark and es
to its construction function, so I extend LearnerFactory from MudrodAbstract.
Do you have any suggestion?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services