mars-project / mars-project/mars
Add support for LogisticRegression
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 325
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Implements LogisticRegression for Logistic Regression (aka logit, MaxEnt) classifier:
API Like:https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html
the param i need:
* **penalty** {‘l1’, ‘l2’, ‘elasticnet’, ‘none’}, default=’l2’
* Specify the norm of the penalty:
* **C** float, default=1.0
* Inverse of regularization strength; must be a positive float. Like in support vector machines, smaller values specify stronger regularization.
* **class_weight** dict or ‘balanced’, default=None
* Weights associated with classes in the form {class_label: weight}. If not given, all classes are supposed to have weight one.
* **solver** {‘newton-cg’, ‘lbfgs’, ‘liblinear’, ‘sag’, ‘saga’}, default=’lbfgs’
* Algorithm to use in the optimization problem. Default is ‘lbfgs’. To choose a solver, you might want to consider the following aspects:
* like:lbfgs, saga
* **multi_class** {‘auto’, ‘ovr’, ‘multinomial’}, default=’auto’
* If the option chosen is ‘ovr’, then a binary problem is fit for each label. For ‘multinomial’ the loss minimised is the multinomial loss fit across the entire probability distribution, even when the data is binary. ‘multinomial’ is unavailable when solver=’liblinear’. ‘auto’ selects ‘ovr’ if the data is binary, or if solver=’liblinear’, and otherwise selects ‘multinomial’.
* **l1_ratio** float, default=None
* The Elastic-Net mixing parameter, with 0 <= l1_ratio <= 1. Only used if penalty='elasticnet'. Setting l1_ratio=0 is equivalent to using penalty='l2', while setting l1_ratio=1 is equivalent to using penalty='l1'. For 0 < l1_ratio <1, the penalty is a combination of L1 and L2.
Contributor guide
Research direction
Start by reading the linked scikit-learn LogisticRegression API and its listed parameters. Then inspect Mars's existing scikit-learn or machine-learning estimator support to identify the appropriate entry points. Done means LogisticRegression supports the requested penalty, regularization, weighting, solver, multiclass, and elastic-net options with behavior aligned to the reference API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100