How do we get the baseline of each fold in cross-validation?
I think you look for: sklearn.model_selection.cross_validate, see the docs here:


  Returns:
  scores : dict of float arrays of shape=(n_splits,) 
  Array of scores of the estimator for each run of the cross validation. 
  A dict of arrays containing the score/time arrays for each scorer is
  returned. The possible keys for this dict are:
  
  test_score The score array for test scores on each cv split.
  
  train_score The score array for train scores on each cv split. 
  [...]




Minimal example:

from sklearn import datasets, linear_model
from sklearn.model_selection import cross_validate

# Data
diabetes = datasets.load_diabetes()
X = diabetes.data[:150]
y = diabetes.target[:150]

# Model
lasso = linear_model.Lasso()
cv_results = cross_validate(lasso, X, y, cv=10)

# Print keys
print(sorted(cv_results.keys()))
# Print test_scores
print(cv_results['test_score'])


Returns:

['fit_time', 'score_time', 'test_score', 'train_score']
[ 0.34557351  0.34848715  0.26654262 -0.01126674  0.24875619  0.08731544
  0.13386583  0.14000888  0.2873109   0.00960079]