[ 
https://issues.apache.org/jira/browse/SDAP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528239#comment-16528239
 ] 

ASF GitHub Bot commented on SDAP-118:
-------------------------------------

lewismc 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_r199276659
 
 

 ##########
 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 {
 
-  /**
-   * Constructor to load in spark SVM classifier
-   *
-   * @param classifierName classifier type
-   * @param skd            an instance of spark driver
-   * @param svmSgdModel    path to a trained model
-   */
-  public Learner(SparkDriver skd, String svmSgdModel) {
-      sc = skd.sc.sc();
-      sc.addFile(svmSgdModel, true);
-      model = SVMModel.load(sc, svmSgdModel);
-  }
+  public LearnerFactory(Properties props, ESDriver es, SparkDriver spark) {
+               super(props, es, spark);
+               // TODO Auto-generated constructor stub
 
 Review comment:
   Remove TODO

----------------------------------------------------------------
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]


> create a ranking module
> -----------------------
>
>                 Key: SDAP-118
>                 URL: https://issues.apache.org/jira/browse/SDAP-118
>             Project: Apache Science Data Analytics Platform
>          Issue Type: Sub-task
>          Components: mudrod
>    Affects Versions: 1.0
>            Reporter: Yun Li
>            Assignee: Yun Li
>            Priority: Major
>             Fix For: 1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to