multi_class that used on tutorial has been deprecated on sklearn 1.5 version

Open Beginner friendly
#1,059 1 comment 0 reactions 0 assignees View on GitHub

@IridiumNan is already working on this.

Since Nov 1, 2026.

  • #1060 by @IridiumNan — open

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

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.

Image

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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/ML-For-Beginners

All issues in microsoft/ML-For-Beginners

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.