Skip to content

[MRG] Example for multioutput.RegressorChain#15215

Closed
timnon wants to merge 1 commit intoscikit-learn:masterfrom
timnon:i3846-example-for-multioutput-regressorchain
Closed

[MRG] Example for multioutput.RegressorChain#15215
timnon wants to merge 1 commit intoscikit-learn:masterfrom
timnon:i3846-example-for-multioutput-regressorchain

Conversation

@timnon
Copy link
Copy Markdown
Contributor

@timnon timnon commented Oct 12, 2019

Reference Issues/PRs

Issue #3846

What does this implement/fix? Explain your changes.

Example for multioutput.RegressorChain

Any other comments?

The naming of this class is wrong, it should be MultiLabelClassifierChain, it is not a regression but a multi-label classification

@timnon timnon changed the title example for multioutput.RegressorChain [MRG] Example for multioutput.RegressorChain Oct 12, 2019
@Malesche
Copy link
Copy Markdown
Contributor

@adrinjalali open

Copy link
Copy Markdown
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @timnon

wasn't there another PR adding an example to this class @Malesche ?

>>> from sklearn.multioutput import RegressorChain
>>> from sklearn.linear_model import LogisticRegression
>>> logreg = LogisticRegression(solver='lbfgs',multi_class='multinomial')
>>> X, Y = [[1,0],[0,1],[1,1]], [[0,2],[1,1],[2,0]]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>>> X, Y = [[1,0],[0,1],[1,1]], [[0,2],[1,1],[2,0]]
>>> X, Y = [[1, 0], [0, 1], [1, 1]], [[0, 2], [1, 1], [2, 0]]

>>> from sklearn.linear_model import LogisticRegression
>>> logreg = LogisticRegression(solver='lbfgs',multi_class='multinomial')
>>> X, Y = [[1,0],[0,1],[1,1]], [[0,2],[1,1],[2,0]]
>>> chain = RegressorChain(base_estimator=logreg,order=[0,1]).fit(X,Y)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>>> chain = RegressorChain(base_estimator=logreg,order=[0,1]).fit(X,Y)
>>> chain = RegressorChain(base_estimator=logreg, order=[0, 1]).fit(X, Y)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adrinjalali no, I don't think so

@Malesche Malesche mentioned this pull request Mar 6, 2020
23 tasks
@marenwestermann
Copy link
Copy Markdown
Member

@timnon do you plan to continue working on this PR?

@marenwestermann
Copy link
Copy Markdown
Member

take

@LeandroLuque
Copy link
Copy Markdown

take

@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented Jun 17, 2020

Thanks @timnon for your work. I'm closing this one as #17498 has been merged in the meanwhile.

@cmarmo cmarmo closed this Jun 17, 2020
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.

6 participants