class_docstr: Automated Machine Learning for supervised tasks (binary classification, multiclass classification, regression).
class_docstr_tok: ["Automated","Machine","Learning","for","supervised","tasks","(","binary","classification",",","multiclass","classification",",","regression",")","."]
docstr: Decides about model retraining based on new data.
  
  Arguments:
      X (numpy.ndarray or pandas.DataFrame):
          New data.
  
      y (numpy.ndarray or pandas.Series):
          True labels for X.
  
      sample_weight (numpy.ndarray or pandas.Series):
          Sample weights.
  
      decrease (float): The ratio of change in the performance used as a threshold for retraining decision.
          By default, it is set to `0.1` which means that if the performance of AutoML will decrease by 10%
          on new data then there is a need to retrain. This value should be set depending on your project needs.
          Sometimes, 10% is enough, but for some projects, it can be even lower than 1%.
  
      Returns:
          boolean: Decides if there is a need to retrain the AutoML.
docstr_tok: ["Decides","about","model","retraining","based","on","new","data",".","Arguments",":","X","(","numpy.ndarray","or","pandas.DataFrame",")",":","New","data",".","y","(","numpy.ndarray","or","pandas.Series",")",":","True","labels","for","X.","sample_weight","(","numpy.ndarray","or","pandas.Series",")",":","Sample","weights",".","decrease","(","float",")",":","The","ratio","of","change","in","the","performance","used","as","a","threshold","for","retraining","decision",".","By","default",",","it","is","set","to","`","0.1","`","which","means","that","if","the","performance","of","AutoML","will","decrease","by","10","%","on","new","data","then","there","is","a","need","to","retrain",".","This","value","should","be","set","depending","on","your","project","needs",".","Sometimes",",","10","%","is","enough",",","but","for","some","projects",",","it","can","be","even","lower","than","1","%",".","Returns",":","boolean",":","Decides","if","there","is","a","need","to","retrain","the","AutoML","."]
code: def need_retrain(
      self,
      X: Union[numpy.ndarray, pandas.DataFrame],
      y: Union[numpy.ndarray, pandas.Series],
      sample_weight: Optional[
          Union[numpy.ndarray, pandas.Series]
      ] = None,
      decrease: float = 0.1,
  ) -> bool:
      """Decides about model retraining based on new data.
  
      Arguments:
          X (numpy.ndarray or pandas.DataFrame):
              New data.
  
          y (numpy.ndarray or pandas.Series):
              True labels for X.
  
          sample_weight (numpy.ndarray or pandas.Series):
              Sample weights.
  
          decrease (float): The ratio of change in the performance used as a threshold for retraining decision.
              By default, it is set to `0.1` which means that if the performance of AutoML will decrease by 10%
              on new data then there is a need to retrain. This value should be set depending on your project needs.
              Sometimes, 10% is enough, but for some projects, it can be even lower than 1%.
  
          Returns:
              boolean: Decides if there is a need to retrain the AutoML.
      """
      return self._need_retrain(X, y, sample_weight, decrease)
  
imports: import logging
  import matplotlib
  import warnings
  from collections.abc import Iterable
  from re import U
  from typing import List, Optional, Union
  import numpy
  import pandas
  from typing_extensions import Literal
  from supervised.base_automl import BaseAutoML
  from supervised.utils.config import LOG_LEVEL
label_desc: Use image node_id 8 for calling the AutoML obj's underlying member method code with example usage: obj.need_retrain(X, y, sample_weight, decrease) and returns: self