Skip to content

Introduce Sklearn ML models - #2641

Merged
aglinxinyuan merged 36 commits into
masterfrom
xinyuan-sk-ml
May 5, 2024
Merged

aglinxinyuan merged 36 commits into
masterfrom
xinyuan-sk-ml

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented May 2, 2024 •

Copy link
Copy Markdown
Contributor

This PR introduces the Sklearn base operator class and the following ML operators from the Sklearn library :

  1. Logistic Regression
  2. Logistic Regression Cross Validation
  3. Ridge Regression
  4. Ridge Regression Cross Validation
  5. Stochastic Gradient Descent
  6. Passive Aggressive
  7. Linear Perceptron
  8. K-nearest Neighbors
  9. Nearest Centroid
  10. Support Vector Machine
  11. Linear Support Vector Machine
  12. Decision Tree
  13. Extra Tree
  14. Multi-layer Perceptron
  15. Probability Calibration
  16. Gradient Boosting
  17. Adaptive Boosting
  18. Random Forest
  19. Bagging
  20. ExtraTrees
  21. Gaussian Naive Bayes
  22. Multinomial Naive Bayes
  23. Complement Naive Bayes
  24. Bernoulli Naive Bayes
  25. Dummy Classifier

Each ML model operator will take the training and testing datasets as inputs and produce the ML model name, accuracy, and model itself as the output.

The ML operators offer a user-friendly interface, allowing you to select the target Y value and view the accuracy on the console. This control enhances your experience and understanding of the ML process.

Screenshot 2024-05-02 at 12 42 13 AM

Usage:

  1. The ML models produced by the ML operators can be used in downstream Python UDF by calling the predict method: Screenshot 2024-05-02 at 7 04 33 PM

  2. The ML models can also be used with the Prediction Operator: Screenshot 2024-05-03 at 12 27 01 AM

@aglinxinyuan
aglinxinyuan requested a review from Yicong-Huang May 2, 2024 07:13
@aglinxinyuan aglinxinyuan self-assigned this May 3, 2024

@Yicong-Huang Yicong-Huang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the awesome PR! It is important to make this PR very clean and useful. I left some comments, please take care of them.

@aglinxinyuan
aglinxinyuan requested a review from Yicong-Huang May 4, 2024 23:02

@Yicong-Huang Yicong-Huang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aglinxinyuan
aglinxinyuan merged commit 7d30341 into master May 5, 2024
@aglinxinyuan
aglinxinyuan deleted the xinyuan-sk-ml branch May 5, 2024 08:31
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR introduces the Sklearn base operator class and the following ML
operators from the Sklearn library :

1. [Logistic
Regression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html)
2. [Logistic Regression Cross
Validation](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegressionCV.html)
3. [Ridge
Regression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Ridge.html)
4. [Ridge Regression Cross
Validation](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.RidgeCV.html)
5. [Stochastic Gradient
Descent](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html)
6. [Passive
Aggressive](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.PassiveAggressiveClassifier.html)
7. [Linear
Perceptron](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Perceptron.html)
8. [K-nearest
Neighbors](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html)
9. [Nearest
Centroid](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestCentroid.html)
10. [Support Vector
Machine](https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html)
11. [Linear Support Vector
Machine](https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html)
12. [Decision
Tree](https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html)
13. [Extra
Tree](https://scikit-learn.org/stable/modules/generated/sklearn.tree.ExtraTreeClassifier.html)
14. [Multi-layer
Perceptron](https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html)
15. [Probability
Calibration](https://scikit-learn.org/stable/modules/generated/sklearn.calibration.CalibratedClassifierCV.html)
16. [Gradient
Boosting](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html)
17. [Adaptive
Boosting](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostClassifier.html)
18. [Random
Forest](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html)
19.
[Bagging](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.BaggingClassifier.html)
20.
[ExtraTrees](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesClassifier.html)
21. [Gaussian Naive
Bayes](https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html)
22. [Multinomial Naive
Bayes](https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.MultinomialNB.html)
23. [Complement Naive
Bayes](https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.ComplementNB.html)
24. [Bernoulli Naive
Bayes](https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.BernoulliNB.html)
25. [Dummy
Classifier](https://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html)

Each ML model operator will take the training and testing datasets as
inputs and produce the ML model name, accuracy, and model itself as the
output.

The ML operators offer a user-friendly interface, allowing you to select
the target Y value and view the accuracy on the console. This control
enhances your experience and understanding of the ML process.

<img width="883" alt="Screenshot 2024-05-02 at 12 42 13 AM"
src="https://github.com/Texera/texera/assets/11544314/14640e51-c822-4a22-ba62-b428645fbc02">

### Usage:

1. The ML models produced by the ML operators can be used in downstream
Python UDF by calling the `predict` method: <img width="974"
alt="Screenshot 2024-05-02 at 7 04 33 PM"
src="https://github.com/Texera/texera/assets/11544314/854bb6bf-55bc-4327-b877-cf0e7a489eca">

2. The ML models can also be used with the Prediction Operator: <img
width="652" alt="Screenshot 2024-05-03 at 12 27 01 AM"
src="https://github.com/Texera/texera/assets/11544314/57366cad-6641-4a37-bc71-c6892959f32e">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants