parameters: (est, y, i)
return_statement: return y_i, coef, intercept, average_coef, average_intercept
docstring: Initialization for fit_binary.
  
      Returns y, coef, intercept.
docstring_summary: Initialization for fit_binary.
docstring_tokens: Initialization for fit_binary .
function: def _prepare_fit_binary(est, y, i):
      """Initialization for fit_binary.
  
      Returns y, coef, intercept.
      """
      y_i = np.ones(y.shape, dtype=np.float64, order="C")
      y_i[y != est.classes_[i]] = -1.0
      average_intercept = 0
      average_coef = None
  
      if len(est.classes_) == 2:
          if not est.average:
              coef = est.coef_.ravel()
              intercept = est.intercept_[0]
          else:
              coef = est.standard_coef_.ravel()
              intercept = est.standard_intercept_[0]
              average_coef = est.average_coef_.ravel()
              average_intercept = est.average_intercept_[0]
      else:
          if not est.average:
              coef = est.coef_[i]
              intercept = est.intercept_[i]
          else:
              coef = est.standard_coef_[i]
              intercept = est.standard_intercept_[i]
              average_coef = est.average_coef_[i]
              average_intercept = est.average_intercept_[i]
  
      return y_i, coef, intercept, average_coef, average_intercept
function_tokens: def _prepare_fit_binary ( est , y , i ) : y_i = np . ones ( y . shape , dtype = np . float64 , order = "C" ) y_i [ y != est . classes_ [ i ] ] = - 1.0 average_intercept = 0 average_coef = None if len ( est . classes_ ) == 2 : if not est . average : coef = est . coef_ . ravel ( ) intercept = est . intercept_ [ 0 ] else : coef = est . standard_coef_ . ravel ( ) intercept = est . standard_intercept_ [ 0 ] average_coef = est . average_coef_ . ravel ( ) average_intercept = est . average_intercept_ [ 0 ] else : if not est . average : coef = est . coef_ [ i ] intercept = est . intercept_ [ i ] else : coef = est . standard_coef_ [ i ] intercept = est . standard_intercept_ [ i ] average_coef = est . average_coef_ [ i ] average_intercept = est . average_intercept_ [ i ] return y_i , coef , intercept , average_coef , average_intercept