This is an automated email from the ASF dual-hosted git repository.

yunyd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 084b476ce2 fix(op): add ML training operators for linear and logistic 
regression (#3779)
084b476ce2 is described below

commit 084b476ce221e0e740eec6bc946a719f0e12c2e9
Author: yunyad <[email protected]>
AuthorDate: Sun Sep 28 17:28:45 2025 -0700

    fix(op): add ML training operators for linear and logistic regression 
(#3779)
    
    Fix #3581
    
    This PR introduces ML training operators for common regression tasks:
    
    -  `SklearnTrainingLinearRegressionOpDesc` for linear regression
    -  `SklearnTrainingLogisticRegressionOpDesc` for logistic regression
    - `SklearnTrainingLogisticRegressionCVOpDesc` for cross-validated
    logistic regression
    
    These additions extend the training operator suite to support basic
    supervised learning using scikit-learn.
    
    ![Screen Recording 2025-09-28 at 5 05
    31 
PM](https://github.com/user-attachments/assets/06ea2fa7-7e51-4e40-b521-5eb54498ac54)
---
 .../edu/uci/ics/amber/operator/LogicalOp.scala     | 15 +++++++++++++
 .../SklearnTrainingLinearRegressionOpDesc.scala    | 25 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git 
a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/LogicalOp.scala
 
b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/LogicalOp.scala
index 8753861127..790e463898 100644
--- 
a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/LogicalOp.scala
+++ 
b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/LogicalOp.scala
@@ -76,7 +76,10 @@ import edu.uci.ics.amber.operator.sklearn.training.{
   SklearnTrainingGaussianNaiveBayesOpDesc,
   SklearnTrainingGradientBoostingOpDesc,
   SklearnTrainingKNNOpDesc,
+  SklearnTrainingLinearRegressionOpDesc,
   SklearnTrainingLinearSVMOpDesc,
+  SklearnTrainingLogisticRegressionCVOpDesc,
+  SklearnTrainingLogisticRegressionOpDesc,
   SklearnTrainingMultiLayerPerceptronOpDesc,
   SklearnTrainingMultinomialNaiveBayesOpDesc,
   SklearnTrainingNearestCentroidOpDesc,
@@ -335,6 +338,18 @@ trait StateTransferFunc
       value = classOf[SklearnTrainingDummyClassifierOpDesc],
       name = "SklearnTrainingDummyClassifier"
     ),
+    new Type(
+      value = classOf[SklearnTrainingLinearRegressionOpDesc],
+      name = "SklearnTrainingLinearRegression"
+    ),
+    new Type(
+      value = classOf[SklearnTrainingLogisticRegressionOpDesc],
+      name = "SklearnTrainingLogisticRegression"
+    ),
+    new Type(
+      value = classOf[SklearnTrainingLogisticRegressionCVOpDesc],
+      name = "SklearnTrainingLogisticRegressionCV"
+    ),
     new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = 
"SklearnLogisticRegression"),
     new Type(
       value = classOf[SklearnLogisticRegressionCVOpDesc],
diff --git 
a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sklearn/training/SklearnTrainingLinearRegressionOpDesc.scala
 
b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sklearn/training/SklearnTrainingLinearRegressionOpDesc.scala
new file mode 100644
index 0000000000..12d5eddb87
--- /dev/null
+++ 
b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sklearn/training/SklearnTrainingLinearRegressionOpDesc.scala
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package edu.uci.ics.amber.operator.sklearn.training
+
+class SklearnTrainingLinearRegressionOpDesc extends SklearnTrainingOpDesc {
+  override def getImportStatements = "from sklearn.linear_model import 
LinearRegression"
+  override def getUserFriendlyModelName = "Training: Linear Regression"
+}

Reply via email to