class_docstr: Class for selecting optimal data processing strategies based on type of data.
  Available data sources are:
      * numpy array
      * pandas DataFrame
      * string (path to csv file)
      * InputData (FEDOT dataclass)
  
  Data preprocessing such a class performing also
class_docstr_tok: ["Class","for","selecting","optimal","data","processing","strategies","based","on","type","of","data",".","Available","data","sources","are",":","*","numpy","array","*","pandas","DataFrame","*","string","(","path","to","csv","file",")","*","InputData","(","FEDOT","dataclass",")","Data","preprocessing","such","a","class","performing","also"]
docstr: Change shape for models predictions if its necessary. Apply 
docstr_tok: ["Change","shape","for","models","predictions","if","its","necessary",".","Apply"]
code: def correct_predictions(
      self, real: InputData, prediction: OutputData
  ):
      """Change shape for models predictions if its necessary. Apply"""
      if self.task == TaskTypesEnum.ts_forecasting:
          real.target = real.target[~np.isnan(prediction.predict)]
          prediction.predict = prediction.predict[
              ~np.isnan(prediction.predict)
          ]
  
      if data_type_is_table(prediction):
          # Check dimensions for real and predicted values
          if len(real.target.shape) != len(prediction.predict.shape):
              prediction.predict = convert_into_column(
                  prediction.predict
              )
              real.target = convert_into_column(np.array(real.target))
  
imports: import sys
  from datetime import datetime
  from typing import Dict, Union
  from typing import Optional
  import numpy
  from golem.core.log import default_log
  from fedot.api.api_utils.data_definition import data_strategy_selector, FeaturesType, TargetType
  from fedot.core.data.data import InputData, OutputData, data_type_is_table
  from fedot.core.data.data_preprocessing import convert_into_column
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.ts_wrappers import in_sample_ts_forecast, convert_forecast_to_output
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import convert_memory_size
  from fedot.preprocessing.dummy_preprocessing import DummyPreprocessor
  from fedot.preprocessing.preprocessing import DataPreprocessor
label_desc: Use image node_id 4 for calling the ApiDataProcessor obj's underlying member method code with example usage: obj.correct_predictions(real, prediction) without return types