class_docstr: Test case for the relevant_feature_extraction function
class_docstr_tok: ["Test","case","for","the","relevant_feature_extraction","function"]
docstr: `extract_relevant_features` should be equivalent to running first `extract_features` with impute and
  `select_features` afterwards.
  Meaning it should produce the same relevant features and the values of these features should be identical.
  :return:
docstr_tok: ["`","extract_relevant_features","`","should","be","equivalent","to","running","first","`","extract_features","`","with","impute","and","`","select_features","`","afterwards",".","Meaning","it","should","produce","the","same","relevant","features","and","the","values","of","these","features","should","be","identical",".",":","return",":"]
code: def test_functional_equality(self):
      """
      `extract_relevant_features` should be equivalent to running first `extract_features` with impute and
      `select_features` afterwards.
      Meaning it should produce the same relevant features and the values of these features should be identical.
      :return:
      """
      df, y = self.create_test_data_sample_with_target()
  
      relevant_features = extract_relevant_features(
          df,
          y,
          column_id="id",
          column_value="val",
          column_kind="kind",
          column_sort="sort",
      )
  
      extracted_features = extract_features(
          df,
          column_id="id",
          column_value="val",
          column_kind="kind",
          column_sort="sort",
          impute_function=impute,
      )
      selected_features = select_features(extracted_features, y)
  
      self.assertEqual(
          set(relevant_features.columns),
          set(selected_features.columns),
          "Should select the same columns:\n\t{}\n\nvs.\n\n\t{}".format(
              relevant_features.columns, selected_features.columns
          ),
      )
  
      relevant_columns = relevant_features.columns
      relevant_index = relevant_features.index
      self.assertTrue(
          relevant_features.equals(
              selected_features.loc[relevant_index][relevant_columns]
          ),
          "Should calculate the same feature values",
      )
  
file_path: tsfresh/tests/integrations/test_relevant_feature_extraction.py
imports: from unittest import TestCase
  import numpy
  import pandas
  import pandas.testing
  from tests.fixtures import DataTestCase
  from tsfresh import extract_features, extract_relevant_features, select_features
  from tsfresh.feature_extraction.settings import ComprehensiveFCParameters
  from tsfresh.utilities.dataframe_functions import impute
label_desc: Use image node_id 1 for calling the RelevantFeatureExtractionDataTestCase obj's underlying member method code with example usage: obj.test_functional_equality() without return types