zkaoudi commented on code in PR #570:
URL: https://github.com/apache/incubator-wayang/pull/570#discussion_r2095230242
##########
python/src/pywy/basic/model/ops.py:
##########
@@ -221,6 +221,13 @@ def get_dType(self):
def inputs_required(self):
return 1
+class LogisticRegression(Op):
Review Comment:
Not sure that's the right place for this. Checkout this package:
from pywy.basic.model.models
##########
wayang-api/wayang-api-scala-java/src/main/scala/org/apache/wayang/api/DataQuanta.scala:
##########
@@ -105,6 +105,17 @@ class DataQuanta[Out: ClassTag](val operator:
ElementaryOperator, outputIndex: I
udfLoad: LoadProfileEstimator = null):
DataQuanta[NewOut] =
mapPartitionsJava(toSerializablePartitionFunction(udf), selectivity,
udfLoad)
+
+ def trainLogisticRegression(labels: DataQuanta[java.lang.Double],
fitIntercept: Boolean): DataQuanta[LogisticRegressionModel] = {
+ val operator = new LogisticRegressionOperator(fitIntercept)
+ this.connectTo(operator, 0)
+ labels.connectTo(operator, 1)
+ new DataQuanta[LogisticRegressionModel](operator)
Review Comment:
Why create a new DataQuanta and not just output the operator as it's done
for the other cases (see dlTrainingJava)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]