class_docstr: Class for applying imputation on tabular data
  
  Args:
      params: OperationParameters with the arguments
class_docstr_tok: ["Class","for","applying","imputation","on","tabular","data","Args",":","params",":","OperationParameters","with","the","arguments"]
docstr: Correct filled features if previously it was binary. Discretization is performed
  for the reconstructed values
  
  Tip:
      [1, 1, 0.75, 0] will be transformed to [1, 1, 1, 0]
docstr_tok: ["Correct","filled","features","if","previously","it","was","binary",".","Discretization","is","performed","for","the","reconstructed","values","Tip",":","[","1",",","1",",","0.75",",","0","]","will","be","transformed","to","[","1",",","1",",","1",",","0","]"]
code: def _correct_binary_ids_features(
      self, filled_numerical_features: np.array
  ) -> np.array:
      """Correct filled features if previously it was binary. Discretization is performed
      for the reconstructed values
  
      Tip:
          [1, 1, 0.75, 0] will be transformed to [1, 1, 1, 0]
      """
  
      list_binary_ids = list(self.ids_binary_integer_features.keys())
      if len(list_binary_ids) == 0:
          # Return source array
          return filled_numerical_features
  
      for bin_id in list_binary_ids:
          # Correct values inplace
          filled_column = filled_numerical_features[:, bin_id]
          min_value = self.ids_binary_integer_features[bin_id]["min"]
          max_value = self.ids_binary_integer_features[bin_id]["max"]
          mean_value = (max_value - min_value) / 2
  
          filled_column[filled_column > mean_value] = max_value
          filled_column[filled_column < mean_value] = min_value
  
      return filled_numerical_features
  
imports: import random
  from typing import Optional
  import numpy
  import pandas
  from sklearn.decomposition import FastICA, KernelPCA, PCA
  from sklearn.impute import SimpleImputer
  from sklearn.preprocessing import MinMaxScaler, PolynomialFeatures, StandardScaler
  from fedot.core.data.data import InputData, OutputData, data_type_is_table
  from fedot.core.data.data_preprocessing import convert_into_column, data_has_categorical_features, divide_data_categorical_numerical, find_categorical_columns, replace_inf_with_nans
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import DataOperationImplementation, EncodedInvariantImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.preprocessing.data_types import TYPE_TO_ID
label_desc: Use image node_id 7 for calling the ImputationImplementation obj's underlying member method code with example usage: obj._correct_binary_ids_features(filled_numerical_features) and returns: filled_numerical_features, filled_numerical_features