Hello.
I understood the code given in the solution.
I had a similar code but surprisingly when I asked to print max and min, the values of the form 1e18 were not printed.
However if I just print the coefs_ (and not coefs.max()) I see in the arrays that values are here.
Do you have an explanation ? can you check if my code is correct ?
Thank you very much !
Geoffrey
Here’s my code :
model = Pipeline([("SimpleImputer", SimpleImputer()),
("StandardScaler", StandardScaler()),
("LinarRegression", LinearRegression())])
cv_res = cross_validate(model, data_numerical, target, cv=10,
return_estimator=True)
estimators = cv_res['estimator']
for estimator in estimators:
print(estimator["LinarRegression"].coef_.max())
print(estimator["LinarRegression"].coef_.min())