class_docstr: Out-of-bag early stopping.
  
  A callable that returns True when the test error starts
  rising. We use a Spearman correlation (between X_test.w and y_test)
  for scoring.
class_docstr_tok: ["Out-of-bag","early","stopping",".","A","callable","that","returns","True","when","the","test","error","starts","rising",".","We","use","a","Spearman","correlation","(","between","X_test.w","and","y_test",")","for","scoring","."]
docstr: Debias w by rescaling the coefficients by a fixed factor.
  
  Precisely, the scaling factor is: <y_pred, y_test> / ||y_test||^2.
docstr_tok: ["Debias","w","by","rescaling","the","coefficients","by","a","fixed","factor",".","Precisely",",","the","scaling","factor","is",":","<","y_pred",",","y_test",">","\/","||y_test||^2","."]
code: def _debias(self, w):
      """Debias w by rescaling the coefficients by a fixed factor.
  
      Precisely, the scaling factor is: <y_pred, y_test> / ||y_test||^2.
      """
      y_pred = np.dot(self.X_test, w)
      scaling = np.dot(y_pred, y_pred)
      if scaling > 0.0:
          scaling = np.dot(y_pred, self.y_test) / scaling
          w *= scaling
      return w
  
imports: import collections
  import sys
  import time
  import warnings
  from functools import partial
  import numpy
  from joblib import Memory, Parallel, delayed
  from scipy import stats
  from scipy.ndimage import binary_dilation, binary_erosion, gaussian_filter
  from sklearn.feature_selection import SelectPercentile, f_classif, f_regression
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model._base import _preprocess_data
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import check_cv
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.utils import check_array, check_X_y
  from sklearn.utils.extmath import safe_sparse_dot
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn.experimental.surface import SurfaceMasker
  from nilearn.image import get_data
  from nilearn.masking import unmask_from_to_3d_array
  from .._utils import fill_doc
  from .._utils.cache_mixin import CacheMixin
  from .._utils.param_validation import adjust_screening_percentile
  from .space_net_solvers import graph_net_logistic, graph_net_squared_loss, tvl1_solver
label_desc: Use image node_id 3 for calling the _EarlyStoppingCallback obj's underlying member method code with example usage: obj._debias(w) and returns: w