# 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 regression
from orangecontrib.spark.base.spark_ml_estimator import OWSparkEstimator
__author__ = 'jamh'




class OWSparkMLRegression(OWSparkEstimator, widget.OWWidget):
    priority = 3
    name = "Regression"
    description = "regression algorithms"
    icon = "../icons/Regression.svg"

    module = regression

# 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_regression.py
from Orange.widgets import widget
from pyspark.ml import regression
from orangecontrib.spark.base.spark_ml_estimator import OWSparkEstimator

__author__ = 'jamh'




class OWSparkMLRegression(OWSparkEstimator, widget.OWWidget):
    priority = 3
    name = "Regression"
    description = "regression algorithms"
    icon = "../icons/Regression.svg"

    module = regression

    module_name = 'regression'