mirror of https://github.com/01-edu/Branch-AI.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
491 B
491 B
Exercise 1 Logistic regression in Scikit-learn
The goal of this exercise is to learn to use Scikit-learn to classify data.
X = [[0],[0.1],[0.2], [1],[1.1],[1.2], [1.3]]
y = [0,0,0,1,1,1,0]
-
Fit a Logistic regression on X and y.
-
Predict the class for
x_pred = [[0.5]]
. -
Predict the probabilities for
x_pred = [[0.5]]
usingpredict_proba
. -
Print the coefficients (
coef_
), the intercept (intercept_
) and the score of the logistic regression of X and y.