Hi, for The logistic regression model in (Building a Machine Learning Model with Python) shouldn’t the coef be multiplied by the x component → which in this case would be purchase and not min_on_site??
This is copied from and referring to the guide in the passage portion and it pertains to the way to set up Q1 too.
from sklearn.linear_model import LogisticRegressionmodel = LogisticRegression()model.fit(purchase, min_on_site)
Next, just like linear regression, we can use the right-hand side of our regression equation to make predictions for each of our original datapoints as follows:
log_odds = model.intercept_ + model.coef_ * min_on_site
print(log_odds)