class_docstr: Cholesky based Newton solver.
  
  Inner solver for finding the Newton step H w_newton = -g uses Cholesky based linear
  solver.
code: def setup(self, X, y, sample_weight):
      super().setup(X=X, y=y, sample_weight=sample_weight)
      n_dof = X.shape[1]
      if self.linear_loss.fit_intercept:
          n_dof += 1
      self.gradient = np.empty_like(self.coef)
      self.hessian = np.empty_like(self.coef, shape=(n_dof, n_dof))
  
imports: import warnings
  from abc import ABC, abstractmethod
  import numpy
  import scipy.linalg
  import scipy.optimize
  from ..._loss.loss import HalfSquaredError
  from ...exceptions import ConvergenceWarning
  from ...utils.optimize import _check_optimize_result
  from .._linear_loss import LinearModelLoss
label_desc: Use image node_id 1 for calling the NewtonCholeskySolver obj's underlying member method code with example usage: obj.setup(X, y, sample_weight) without return types