Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

logistic regression algorithm in python

# import the class
from sklearn.linear_model import LogisticRegression

# instantiate the model (using the default parameters)
logreg = LogisticRegression()

# fit the model with data
logreg.fit(X_train,y_train)

#
y_pred=logreg.predict(X_test)
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #logistic #regression #algorithm #python
ADD COMMENT
Topic
Name
1+9 =