class_docstr: Base class used for filling in the gaps in time series with simple methods.
  Methods from the SimpleGapFiller class can be used for comparison with more
  complex models in class ModelGapFiller
  
  Args:
      gap_value: value, which identify gap elements in array
class_docstr_tok: ["Base","class","used","for","filling","in","the","gaps","in","time","series","with","simple","methods",".","Methods","from","the","SimpleGapFiller","class","can","be","used","for","comparison","with","more","complex","models","in","class","ModelGapFiller","Args",":","gap_value",":","value",",","which","identify","gap","elements","in","array"]
docstr: Method allows to restore missing values in an array
  using linear interpolation
  
  Args:
      input_data: array with gaps
  
  Returns:
      array without gaps
docstr_tok: ["Method","allows","to","restore","missing","values","in","an","array","using","linear","interpolation","Args",":","input_data",":","array","with","gaps","Returns",":","array","without","gaps"]
code: def linear_interpolation(self, input_data: np.array):
      """
      Method allows to restore missing values in an array
      using linear interpolation
  
      Args:
          input_data: array with gaps
  
      Returns:
          array without gaps
      """
  
      output_data = np.array(input_data)
      output_data = replace_nan_with_label(
          output_data, label=self.gap_value
      )
  
      # Process first and last elements in time series
      output_data = self._fill_first_and_last_gaps(
          input_data, output_data
      )
  
      # The indices of the known elements
      non_nan = np.ravel(np.argwhere(output_data != self.gap_value))
      # All known elements in the array
      masked_array = output_data[non_nan]
      f_interploate = interpolate.interp1d(non_nan, masked_array)
      x = np.arange(0, len(output_data))
      output_data = f_interploate(x)
      return output_data
  
imports: from copy import deepcopy
  from typing import List, Union
  import numpy
  from golem.core.log import default_log
  from scipy import interpolate
  from fedot.core.data.data import InputData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
label_desc: Use image node_id 2 for calling the SimpleGapFiller obj's underlying member method code with example usage: obj.linear_interpolation(input_data) and returns: output_data