class_docstr: Class for checking types in input data. Also perform conversion for columns with types conflicts
class_docstr_tok: ["Class","for","checking","types","in","input","data",".","Also","perform","conversion","for","columns","with","types","conflicts"]
docstr: Automatically determine categorical features which should be converted into float
docstr_tok: ["Automatically","determine","categorical","features","which","should","be","converted","into","float"]
code: def _into_numeric_features_transformation_for_fit(
      self, data: InputData
  ):
      """
      Automatically determine categorical features which should be converted into float
      """
      is_str_type = (
          data.supplementary_data.col_type_ids["features"]
          == TYPE_TO_ID[str]
      )
      str_col_ids = np.flatnonzero(is_str_type)
      str_cols_df = pd.DataFrame(
          data.features[:, str_col_ids], columns=str_col_ids
      )
      orig_nans_cnt = str_cols_df.isna().sum(axis=0)
  
      converted_str_cols_df = str_cols_df.apply(
          pd.to_numeric, errors="coerce"
      )
      conv_nans_cnt = converted_str_cols_df.isna().sum(axis=0)
  
      failed_objects_cnt = conv_nans_cnt - orig_nans_cnt
      non_nan_all_objects_cnt = len(data.features) - orig_nans_cnt
      failed_ratio = failed_objects_cnt / non_nan_all_objects_cnt
  
      # Check if the majority of objects can be converted into numerical
      is_numeric = failed_ratio < self.acceptable_failed_rate_bottom
      is_numeric_ids = is_numeric[is_numeric].index
      data.features[:, is_numeric_ids] = converted_str_cols_df[
          is_numeric_ids
      ].to_numpy()
      self.categorical_into_float.extend(
          is_numeric_ids.difference(self.categorical_into_float)
      )
  
      # Update information about column types (in-place)
      feature_type_ids = data.supplementary_data.col_type_ids[
          "features"
      ]
      feature_type_ids[is_numeric_ids] = TYPE_TO_ID[float]
  
      # The columns consist mostly of truly str values and has a few ints/floats in it
      is_mixed = (self.acceptable_failed_rate_top <= failed_ratio) & (
          failed_ratio != 1
      )
      self._remove_pseudo_str_values_from_str_column(
          data, is_mixed[is_mixed].index
      )
  
      # If column contains a lot of '?' or 'x' as nans equivalents
      # add it to remove list
      is_of_mistakes = (
          self.acceptable_failed_rate_bottom <= failed_ratio
      ) & (failed_ratio < self.acceptable_failed_rate_top)
      self.string_columns_transformation_failed.update(
          dict.fromkeys(is_of_mistakes[is_of_mistakes].index)
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Dict, List, Optional, Tuple
  import numpy
  import pandas
  from golem.core.log import LoggerAdapter, default_log
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 15 for calling the TableTypesCorrector obj's underlying member method code with example usage: obj._into_numeric_features_transformation_for_fit(data) without return types