Repository navigation
Introduce Sklearn ML models - #2641
Merged
Merged
Conversation
Yicong-Huang
requested changes
May 4, 2024
Yicong-Huang
left a comment
Contributor
There was a problem hiding this comment.
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.
Yicong-Huang
approved these changes
May 5, 2024
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">
2 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the Sklearn base operator class and the following ML operators from the Sklearn library :
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.
Usage:
The ML models produced by the ML operators can be used in downstream Python UDF by calling the
predictmethod:The ML models can also be used with the Prediction Operator: