# Path: orangecontrib/spark/base/spark_ml_estimator.py
# class OWSparkEstimator(OWSparkTransformer):
#     name = "Estimator"
#     description = "An Estimator of the Spark ml api"
#     icon = "icons/spark.png"
#     out_model = None
#     outputs = [("Model", Model, widget.Dynamic)]
# 
#     get_modules = get_estimators
# 
#     def apply(self):
#         method_instance = self.method()
#         paramMap = self.build_param_map(method_instance)
#         self.out_model = method_instance.fit(self.in_df, params = paramMap)
#         self.send("Model", self.out_model)
#         self.update_saved_gui_parameters()
#         self.hide()


from Orange.widgets import widget
from pyspark.ml import recommendation
from orangecontrib.spark.base.spark_ml_estimator import OWSparkEstimator
__author__ = 'jamh'




class OWSparkMLRecommendation(OWSparkEstimator, widget.OWWidget):
    priority = 4
    name = "Recommendation"
    description = "recommendation algorithms"
    icon = "../icons/Scattermap.svg"


# Path: orangecontrib/spark/base/spark_ml_estimator.py
# class OWSparkEstimator(OWSparkTransformer):
#     name = "Estimator"
#     description = "An Estimator of the Spark ml api"
#     icon = "icons/spark.png"
#     out_model = None
#     outputs = [("Model", Model, widget.Dynamic)]
# 
#     get_modules = get_estimators
# 
#     def apply(self):
#         method_instance = self.method()
#         paramMap = self.build_param_map(method_instance)
#         self.out_model = method_instance.fit(self.in_df, params = paramMap)
#         self.send("Model", self.out_model)
#         self.update_saved_gui_parameters()
#         self.hide()


# Path: orangecontrib/spark/widgets/ml/spark_ml_recommendation.py
from Orange.widgets import widget
from pyspark.ml import recommendation
from orangecontrib.spark.base.spark_ml_estimator import OWSparkEstimator

__author__ = 'jamh'




class OWSparkMLRecommendation(OWSparkEstimator, widget.OWWidget):
    priority = 4
    name = "Recommendation"
    description = "recommendation algorithms"
    icon = "../icons/Scattermap.svg"


    module = recommendation