class_docstr: Impute missing values using interpolation.
  
  Parameters
  ----------
  missing_values : None, np.nan, integer or float (default = np.nan)
      The placeholder for the missing values. All occurrences of
      `missing_values` will be imputed. If an integer or a float,
      the input data must not contain NaN or infinity values.
  
  strategy : str or int (default = 'linear')
      Specifies the kind of interpolation as a string
      ('linear', 'nearest', 'zero', 'slinear', 'quadratic', 'cubic',
      'previous', 'next', where 'zero', 'slinear', 'quadratic' and 'cubic'
      refer to a spline interpolation of zeroth, first, second or third
      order; 'previous' and 'next' simply return the previous or next value
      of the point) or as an integer specifying the order of the spline
      interpolator to use. Default is 'linear'.
  
  Examples
  --------
  >>> import numpy as np
  >>> from pyts.preprocessing import InterpolationImputer
  >>> X = [[1, None, 3, 4], [8, None, 4, None]]
  >>> imputer = InterpolationImputer()
  >>> imputer.transform(X)
  array([[1., 2., 3., 4.],
         [8., 6., 4., 2.]])
docstr: Perform imputation using interpolation.
  
  Parameters
  ----------
  X : array-like, shape = (n_samples, n_timestamps)
      Data with missing values.
  
  Returns
  -------
  X_new : array-like, shape = (n_samples, n_timestamps)
      Data without missing values.
docstr_tok: ["Perform","imputation","using","interpolation",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","(","n_samples",",","n_timestamps",")","Data","with","missing","values",".","Returns","--","--","--","-","X_new",":","array-like",",","shape","=","(","n_samples",",","n_timestamps",")","Data","without","missing","values","."]
code: def transform(self, X):
      """Perform imputation using interpolation.
  
      Parameters
      ----------
      X : array-like, shape = (n_samples, n_timestamps)
          Data with missing values.
  
      Returns
      -------
      X_new : array-like, shape = (n_samples, n_timestamps)
          Data without missing values.
  
      """
      missing_values, force_all_finite = self._check_params()
      X = check_array(
          X, dtype="float64", force_all_finite=force_all_finite
      )
      n_samples, n_timestamps = X.shape
  
      indicator = MissingIndicator(
          missing_values=missing_values,
          features="all",
          sparse=False,
      )
      non_missing_idx = ~(indicator.fit_transform(X))
      x_new = np.arange(n_timestamps)
      X_imputed = np.asarray(
          [
              self._impute_one_sample(X[i], non_missing_idx[i], x_new)
              for i in range(n_samples)
          ]
      )
      return X_imputed
  
file_path: pyts/pyts/preprocessing/imputer.py
imports: import numpy
  from scipy.interpolate import interp1d
  from sklearn.base import BaseEstimator
  from sklearn.impute import MissingIndicator
  from sklearn.utils.validation import check_array
  from ..base import UnivariateTransformerMixin
label_desc: Use image node_id 3 for calling the InterpolationImputer obj's underlying member method code with example usage: obj.transform(X) and returns: X_imputed