class_docstr: SelectBySingleFeaturePerformance() selects features based on the performance
  of a machine learning model trained utilising a single feature. In other
  words, it trains a machine learning model for every single feature, then determines
  each model's performance. If the performance of the model is greater than a user
  specified threshold, then the feature is retained, otherwise removed.
  
  The models are trained on each individual features using cross-validation.
  The performance metric to evaluate and the machine learning model to train are
  specified by the user.
  
  More details in the :ref:`User Guide <single_feat_performance>`.
  
  Parameters
  ----------
  {estimator}
  
  {variables}
  
  {scoring}
  
  {threshold}
  
  {cv}
  
  {confirm_variables}
  
  Attributes
  ----------
  {features_to_drop_}
  
  feature_performance_:
      Dictionary with the single feature model performance per feature.
  
  {variables_}
  
  {feature_names_in_}
  
  {n_features_in_}
  
  
  Methods
  -------
  {fit}
  
  {fit_transform}
  
  {get_support}
  
  {transform}
  
  References
  ----------
  Selection based on single feature performance was used in Credit Risk modelling as
  discussed in the following talk at PyData London 2017:
  
  .. [1] Galli S. "Machine Learning in Financial Risk Assessment".
      https://www.youtube.com/watch?v=KHGGlozsRtA
class_docstr_tok: ["SelectBySingleFeaturePerformance","(",")","selects","features","based","on","the","performance","of","a","machine","learning","model","trained","utilising","a","single","feature",".","In","other","words",",","it","trains","a","machine","learning","model","for","every","single","feature",",","then","determines","each","model","'s","performance",".","If","the","performance","of","the","model","is","greater","than","a","user","specified","threshold",",","then","the","feature","is","retained",",","otherwise","removed",".","The","models","are","trained","on","each","individual","features","using","cross-validation",".","The","performance","metric","to","evaluate","and","the","machine","learning","model","to","train","are","specified","by","the","user",".","More","details","in","the",":","ref",":","`","User","Guide","<","single_feat_performance",">","`",".","Parameters","--","--","--","--","--","{","estimator","}","{","variables","}","{","scoring","}","{","threshold","}","{","cv","}","{","confirm_variables","}","Attributes","--","--","--","--","--","{","features_to_drop_","}","feature_performance_",":","Dictionary","with","the","single","feature","model","performance","per","feature",".","{","variables_","}","{","feature_names_in_","}","{","n_features_in_","}","Methods","--","--","--","-","{","fit","}","{","fit_transform","}","{","get_support","}","{","transform","}","References","--","--","--","--","--","Selection","based","on","single","feature","performance","was","used","in","Credit","Risk","modelling","as","discussed","in","the","following","talk","at","PyData","London","2017",":","..","[","1","]","Galli","S.","``","Machine","Learning","in","Financial","Risk","Assessment","''",".","https",":","\/\/www.youtube.com\/watch","?","v=KHGGlozsRtA"]
code: def __init__(
      self,
      estimator,
      scoring: str = "roc_auc",
      cv=3,
      threshold: Union[int, float, None] = None,
      variables: Variables = None,
      confirm_variables: bool = False,
  ):
      if threshold:
          if not isinstance(threshold, (int, float)):
              raise ValueError(
                  "threshold can only be integer, float or None"
              )
  
          if scoring == "roc_auc" and (
              threshold < 0.5 or threshold > 1
          ):
              raise ValueError(
                  "roc-auc score should vary between 0.5 and 1. Pick a "
                  "threshold within this interval."
              )
  
          if scoring == "r2" and (threshold < 0 or threshold > 1):
              raise ValueError(
                  "r2 takes values between -1 and 1. To select features the "
                  "transformer considers the absolute value. Pick a threshold within "
                  "0 and 1."
              )
  
      super().__init__(confirm_variables)
      self.variables = _check_init_parameter_variables(variables)
      self.estimator = estimator
      self.scoring = scoring
      self.threshold = threshold
      self.cv = cv
  
file_path: feature_engine/feature_engine/selection/single_feature_performance.py
imports: import warnings
  from typing import List, Union
  import pandas
  from sklearn.model_selection import cross_validate
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring
  from feature_engine._docstrings.methods import _fit_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine._variable_handling.variable_type_selection import _find_or_check_numerical_variables
  from feature_engine.dataframe_checks import check_X_y
  from feature_engine.selection._docstring import _cv_docstring, _estimator_docstring, _features_to_drop_docstring, _fit_docstring, _get_support_docstring, _initial_model_performance_docstring, _scoring_docstring, _threshold_docstring, _transform_docstring, _variables_attribute_docstring, _variables_numerical_docstring
  from feature_engine.selection.base_selector import BaseSelector
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 to create a new SelectBySingleFeaturePerformance object from inherited base classes: BaseSelector with example: obj = SelectBySingleFeaturePerformance(estimator, scoring, cv, threshold, variables, confirm_variables)