Loading topic
fit and predict. It also assumes you know what overfitting is and can read accuracy as a metric. The previous chapter explained that training-set performance is optimistic. This chapter covers the simplest fix, the holdout split, an6 min readfit and predict, and that you understand overfitting and accuracy. It also assumes you have seen the holdout split from the previous chapter. Here you will learn the k-fold procedure, how scikit-learn builds the f6 min readfit/predict API, and basic classification metrics such as accuracy. It covers why ordinary k-fold can mislead on classification data, how stratification fixes that, and where stratification stops helping.6 min readcross_val_score and read its output, and that you know scikit-learn's fit, transform, and predict methods. It also assumes you are comfortable with NumPy arrays and basic pandas.5 min readcross_val_score, and scikit-learn pipelines from the earlier chapters. You should also be comfortable with NumPy indexing. Here you will learn when ordinary k-fold gives misleadingly high scores, and how to fix that with group-aware splitting.6 min readfit/predict API. It covers what changes when your rows have a time order, and how to split them so the score still means something.6 min readPipeline, and how cross_val_score reports fold scores. Here you will use cross-validation to choose hyperparameters, and you will see where that choice can mislead you.6 min readcross_val_score in scikit-learn. It also assumes you know the bias and variance trade-off for choosing k. Leave-one-out and leave-p-out are the extreme end of that trade-off: the number of folds grows until each test se6 min readPipeline, and you have used GridSearchCV. The previous chapter covered tuning hyperparameters with cross-validation. Here you will see why the score that tuning reports is too optimistic, and how n7 min readcross_val_score, and that you know k-fold, stratified and grouped splitting, pipelines, and nested cross-validation from the earlier chapters. Cross-validation is a good estimator, but it is not a guarantee. This chapter covers what it cannot tell you, and the mist6 min read