Cross-validation. The slope overfits when the test set is included from the data the model is fitted on.