Model Validation in Python
Kasey Jones
Data Scientist
Use when:
Be cautious when:
n = X.shape[0]
mse = make_scorer(mean_squared_error)
cv_results = cross_val_score(estimator, X, y, scoring=mse, cv=n)
print(cv_results)
[5.45, 10.52, 6.23, 1.98, 11.27, 9.21, 4.65, ... ]
print(cv_results.mean())
6.32
Model Validation in Python