Skip to content

Instantly share code, notes, and snippets.

@jamesrajendran
Created June 13, 2017 06:39
Show Gist options
  • Save jamesrajendran/5db1a280d0553f9ab49a68e81eace4e8 to your computer and use it in GitHub Desktop.
Save jamesrajendran/5db1a280d0553f9ab49a68e81eace4e8 to your computer and use it in GitHub Desktop.
LogisticRegression - Linear-model
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