Skip to content

Fix: Update LogisticRegression solver and parameters for multiclass digits dataset #334

Open
FluffyBun12435 wants to merge 1 commit intocodebasics:masterfrom
FluffyBun12435:patch-1
Open

Fix: Update LogisticRegression solver and parameters for multiclass digits dataset #334
FluffyBun12435 wants to merge 1 commit intocodebasics:masterfrom
FluffyBun12435:patch-1

Conversation

@FluffyBun12435
Copy link

Hi codebasics Team,

I noticed that the current LogisticRegression implementation in this notebook throws a ValueError when using recent versions of scikit-learn with digits dataset.

The issue: The liblinear solver does not support multiclass classification directly (n_classes=10 for digits) in the latest sklearn.

The fix: I've updated the solver to lbfgs and removed the deprecated multi_class='auto' parameter to ensure compatibility with modern environments.

Thanks for your tutorial!
Screenshot 2026-03-22 112503
Screenshot 2026-03-22 113148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant