Skip to main content
edited body
Source Link
Ethan
  • 1.7k
  • 9
  • 24
  • 39

You can use tsfresh relevance table to solve this issue. After you extract your features with tsfresh,:

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features, select_features
from tsfresh.feature_selection.relevance import calculate_relevance_table

y = pd.Series(data = extracted_features['class'], index=extracted_features.index)

relevance_table = calculate_relevance_table(features2, y)
relevance_table = relevance_table[relevance_table.relevant]
relevance_table.sort_values("p_value", inplace=True)

best_features = relevance_table.copy()

best_features.sort_values(by=['p_value'])

best_features

From now on, the only thing you need to do to choose the top n features, just. Just select fist n rows with the help of pandas.

You can use tsfresh relevance table to solve this issue. After you extract your features with tsfresh,

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features, select_features
from tsfresh.feature_selection.relevance import calculate_relevance_table

y = pd.Series(data = extracted_features['class'], index=extracted_features.index)

relevance_table = calculate_relevance_table(features2, y)
relevance_table = relevance_table[relevance_table.relevant]
relevance_table.sort_values("p_value", inplace=True)

best_features = relevance_table.copy()

best_features.sort_values(by=['p_value'])

best_features

From now on, the only thing you need to do to choose the top n features, just select fist n rows with the help of pandas.

You can use tsfresh relevance table to solve this issue. After you extract your features with tsfresh:

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features, select_features
from tsfresh.feature_selection.relevance import calculate_relevance_table

y = pd.Series(data = extracted_features['class'], index=extracted_features.index)

relevance_table = calculate_relevance_table(features2, y)
relevance_table = relevance_table[relevance_table.relevant]
relevance_table.sort_values("p_value", inplace=True)

best_features = relevance_table.copy()

best_features.sort_values(by=['p_value'])

best_features

From now on, the only thing you need to do to choose the top n features. Just select fist n rows with the help of pandas.

Source Link

You can use tsfresh relevance table to solve this issue. After you extract your features with tsfresh,

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features, select_features
from tsfresh.feature_selection.relevance import calculate_relevance_table

y = pd.Series(data = extracted_features['class'], index=extracted_features.index)

relevance_table = calculate_relevance_table(features2, y)
relevance_table = relevance_table[relevance_table.relevant]
relevance_table.sort_values("p_value", inplace=True)

best_features = relevance_table.copy()

best_features.sort_values(by=['p_value'])

best_features

From now on, the only thing you need to do to choose the top n features, just select fist n rows with the help of pandas.