multi_class that used on tutorial has been deprecated on sklearn 1.5 version
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- jupyter-notebook, python, scikit-learn
- Domain
- documentation, machine-learning
Research direction
The deprecated call is LogisticRegression(multi_class="ovr", solver="liblinear") in the 4-Classification lesson notebook under the 2-Classification-1 folder. Search the repository for multi_class to find every tutorial that uses it, then replace it with a supported form such as OneVsRestClassifier(LogisticRegression(solver="liblinear")). Done means the notebook runs on scikit-learn 1.5 without a TypeError and the explanatory text matches the new code.
Written by the indexing model from the issue text.
Description
On the 4-Classification/2-Classfication-1 tutorial. It try to build a new model with a deprecated parameter.
lr = LogisticRegression(multi_class="ovr", solver="liblinear")
model = lr.fit(X_train, np.ravel(y_test))
I tried it and TypeError (my python version is 3.13, conda virtual environment)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[14], line 2
1 help(LogisticRegression)
----> 2 lr = LogisticRegression(multi_class="ovr", solver="liblinear")
3 model = lr.fit(X_train, np.ravel(y_test))
4 # the ravel function flatten data
5 accuracy = model.score(X_test, y_test)
TypeError: LogisticRegression.__init__() got an unexpected keyword argument 'multi_class'
So I ask AI about the official documents. And It return this sklearn document link
It notes that this multi_class has been deprecated.
So that tutorial update for this is required.
- Dominant language
- Jupyter Notebook
- Stars
- 91.9k
- Forks
- 22.8k
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/ML-For-Beginners
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/ML-For-Beginners#1061 ·
-
Regression/3-Linear/ polynomial regression example link out of datePossibly taken @kossayokazi claimed this 4 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
microsoft/ML-For-Beginners#1056 · 1 comment ·
-
Classification lessons apply SMOTE before train_test_split, so the test set contains synthetic samplesPossibly taken @kossayokazi claimed this 4 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
microsoft/ML-For-Beginners#1055 · 2 comments ·
-
27Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
microsoft/ML-For-Beginners#1044 · 1 comment ·
-
15Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
microsoft/ML-For-Beginners#1043 ·
All issues in microsoft/ML-For-Beginners
Similar issues
-
agent-ready priority: medium status: ready work-class: scoped
Difficulty 1/5 Under an hour Newbie friendliness 75/100
melodic-software/claude-code-plugins#12762 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
DataTalksClub/faq#545 ·
Maintainers usually reply within 2 days
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
labmonkeys-space/nl6#974 ·
Maintainers usually reply within 1 day
-
Backend-Seatbelt Issue-Docs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day