class_docstr: Meta-transformer for selecting categorical features and transform them using OneHotEncoder.
  
  Parameters
  ----------
  
  threshold : int, default=10
      Maximum number of unique values per feature to consider the feature
      to be categorical.
  
  minimum_fraction: float, default=None
      Minimum fraction of unique values in a feature to consider the feature
      to be categorical.
class_docstr_tok: ["Meta-transformer","for","selecting","categorical","features","and","transform","them","using","OneHotEncoder",".","Parameters","--","--","--","--","--","threshold",":","int",",","default=10","Maximum","number","of","unique","values","per","feature","to","consider","the","feature","to","be","categorical",".","minimum_fraction",":","float",",","default=None","Minimum","fraction","of","unique","values","in","a","feature","to","consider","the","feature","to","be","categorical","."]
docstr: Select categorical features and transform them using OneHotEncoder.
  
  Parameters
  ----------
  X: numpy ndarray, {n_samples, n_components}
      New data, where n_samples is the number of samples and n_components is the number of components.
  
  Returns
  -------
  array-like, {n_samples, n_components}
docstr_tok: ["Select","categorical","features","and","transform","them","using","OneHotEncoder",".","Parameters","--","--","--","--","--","X",":","numpy","ndarray",",","{","n_samples",",","n_components","}","New","data",",","where","n_samples","is","the","number","of","samples","and","n_components","is","the","number","of","components",".","Returns","--","--","--","-","array-like",",","{","n_samples",",","n_components","}"]
code: def transform(self, X):
      """Select categorical features and transform them using OneHotEncoder.
  
      Parameters
      ----------
      X: numpy ndarray, {n_samples, n_components}
          New data, where n_samples is the number of samples and n_components is the number of components.
  
      Returns
      -------
      array-like, {n_samples, n_components}
      """
      selected = auto_select_categorical_features(
          X, threshold=self.threshold
      )
      X_sel, _, n_selected, _ = _X_selected(X, selected)
  
      if n_selected == 0:
          # No features selected.
          raise ValueError("No categorical feature was found!")
      else:
          ohe = OneHotEncoder(
              categorical_features="all",
              sparse=False,
              minimum_fraction=self.minimum_fraction,
          )
          return ohe.fit_transform(X_sel)
  
file_path: tpot/tpot/builtins/feature_transformers.py
imports: import numpy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils import check_array
  from sklearn.decomposition import PCA
  from .one_hot_encoder import OneHotEncoder, auto_select_categorical_features, _X_selected
label_desc: Use image node_id 3 for calling the CategoricalSelector obj's underlying member method code with example usage: obj.transform(X) and returns: ohe