Created
June 13, 2017 06:39
-
-
Save jamesrajendran/5db1a280d0553f9ab49a68e81eace4e8 to your computer and use it in GitHub Desktop.
LogisticRegression - Linear-model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.datasets import load_iris | |
from sklearn.linear_model import LogisticRegression | |
iris = load_iris() | |
X = iris.data | |
y = iris.target | |
logreg = LogisticRegression() | |
logreg.fit(X,y) | |
logreg.predict(X[0]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment