Kaggle competition: CareerCon 2019 - Help Navigate Robots
del tsfresh_parameters['length']
tsfresh_parameters['skewness'] = None
tsfresh_parameters['kurtosis'] = None
tsfresh_parameters['last_location_of_maximum'] = None
tsfresh_parameters['first_location_of_maximum'] = None
tsfresh_parameters['last_location_of_minimum'] = None
tsfresh_parameters['first_location_of_minimum'] = None
tsfresh_parameters['first_location_of_minimum'] = None
tsfresh_parameters['benford_correlation'] = None
tsfresh_parameters['percentage_of_reoccurring_values_to_all_values'] = None
tsfresh_parameters['percentage_of_reoccurring_datapoints_to_all_datapoints'] = None
tsfresh_parameters['number_peaks'] = [
{'n': 1},
{'n': 3},
{'n': 5},
{'n': 10},
{'n': 50}
]
tsfresh_parameters['binned_entropy'] = [
{'max_bins': 10}
]
tsfresh_parameters['fft_aggregated'] = [
{'aggtype': 'centroid'},
{'aggtype': 'variance'},
{'aggtype': 'skew'},
{'aggtype': 'kurtosis'}
]
tsfresh_parameters['autocorrelation'] = [
{'lag': 0},
{'lag': 1},
{'lag': 2},
{'lag': 3},
{'lag': 4},
{'lag': 5},
{'lag': 6},
{'lag': 7},
{'lag': 8},
{'lag': 9}
]
tsfresh_parameters['agg_autocorrelation'] = [
{'f_agg': 'mean', 'maxlag': 40},
{'f_agg': 'median', 'maxlag': 40},
{'f_agg': 'var', 'maxlag': 40}
]
tsfresh_parameters['friedrich_coefficients'] = [
{'coeff': 0, 'm': 3, 'r': 30},
{'coeff': 1, 'm': 3, 'r': 30},
{'coeff': 2, 'm': 3, 'r': 30},
{'coeff': 3, 'm': 3, 'r': 30}
]
tsfresh_parameters['count_above'] = [{'t': 0}]
tsfresh_parameters['count_below'] = [{'t': 0}]<load_from_csv>
warnings.filterwarnings('ignore' )
def preprocess_timeseries(data, parameters, is_train=True):
df_result = None
if is_train:
segments = df.iterrows()
else:
segments = enumerate(os.listdir(data_folder / 'test'))
for idx, row in segments:
if is_train:
segment, time_to_eruption = row
segment_timeseries_path = data_folder / 'train/{segment}.csv'
else:
segment = row
segment_timeseries_path = data_folder / 'test/{segment}'
segment_timeseries = pd.read_csv(segment_timeseries_path)
 segment_timeseries = segment_timeseries.fillna(0 ).reset_index()
segment_timeseries['id'] = idx
extracted_features = extract_features(segment_timeseries, \
column_id='id', \
column_sort='index', \
disable_progressbar=True,
default_fc_parameters=parameters)
 extracted_features['segment'] = segment
if is_train:
extracted_features['time_to_eruption'] = time_to_eruption
if df_result is None:
df_result = extracted_features
else:
df_result = pd.concat([df_result, extracted_features], \
axis=0, \
ignore_index=True, \
sort=True)
 print(f'Processed segment
return df_result<save_to_csv>
train = pd.read_csv('.. /input/X_train.csv')
 test = pd.read_csv('.. /input/X_test.csv')
 target = pd.read_csv('.. /input/y_train.csv')
 submission = pd.read_csv('.. /input/sample_submission.csv' )
def save(parameters):
ts_train = pd.read_csv(data_folder / 'train.csv')
 df_train = preprocess_timeseries(ts_train, parameters)
 df_train.to_csv('train.csv', index=False)
 df_test = preprocess_timeseries(None, parameters, is_train=False)
 df_test.to_csv('test.csv', index=False )<prepare_x_and_y>
train = reduce_mem_usage(train)
 test = reduce_mem_usage(test )
df_train = pd.read_csv('.. /input/volcanoes-ts-processed-with-tsfresh/train.csv')
 df_train = df_train.dropna(axis='columns')
 features = [c for c in df_train.columns if c not in ['time_to_eruption', 'segment']]
X = df_train[features]
y = df_train['time_to_eruption']
df_train.head()<train_model>
len(target.series_id.unique() )
class LowImportanceSelector(TransformerMixin):
def __init__(self, threshold, n_estimators=100):
self.features = None
self.threshold = threshold
self.n_estimators = n_estimators
def fit(self, X, y):
estimator = RandomForestRegressor(n_estimators=self.n_estimators)
 estimator.fit(X, y)
 importances = pd.DataFrame({
'feature': X.columns,
'importance': estimator.feature_importances_
})
 importances = importances[importances['importance'] > self.threshold]
self.features = importances['feature']
return self
def transform(self, X):
return X[self.features]<train_model>
len(train['series_id'].value_counts() )
class CorrelationSelector(TransformerMixin):
def __init__(self, threshold):
self.columns = None
self.threshold = threshold
def fit(self, X, y=None):
X = X.copy()
self.columns = set()
C = X.corr()
for i in range(len(C.columns)) :
for j in range(i):
if(C.iloc[i, j] >= self.threshold)and(C.columns[j] not in self.columns):
c = C.columns[i]
self.columns.add(c)
 if c in X.columns:
del X[c]
return self
def transform(self, X, y=None):
X.drop(columns=list(self.columns)).shape
return X.drop(columns=list(self.columns))<find_best_params>
len(test.series_id.unique() )
def objective(trial, data=X, target=y):
parameters = {
'tree_method': 'gpu_hist',
'lambda': trial.suggest_loguniform('lambda', 1e-3, 10.0),
'alpha': trial.suggest_loguniform('alpha', 1e-3, 10.0),
'colsample_bytree': trial.suggest_categorical('colsample_bytree', [0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,1.0]),
'subsample': trial.suggest_categorical('subsample', [0.4, 0.5, 0.6, 0.7, 0.8, 1.0]),
'learning_rate': trial.suggest_categorical('learning_rate', [0.008, 0.009, 0.01, 0.012, 0.014, 0.016, 0.018, 0.02]),
'n_estimators': 1000,
'max_depth': trial.suggest_categorical('max_depth', [5, 7, 9, 11, 13, 15, 17, 20]),
'random_state': trial.suggest_categorical('random_state', [24, 48, 2020]),
'min_child_weight': trial.suggest_int('min_child_weight', 1, 300),
}
X_train, X_test, y_train, y_test = train_test_split(data, target, test_size=0.2, random_state=1337)
 model = XGBRegressor(**parameters)
 model.fit(X_train, y_train, eval_set=[(X_test, y_test)], early_stopping_rounds=100, verbose=False)
 return mean_absolute_error(y_test, model.predict(X_test))<init_hyperparams>
def create_valid_set(label):
ldict = {
'concrete': 0.16,
'soft_pvc': 0.18,
'wood': 0.06,
'tiled': 0.03,
'fine_concrete': 0.10,
'hard_tiles_large_space': 0.12,
'soft_tiles': 0.23,
'carpet': 0.05,
'hard_tiles': 0.07,
}
score = 0
print("Required count of target classes for the Valid Set :: ")
 for key, value in ldict.items() :
score += value
print(key,':',value )
parameters = {
'lambda': 0.0020555245431348778,
'alpha': 0.11298627316540845,
'colsample_bytree': 0.6,
'subsample': 1.0,
'learning_rate': 0.01,
'max_depth': 20,
'random_state': 48,
'min_child_weight': 18
}<choose_model_class>
def quaternion_to_euler(x, y, z, w):
t0 = +2.0 *(w * x + y * z)
 t1 = +1.0 - 2.0 *(x * x + y * y)
 X = math.atan2(t0, t1)
 t2 = +2.0 *(w * y - z * x)
 t2 = +1.0 if t2 > +1.0 else t2
t2 = -1.0 if t2 < -1.0 else t2
Y = math.asin(t2)
 t3 = +2.0 *(w * z + x * y)
 t4 = +1.0 - 2.0 *(y * y + z * z)
 Z = math.atan2(t3, t4)
 return X, Y, Z
pipe = Pipeline([ 
('correlation', CorrelationSelector(threshold=0.85)) , 
('scaler', MinMaxScaler()), 
('xgboost', XGBRegressor(objective='reg:squarederror', n_estimators=1000, **parameters))
] )<split>
def fe_step0(actual):
actual['norm_quat'] =(actual['orientation_X']**2 + actual['orientation_Y']**2 + actual['orientation_Z']**2 + actual['orientation_W']**2)
 actual['mod_quat'] =(actual['norm_quat'])**0.5
actual['norm_X'] = actual['orientation_X'] / actual['mod_quat']
actual['norm_Y'] = actual['orientation_Y'] / actual['mod_quat']
actual['norm_Z'] = actual['orientation_Z'] / actual['mod_quat']
actual['norm_W'] = actual['orientation_W'] / actual['mod_quat']
return actual
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1337 )<train_model>
%%time
train = fe_step0(train)
 test = fe_step0(test )
pipe.fit(X_train, y_train )<compute_test_metric>
def fe_step1(actual):

 x, y, z, w = actual['norm_X'].tolist() , actual['norm_Y'].tolist() , actual['norm_Z'].tolist() , actual['norm_W'].tolist()
nx, ny, nz = [], [], []
for i in range(len(x)) :
xx, yy, zz = quaternion_to_euler(x[i], y[i], z[i], w[i])
 nx.append(xx)
 ny.append(yy)
 nz.append(zz)
 actual['euler_x'] = nx
actual['euler_y'] = ny
actual['euler_z'] = nz
return actual
pipe.score(X_test, y_test )<train_model>
len(test['series_id'].unique() )
pipe.fit(X, y )<load_from_csv>
def total_values_fe(data):
data['totl_anglr_vel'] =(data['angular_velocity_X']**2 + data['angular_velocity_Y']**2 +
data['angular_velocity_Z'])** 0.5
data['totl_linr_acc'] =(data['linear_acceleration_X']**2 + data['linear_acceleration_Y']**2 +
data['linear_acceleration_Z'])**0.5
data['totl_xyz'] =(data['orientation_X']**2 + data['orientation_Y']**2 +
data['orientation_Z'])**0.5
data['acc_vs_vel'] = data['totl_linr_acc'] / data['totl_anglr_vel']
return data
df_predict = pd.read_csv('.. /input/volcanoes-ts-processed-with-tsfresh/predict.csv')
 df_predict = df_predict.dropna(axis='columns')
 df_predict['segment'] = df_predict['segment'].apply(lambda s: s.split('.')[0] )<save_to_csv>
data = total_values_fe(train)
 test = total_values_fe(test)
 print(data.shape)
 data.head()
target = pipe.predict(df_predict.drop(columns='segment'))
target = pd.DataFrame({
'segment_id': df_predict['segment'], 'time_to_eruption': target
})
 target.to_csv('submission.csv', index=False )<import_modules>
def mean_change_of_abs_change(x):
return np.mean(np.diff(np.abs(np.diff(x))))
import re
import pandas as pd
import numpy as np
from math import sqrt, ceil
from tqdm.notebook import tqdm
import matplotlib.pyplot as plt
from lightgbm import LGBMRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error as mse
from sklearn.metrics import mean_absolute_error as mae
from sklearn.feature_selection import VarianceThreshold
from sklearn.preprocessing import MinMaxScaler<prepare_x_and_y>
len(test['series_id'].unique() )
def get_train_dataset(train_features_df, labels_df):
_df = train_features_df.merge(labels_df, on='segment_id', how='left')
 _y = _df['time_to_eruption']
_x = _df.drop(['segment_id', 'time_to_eruption'], axis=1)
 return(_x, _y )<prepare_x_and_y>
train_data = pd.DataFrame()
test_data = pd.DataFrame()
def get_dataset_by_range(features_df, labels_df, lower_limit, upper_limit):
_df = features_df.merge(labels_df, on='segment_id', how='left')
 _df = _df[_df['time_to_eruption'].notna() ]
_df = _df[(_df['time_to_eruption'] > lower_limit)&(_df['time_to_eruption'] < upper_limit)]
_y = _df['time_to_eruption']
_x = _df.drop(['segment_id', 'time_to_eruption'], axis=1)
 _x = _df.rename(columns = lambda x:re.sub('[^A-Za-z0-9_]+', '_', x))
return(_x, _y )<load_pretrained>
%%time
columns = data.columns
for i in columns[1:]:
if i in ['row_id','series_id','measurement_number']:
continue
train_data[i+'_max'] = data.groupby(by='series_id')[i].max()
test_data[i+'_max'] = test.groupby(by='series_id')[i].max()
print(i)
 train_data[i+'_min'] = data.groupby(by='series_id')[i].min()
test_data[i+'_min'] = test.groupby(by='series_id')[i].min()
train_data[i+'_mean'] = data.groupby(by='series_id')[i].mean()
test_data[i+'_mean'] = test.groupby(by='series_id')[i].mean()
train_data[i+'_median'] = data.groupby(by='series_id')[i].median()
test_data[i+'_median'] = test.groupby(by='series_id')[i].median()
train_data[i+'_quantile_25'] = data.groupby(by='series_id')[i].quantile(0.25)
 test_data[i+'_quantile_25'] = test.groupby(by='series_id')[i].quantile(0.25)
 train_data[i+'_quantile_50'] = data.groupby(by='series_id')[i].quantile(0.5)
 test_data[i+'_quantile_50'] = test.groupby(by='series_id')[i].quantile(0.5)
 train_data[i+'_quantile_75'] = data.groupby(by='series_id')[i].quantile(0.75)
 test_data[i+'_quantile_75'] = test.groupby(by='series_id')[i].quantile(0.75)
 train_data[i+'_abs_max'] = data.groupby(by='series_id')[i].apply(lambda x: np.max(np.abs(x)))
 test_data[i+'_abs_max'] = test.groupby(by='series_id')[i].apply(lambda x: np.max(np.abs(x)))
 train_data[i + '_mean_abs_chg'] = data.groupby(['series_id'])[i].apply(lambda x: np.mean(np.abs(np.diff(x))))
test_data[i + '_mean_abs_chg'] = test.groupby(['series_id'])[i].apply(lambda x: np.mean(np.abs(np.diff(x))))
train_data[i + '_mean_change_of_abs_change'] = data.groupby('series_id')[i].apply(mean_change_of_abs_change)
 test_data[i + '_mean_change_of_abs_change'] = test.groupby('series_id')[i].apply(mean_change_of_abs_change)
 train_data[i + '_abs_min'] = data.groupby(['series_id'])[i].apply(lambda x: np.min(np.abs(x)))
 test_data[i + '_abs_min'] = test.groupby(['series_id'])[i].apply(lambda x: np.min(np.abs(x)))
 train_data[i + '_abs_avg'] =(train_data[i + '_abs_min'] + train_data[i + '_abs_max'])/2
test_data[i + '_abs_avg'] =(test_data[i + '_abs_min'] + test_data[i + '_abs_max'])/2
train_data[i+'_std'] = data.groupby(by='series_id')[i].std()
test_data[i+'_std'] = test.groupby(by='series_id')[i].std()
train_data[i + '_range'] = train_data[i + '_max'] - train_data[i + '_min']
test_data[i + '_range'] = test_data[i + '_max'] - test_data[i + '_min']
train_data[i + '_maxtoMin'] = train_data[i + '_max'] / train_data[i + '_min']
test_data[i + '_maxtoMin'] = test_data[i + '_max'] / test_data[i + '_min']
train_df = pd.read_parquet('/kaggle/input/ingv-parquet/train_features.parquet')
 test_df = pd.read_parquet('/kaggle/input/ingv-parquet/test_features.parquet')
 labels_df = pd.read_parquet('/kaggle/input/ingv-parquet/labels.parquet' )<categorify>
train_data.isnull().values.any()
train_df = train_df.rename(columns = lambda x:re.sub('[^A-Za-z0-9_]+', '_', x))
test_df = test_df.rename(columns = lambda x:re.sub('[^A-Za-z0-9_]+', '_', x))<define_variables>
train_data.fillna(0,inplace=True)
 train_data.replace(-np.inf,0,inplace=True)
 train_data.replace(np.inf,0,inplace=True)
 test_data.fillna(0,inplace=True)
 test_data.replace(-np.inf,0,inplace=True)
 test_data.replace(np.inf,0,inplace=True )
features = [
'sensor_1__value_count__value_1',
'sensor_1__value_count__value_-1',
'sensor_4__median',
'sensor_6__value_count__value_1',
'sensor_6__value_count__value_-1',
'sensor_10__median',
'sensor_10__value_count__value_0',
'sensor_10__linear_trend__attr_"pvalue"',
'sensor_7__mean_change',
'sensor_7__first_location_of_minimum',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.2__ql_0.0',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.4__ql_0.0',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.4__ql_0.2',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.6__ql_0.2',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.8__ql_0.2',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.6__ql_0.4',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.8__ql_0.4',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_0.8__ql_0.6',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_1.0__ql_0.6',
'sensor_7__change_quantiles__f_agg_"mean"__isabs_False__qh_1.0__ql_0.8',
'sensor_7__value_count__value_1',
'sensor_7__value_count__value_-1',
'sensor_2__abs_energy',
'sensor_2__mean_abs_change',
'sensor_2__kurtosis',
'sensor_2__longest_strike_below_mean',
'sensor_2__longest_strike_above_mean',
'sensor_2__cid_ce__normalize_True',
'sensor_2__number_cwt_peaks__n_1',
'sensor_2__number_cwt_peaks__n_5',
'sensor_2__number_peaks__n_1',
'sensor_2__number_peaks__n_3',
'sensor_2__number_peaks__n_5',
'sensor_2__number_peaks__n_10',
'sensor_2__spkt_welch_density__coeff_2',
'sensor_2__spkt_welch_density__coeff_5',
'sensor_2__spkt_welch_density__coeff_8',
'sensor_2__ar_coefficient__coeff_1__k_10',
'sensor_2__ar_coefficient__coeff_2__k_10',
'sensor_2__ar_coefficient__coeff_3__k_10',
'sensor_2__ar_coefficient__coeff_4__k_10',
'sensor_2__ar_coefficient__coeff_7__k_10',
'sensor_2__ar_coefficient__coeff_8__k_10',
'sensor_2__ar_coefficient__coeff_9__k_10',
'sensor_2__ar_coefficient__coeff_10__k_10',
'sensor_2__change_quantiles__f_agg_"var"__isabs_False__qh_0.6__ql_0.2',
'sensor_2__fft_coefficient__attr_"abs"__coeff_7',
'sensor_2__fft_coefficient__attr_"abs"__coeff_8',
'sensor_2__fft_coefficient__attr_"abs"__coeff_9',
'sensor_2__fft_coefficient__attr_"abs"__coeff_10',
'sensor_2__fft_coefficient__attr_"abs"__coeff_11',
'sensor_2__fft_coefficient__attr_"abs"__coeff_12',
'sensor_2__fft_coefficient__attr_"abs"__coeff_13',
'sensor_2__fft_coefficient__attr_"abs"__coeff_14',
'sensor_2__fft_coefficient__attr_"abs"__coeff_15',
'sensor_2__fft_coefficient__attr_"abs"__coeff_16',
'sensor_2__fft_coefficient__attr_"abs"__coeff_17',
'sensor_2__fft_coefficient__attr_"abs"__coeff_18',
'sensor_2__fft_coefficient__attr_"abs"__coeff_19',
'sensor_2__fft_coefficient__attr_"abs"__coeff_20',
'sensor_2__fft_coefficient__attr_"abs"__coeff_21',
'sensor_2__fft_coefficient__attr_"abs"__coeff_22',
'sensor_2__fft_coefficient__attr_"abs"__coeff_24',
'sensor_2__approximate_entropy__m_2__r_0.1',
'sensor_2__approximate_entropy__m_2__r_0.3',
'sensor_2__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"mean"',
'sensor_2__number_crossing_m__m_0',
'sensor_2__permutation_entropy__dimension_3__tau_1',
'sensor_9__abs_energy',
'sensor_9__mean_abs_change',
'sensor_9__standard_deviation',
'sensor_9__kurtosis',
'sensor_9__longest_strike_below_mean',
'sensor_9__longest_strike_above_mean',
'sensor_9__maximum',
'sensor_9__cid_ce__normalize_True',
'sensor_9__quantile__q_0.6',
'sensor_9__agg_autocorrelation__f_agg_"mean"__maxlag_40',
'sensor_9__agg_autocorrelation__f_agg_"median"__maxlag_40',
'sensor_9__number_cwt_peaks__n_1',
'sensor_9__number_cwt_peaks__n_5',
'sensor_9__number_peaks__n_1',
'sensor_9__number_peaks__n_3',
'sensor_9__number_peaks__n_5',
'sensor_9__number_peaks__n_10',
'sensor_9__number_peaks__n_50',
'sensor_9__binned_entropy__max_bins_10',
'sensor_9__spkt_welch_density__coeff_2',
'sensor_9__spkt_welch_density__coeff_5',
'sensor_9__spkt_welch_density__coeff_8',
'sensor_9__ar_coefficient__coeff_1__k_10',
'sensor_9__ar_coefficient__coeff_2__k_10',
'sensor_9__ar_coefficient__coeff_3__k_10',
'sensor_9__ar_coefficient__coeff_4__k_10',
'sensor_9__ar_coefficient__coeff_5__k_10',
'sensor_9__ar_coefficient__coeff_6__k_10',
'sensor_9__ar_coefficient__coeff_7__k_10',
'sensor_9__ar_coefficient__coeff_8__k_10',
'sensor_9__ar_coefficient__coeff_9__k_10',
'sensor_9__change_quantiles__f_agg_"var"__isabs_False__qh_0.4__ql_0.2',
'sensor_9__change_quantiles__f_agg_"var"__isabs_False__qh_0.6__ql_0.4',
'sensor_9__fft_coefficient__attr_"real"__coeff_6',
'sensor_9__fft_coefficient__attr_"real"__coeff_11',
'sensor_9__fft_coefficient__attr_"real"__coeff_12',
'sensor_9__fft_coefficient__attr_"real"__coeff_13',
'sensor_9__fft_coefficient__attr_"real"__coeff_14',
'sensor_9__fft_coefficient__attr_"real"__coeff_31',
'sensor_9__fft_coefficient__attr_"imag"__coeff_6',
'sensor_9__fft_coefficient__attr_"imag"__coeff_11',
'sensor_9__fft_coefficient__attr_"imag"__coeff_12',
'sensor_9__fft_coefficient__attr_"imag"__coeff_30',
'sensor_9__fft_coefficient__attr_"imag"__coeff_32',
'sensor_9__fft_coefficient__attr_"abs"__coeff_1',
'sensor_9__fft_coefficient__attr_"abs"__coeff_2',
'sensor_9__fft_coefficient__attr_"abs"__coeff_3',
'sensor_9__fft_coefficient__attr_"abs"__coeff_4',
'sensor_9__fft_coefficient__attr_"abs"__coeff_5',
'sensor_9__fft_coefficient__attr_"abs"__coeff_6',
'sensor_9__fft_coefficient__attr_"abs"__coeff_7',
'sensor_9__fft_coefficient__attr_"abs"__coeff_8',
'sensor_9__fft_coefficient__attr_"abs"__coeff_9',
'sensor_9__fft_coefficient__attr_"abs"__coeff_10',
'sensor_9__fft_coefficient__attr_"abs"__coeff_11',
'sensor_9__fft_coefficient__attr_"abs"__coeff_12',
'sensor_9__fft_coefficient__attr_"abs"__coeff_13',
'sensor_9__fft_coefficient__attr_"abs"__coeff_14',
'sensor_9__fft_coefficient__attr_"abs"__coeff_15',
'sensor_9__fft_coefficient__attr_"abs"__coeff_16',
'sensor_9__fft_coefficient__attr_"abs"__coeff_17',
'sensor_9__fft_coefficient__attr_"abs"__coeff_18',
'sensor_9__fft_coefficient__attr_"abs"__coeff_19',
'sensor_9__fft_coefficient__attr_"abs"__coeff_20',
'sensor_9__fft_coefficient__attr_"abs"__coeff_21',
'sensor_9__fft_coefficient__attr_"abs"__coeff_22',
'sensor_9__fft_coefficient__attr_"abs"__coeff_23',
'sensor_9__fft_coefficient__attr_"abs"__coeff_24',
'sensor_9__fft_coefficient__attr_"abs"__coeff_25',
'sensor_9__fft_coefficient__attr_"abs"__coeff_26',
'sensor_9__fft_coefficient__attr_"abs"__coeff_27',
'sensor_9__fft_coefficient__attr_"abs"__coeff_28',
'sensor_9__fft_coefficient__attr_"abs"__coeff_29',
'sensor_9__fft_coefficient__attr_"abs"__coeff_30',
'sensor_9__fft_coefficient__attr_"abs"__coeff_31',
'sensor_9__fft_coefficient__attr_"abs"__coeff_32',
'sensor_9__fft_coefficient__attr_"abs"__coeff_33',
'sensor_9__fft_coefficient__attr_"abs"__coeff_34',
'sensor_9__fft_coefficient__attr_"abs"__coeff_35',
'sensor_9__fft_coefficient__attr_"abs"__coeff_36',
'sensor_9__fft_coefficient__attr_"abs"__coeff_37',
'sensor_9__fft_coefficient__attr_"abs"__coeff_38',
'sensor_9__fft_coefficient__attr_"abs"__coeff_39',
'sensor_9__fft_coefficient__attr_"abs"__coeff_40',
'sensor_9__fft_coefficient__attr_"abs"__coeff_41',
'sensor_9__fft_coefficient__attr_"abs"__coeff_42',
'sensor_9__fft_coefficient__attr_"abs"__coeff_43',
'sensor_9__fft_coefficient__attr_"abs"__coeff_44',
'sensor_9__fft_coefficient__attr_"abs"__coeff_45',
'sensor_9__fft_coefficient__attr_"abs"__coeff_47',
'sensor_9__fft_coefficient__attr_"abs"__coeff_50',
'sensor_9__fft_coefficient__attr_"abs"__coeff_52',
'sensor_9__fft_coefficient__attr_"abs"__coeff_54',
'sensor_9__fft_coefficient__attr_"abs"__coeff_55',
'sensor_9__fft_coefficient__attr_"abs"__coeff_56',
'sensor_9__fft_coefficient__attr_"abs"__coeff_58',
'sensor_9__fft_coefficient__attr_"abs"__coeff_59',
'sensor_9__fft_coefficient__attr_"abs"__coeff_60',
'sensor_9__fft_coefficient__attr_"abs"__coeff_61',
'sensor_9__fft_coefficient__attr_"abs"__coeff_62',
'sensor_9__fft_coefficient__attr_"abs"__coeff_63',
'sensor_9__fft_coefficient__attr_"abs"__coeff_64',
'sensor_9__fft_coefficient__attr_"abs"__coeff_69',
'sensor_9__fft_coefficient__attr_"abs"__coeff_71',
'sensor_9__fft_coefficient__attr_"abs"__coeff_79',
'sensor_9__fft_coefficient__attr_"abs"__coeff_80',
'sensor_9__fft_coefficient__attr_"abs"__coeff_81',
'sensor_9__fft_coefficient__attr_"abs"__coeff_82',
'sensor_9__fft_coefficient__attr_"abs"__coeff_83',
'sensor_9__fft_coefficient__attr_"abs"__coeff_87',
'sensor_9__fft_coefficient__attr_"abs"__coeff_90',
'sensor_9__fft_coefficient__attr_"abs"__coeff_92',
'sensor_9__fft_coefficient__attr_"abs"__coeff_93',
'sensor_9__fft_coefficient__attr_"abs"__coeff_94',
'sensor_9__fft_coefficient__attr_"angle"__coeff_23',
'sensor_9__fft_coefficient__attr_"angle"__coeff_32',
'sensor_9__fft_coefficient__attr_"angle"__coeff_44',
'sensor_9__fft_coefficient__attr_"angle"__coeff_75',
'sensor_9__fft_coefficient__attr_"angle"__coeff_77',
'sensor_9__approximate_entropy__m_2__r_0.1',
'sensor_9__approximate_entropy__m_2__r_0.3',
'sensor_9__agg_linear_trend__attr_"stderr"__chunk_len_10__f_agg_"var"',
'sensor_9__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"max"',
'sensor_9__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"mean"',
'sensor_9__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"var"',
'sensor_9__number_crossing_m__m_0',
'sensor_9__ratio_beyond_r_sigma__r_0.5',
'sensor_9__permutation_entropy__dimension_3__tau_1',
'sensor_9__permutation_entropy__dimension_4__tau_1',
'sensor_8__abs_energy',
'sensor_8__mean_abs_change',
'sensor_8__standard_deviation',
'sensor_8__kurtosis',
'sensor_8__longest_strike_below_mean',
'sensor_8__longest_strike_above_mean',
'sensor_8__maximum',
'sensor_8__minimum',
'sensor_8__cid_ce__normalize_True',
'sensor_8__quantile__q_0.2',
'sensor_8__quantile__q_0.3',
'sensor_8__quantile__q_0.4',
'sensor_8__quantile__q_0.6',
'sensor_8__quantile__q_0.7',
'sensor_8__quantile__q_0.8',
'sensor_8__agg_autocorrelation__f_agg_"mean"__maxlag_40',
'sensor_8__number_cwt_peaks__n_1',
'sensor_8__number_cwt_peaks__n_5',
'sensor_8__number_peaks__n_1',
'sensor_8__number_peaks__n_3',
'sensor_8__number_peaks__n_5',
'sensor_8__number_peaks__n_10',
'sensor_8__number_peaks__n_50',
'sensor_8__binned_entropy__max_bins_10',
'sensor_8__spkt_welch_density__coeff_2',
'sensor_8__spkt_welch_density__coeff_5',
'sensor_8__spkt_welch_density__coeff_8',
'sensor_8__ar_coefficient__coeff_1__k_10',
'sensor_8__ar_coefficient__coeff_2__k_10',
'sensor_8__ar_coefficient__coeff_3__k_10',
'sensor_8__ar_coefficient__coeff_4__k_10',
'sensor_8__ar_coefficient__coeff_5__k_10',
'sensor_8__ar_coefficient__coeff_6__k_10',
'sensor_8__ar_coefficient__coeff_7__k_10',
'sensor_8__ar_coefficient__coeff_8__k_10',
'sensor_8__ar_coefficient__coeff_9__k_10',
'sensor_8__ar_coefficient__coeff_10__k_10',
'sensor_8__change_quantiles__f_agg_"mean"__isabs_True__qh_0.2__ql_0.0',
'sensor_8__change_quantiles__f_agg_"var"__isabs_False__qh_0.4__ql_0.2',
'sensor_8__change_quantiles__f_agg_"mean"__isabs_True__qh_0.4__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_True__qh_0.4__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_False__qh_0.6__ql_0.2',
'sensor_8__change_quantiles__f_agg_"mean"__isabs_True__qh_0.6__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_True__qh_0.6__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_False__qh_0.8__ql_0.2',
'sensor_8__change_quantiles__f_agg_"mean"__isabs_True__qh_0.8__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_True__qh_0.8__ql_0.2',
'sensor_8__change_quantiles__f_agg_"var"__isabs_False__qh_0.6__ql_0.4',
'sensor_8__change_quantiles__f_agg_"mean"__isabs_True__qh_0.6__ql_0.4',
'sensor_8__fft_coefficient__attr_"real"__coeff_31',
'sensor_8__fft_coefficient__attr_"real"__coeff_34',
'sensor_8__fft_coefficient__attr_"abs"__coeff_1',
'sensor_8__fft_coefficient__attr_"abs"__coeff_3',
'sensor_8__fft_coefficient__attr_"abs"__coeff_4',
'sensor_8__fft_coefficient__attr_"abs"__coeff_5',
'sensor_8__fft_coefficient__attr_"abs"__coeff_6',
'sensor_8__fft_coefficient__attr_"abs"__coeff_7',
'sensor_8__fft_coefficient__attr_"abs"__coeff_8',
'sensor_8__fft_coefficient__attr_"abs"__coeff_9',
'sensor_8__fft_coefficient__attr_"abs"__coeff_10',
'sensor_8__fft_coefficient__attr_"abs"__coeff_11',
'sensor_8__fft_coefficient__attr_"abs"__coeff_12',
'sensor_8__fft_coefficient__attr_"abs"__coeff_13',
'sensor_8__fft_coefficient__attr_"abs"__coeff_14',
'sensor_8__fft_coefficient__attr_"abs"__coeff_15',
'sensor_8__fft_coefficient__attr_"abs"__coeff_16',
'sensor_8__fft_coefficient__attr_"abs"__coeff_17',
'sensor_8__fft_coefficient__attr_"abs"__coeff_18',
'sensor_8__fft_coefficient__attr_"abs"__coeff_19',
'sensor_8__fft_coefficient__attr_"abs"__coeff_20',
'sensor_8__fft_coefficient__attr_"abs"__coeff_21',
'sensor_8__fft_coefficient__attr_"abs"__coeff_22',
'sensor_8__fft_coefficient__attr_"abs"__coeff_23',
'sensor_8__fft_coefficient__attr_"abs"__coeff_24',
'sensor_8__fft_coefficient__attr_"abs"__coeff_25',
'sensor_8__fft_coefficient__attr_"abs"__coeff_26',
'sensor_8__fft_coefficient__attr_"abs"__coeff_27',
'sensor_8__fft_coefficient__attr_"abs"__coeff_28',
'sensor_8__fft_coefficient__attr_"abs"__coeff_29',
'sensor_8__fft_coefficient__attr_"abs"__coeff_30',
'sensor_8__fft_coefficient__attr_"abs"__coeff_31',
'sensor_8__fft_coefficient__attr_"abs"__coeff_32',
'sensor_8__fft_coefficient__attr_"abs"__coeff_33',
'sensor_8__fft_coefficient__attr_"abs"__coeff_34',
'sensor_8__fft_coefficient__attr_"abs"__coeff_35',
'sensor_8__fft_coefficient__attr_"abs"__coeff_36',
'sensor_8__fft_coefficient__attr_"abs"__coeff_37',
'sensor_8__fft_coefficient__attr_"abs"__coeff_38',
'sensor_8__fft_coefficient__attr_"abs"__coeff_39',
'sensor_8__fft_coefficient__attr_"abs"__coeff_40',
'sensor_8__fft_coefficient__attr_"abs"__coeff_41',
'sensor_8__fft_coefficient__attr_"abs"__coeff_42',
'sensor_8__fft_coefficient__attr_"abs"__coeff_43',
'sensor_8__fft_coefficient__attr_"abs"__coeff_44',
'sensor_8__fft_coefficient__attr_"abs"__coeff_45',
'sensor_8__fft_coefficient__attr_"abs"__coeff_46',
'sensor_8__fft_coefficient__attr_"abs"__coeff_47',
'sensor_8__fft_coefficient__attr_"abs"__coeff_48',
'sensor_8__fft_coefficient__attr_"abs"__coeff_49',
'sensor_8__fft_coefficient__attr_"abs"__coeff_50',
'sensor_8__fft_coefficient__attr_"abs"__coeff_83',
'sensor_8__value_count__value_1',
'sensor_8__value_count__value_-1',
'sensor_8__approximate_entropy__m_2__r_0.1',
'sensor_8__approximate_entropy__m_2__r_0.3',
'sensor_8__approximate_entropy__m_2__r_0.5',
'sensor_8__agg_linear_trend__attr_"intercept"__chunk_len_50__f_agg_"max"',
'sensor_8__agg_linear_trend__attr_"intercept"__chunk_len_50__f_agg_"min"',
'sensor_8__agg_linear_trend__attr_"intercept"__chunk_len_50__f_agg_"var"',
'sensor_8__agg_linear_trend__attr_"stderr"__chunk_len_5__f_agg_"var"',
'sensor_8__agg_linear_trend__attr_"stderr"__chunk_len_10__f_agg_"var"',
'sensor_8__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"max"',
'sensor_8__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"mean"',
'sensor_8__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"var"',
'sensor_8__number_crossing_m__m_0',
'sensor_8__ratio_beyond_r_sigma__r_0.5',
'sensor_8__permutation_entropy__dimension_3__tau_1',
'sensor_3__abs_energy',
'sensor_3__standard_deviation',
'sensor_3__kurtosis',
'sensor_3__longest_strike_below_mean',
'sensor_3__longest_strike_above_mean',
'sensor_3__maximum',
'sensor_3__cid_ce__normalize_True',
'sensor_3__quantile__q_0.2',
'sensor_3__quantile__q_0.4',
'sensor_3__quantile__q_0.6',
'sensor_3__quantile__q_0.7',
'sensor_3__agg_autocorrelation__f_agg_"mean"__maxlag_40',
'sensor_3__agg_autocorrelation__f_agg_"median"__maxlag_40',
'sensor_3__number_cwt_peaks__n_1',
'sensor_3__number_cwt_peaks__n_5',
'sensor_3__number_peaks__n_1',
'sensor_3__number_peaks__n_3',
'sensor_3__number_peaks__n_5',
'sensor_3__number_peaks__n_10',
'sensor_3__number_peaks__n_50',
'sensor_3__binned_entropy__max_bins_10',
'sensor_3__spkt_welch_density__coeff_2',
'sensor_3__spkt_welch_density__coeff_5',
'sensor_3__spkt_welch_density__coeff_8',
'sensor_3__ar_coefficient__coeff_1__k_10',
'sensor_3__ar_coefficient__coeff_2__k_10',
'sensor_3__ar_coefficient__coeff_3__k_10',
'sensor_3__ar_coefficient__coeff_4__k_10',
'sensor_3__ar_coefficient__coeff_5__k_10',
'sensor_3__ar_coefficient__coeff_6__k_10',
'sensor_3__ar_coefficient__coeff_7__k_10',
'sensor_3__ar_coefficient__coeff_8__k_10',
'sensor_3__ar_coefficient__coeff_9__k_10',
'sensor_3__change_quantiles__f_agg_"var"__isabs_False__qh_0.6__ql_0.4',
'sensor_3__fft_coefficient__attr_"real"__coeff_11',
'sensor_3__fft_coefficient__attr_"real"__coeff_12',
'sensor_3__fft_coefficient__attr_"real"__coeff_13',
'sensor_3__fft_coefficient__attr_"real"__coeff_14',
'sensor_3__fft_coefficient__attr_"imag"__coeff_1',
'sensor_3__fft_coefficient__attr_"imag"__coeff_11',
'sensor_3__fft_coefficient__attr_"imag"__coeff_12',
'sensor_3__fft_coefficient__attr_"imag"__coeff_13',
'sensor_3__fft_coefficient__attr_"imag"__coeff_14',
'sensor_3__fft_coefficient__attr_"abs"__coeff_0',
'sensor_3__fft_coefficient__attr_"abs"__coeff_1',
'sensor_3__fft_coefficient__attr_"abs"__coeff_2',
'sensor_3__fft_coefficient__attr_"abs"__coeff_3',
'sensor_3__fft_coefficient__attr_"abs"__coeff_4',
'sensor_3__fft_coefficient__attr_"abs"__coeff_5',
'sensor_3__fft_coefficient__attr_"abs"__coeff_6',
'sensor_3__fft_coefficient__attr_"abs"__coeff_7',
'sensor_3__fft_coefficient__attr_"abs"__coeff_8',
'sensor_3__fft_coefficient__attr_"abs"__coeff_9',
'sensor_3__fft_coefficient__attr_"abs"__coeff_10',
'sensor_3__fft_coefficient__attr_"abs"__coeff_11',
'sensor_3__fft_coefficient__attr_"abs"__coeff_12',
'sensor_3__fft_coefficient__attr_"abs"__coeff_13',
'sensor_3__fft_coefficient__attr_"abs"__coeff_14',
'sensor_3__fft_coefficient__attr_"abs"__coeff_15',
'sensor_3__fft_coefficient__attr_"abs"__coeff_16',
'sensor_3__fft_coefficient__attr_"abs"__coeff_17',
'sensor_3__fft_coefficient__attr_"abs"__coeff_18',
'sensor_3__fft_coefficient__attr_"abs"__coeff_19',
'sensor_3__fft_coefficient__attr_"abs"__coeff_20',
'sensor_3__fft_coefficient__attr_"abs"__coeff_21',
'sensor_3__fft_coefficient__attr_"abs"__coeff_22',
'sensor_3__fft_coefficient__attr_"abs"__coeff_23',
'sensor_3__fft_coefficient__attr_"abs"__coeff_24',
'sensor_3__fft_coefficient__attr_"abs"__coeff_25',
'sensor_3__fft_coefficient__attr_"abs"__coeff_26',
'sensor_3__fft_coefficient__attr_"abs"__coeff_27',
'sensor_3__fft_coefficient__attr_"abs"__coeff_28',
'sensor_3__fft_coefficient__attr_"abs"__coeff_29',
'sensor_3__fft_coefficient__attr_"abs"__coeff_30',
'sensor_3__fft_coefficient__attr_"abs"__coeff_31',
'sensor_3__fft_coefficient__attr_"abs"__coeff_32',
'sensor_3__fft_coefficient__attr_"abs"__coeff_33',
'sensor_3__fft_coefficient__attr_"abs"__coeff_34',
'sensor_3__fft_coefficient__attr_"abs"__coeff_35',
'sensor_3__fft_coefficient__attr_"abs"__coeff_36',
'sensor_3__fft_coefficient__attr_"abs"__coeff_37',
'sensor_3__fft_coefficient__attr_"abs"__coeff_38',
'sensor_3__fft_coefficient__attr_"abs"__coeff_39',
'sensor_3__fft_coefficient__attr_"abs"__coeff_40',
'sensor_3__fft_coefficient__attr_"abs"__coeff_41',
'sensor_3__fft_coefficient__attr_"abs"__coeff_42',
'sensor_3__fft_coefficient__attr_"abs"__coeff_43',
'sensor_3__fft_coefficient__attr_"abs"__coeff_44',
'sensor_3__fft_coefficient__attr_"abs"__coeff_45',
'sensor_3__fft_coefficient__attr_"abs"__coeff_46',
'sensor_3__fft_coefficient__attr_"abs"__coeff_47',
'sensor_3__fft_coefficient__attr_"abs"__coeff_48',
'sensor_3__fft_coefficient__attr_"abs"__coeff_49',
'sensor_3__fft_coefficient__attr_"abs"__coeff_53',
'sensor_3__fft_coefficient__attr_"abs"__coeff_72',
'sensor_3__fft_coefficient__attr_"abs"__coeff_77',
'sensor_3__fft_coefficient__attr_"abs"__coeff_84',
'sensor_3__fft_coefficient__attr_"abs"__coeff_86',
'sensor_3__fft_coefficient__attr_"abs"__coeff_88',
'sensor_3__fft_coefficient__attr_"abs"__coeff_89',
'sensor_3__fft_coefficient__attr_"abs"__coeff_94',
'sensor_3__value_count__value_1',
'sensor_3__value_count__value_-1',
'sensor_3__approximate_entropy__m_2__r_0.1',
'sensor_3__approximate_entropy__m_2__r_0.3',
'sensor_3__approximate_entropy__m_2__r_0.5',
'sensor_3__agg_linear_trend__attr_"slope"__chunk_len_5__f_agg_"mean"',
'sensor_3__agg_linear_trend__attr_"stderr"__chunk_len_5__f_agg_"var"',
'sensor_3__agg_linear_trend__attr_"stderr"__chunk_len_10__f_agg_"var"',
'sensor_3__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"max"',
'sensor_3__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"mean"',
'sensor_3__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"var"',
'sensor_3__number_crossing_m__m_0',
'sensor_3__ratio_beyond_r_sigma__r_0.5',
'sensor_3__permutation_entropy__dimension_3__tau_1',
'sensor_3__permutation_entropy__dimension_4__tau_1',
'sensor_5__mean_abs_change',
'sensor_5__longest_strike_below_mean',
'sensor_5__longest_strike_above_mean',
'sensor_5__cid_ce__normalize_True',
'sensor_5__cid_ce__normalize_False',
'sensor_5__number_cwt_peaks__n_1',
'sensor_5__number_cwt_peaks__n_5',
'sensor_5__number_peaks__n_1',
'sensor_5__number_peaks__n_3',
'sensor_5__number_peaks__n_5',
'sensor_5__number_peaks__n_10',
'sensor_5__spkt_welch_density__coeff_2',
'sensor_5__spkt_welch_density__coeff_5',
'sensor_5__spkt_welch_density__coeff_8',
'sensor_5__ar_coefficient__coeff_1__k_10',
'sensor_5__ar_coefficient__coeff_2__k_10',
'sensor_5__ar_coefficient__coeff_3__k_10',
'sensor_5__ar_coefficient__coeff_4__k_10',
'sensor_5__ar_coefficient__coeff_5__k_10',
'sensor_5__ar_coefficient__coeff_6__k_10',
'sensor_5__ar_coefficient__coeff_7__k_10',
'sensor_5__ar_coefficient__coeff_8__k_10',
'sensor_5__ar_coefficient__coeff_9__k_10',
'sensor_5__ar_coefficient__coeff_10__k_10',
'sensor_5__change_quantiles__f_agg_"mean"__isabs_True__qh_0.6__ql_0.0',
'sensor_5__change_quantiles__f_agg_"var"__isabs_False__qh_1.0__ql_0.0',
'sensor_5__change_quantiles__f_agg_"var"__isabs_False__qh_0.8__ql_0.2',
'sensor_5__change_quantiles__f_agg_"mean"__isabs_True__qh_0.8__ql_0.2',
'sensor_5__fft_coefficient__attr_"real"__coeff_11',
'sensor_5__fft_coefficient__attr_"real"__coeff_12',
'sensor_5__fft_coefficient__attr_"real"__coeff_13',
'sensor_5__fft_coefficient__attr_"imag"__coeff_11',
'sensor_5__fft_coefficient__attr_"imag"__coeff_12',
'sensor_5__fft_coefficient__attr_"imag"__coeff_13',
'sensor_5__fft_coefficient__attr_"abs"__coeff_4',
'sensor_5__fft_coefficient__attr_"abs"__coeff_5',
'sensor_5__fft_coefficient__attr_"abs"__coeff_6',
'sensor_5__fft_coefficient__attr_"abs"__coeff_7',
'sensor_5__fft_coefficient__attr_"abs"__coeff_8',
'sensor_5__fft_coefficient__attr_"abs"__coeff_9',
'sensor_5__fft_coefficient__attr_"abs"__coeff_10',
'sensor_5__fft_coefficient__attr_"abs"__coeff_11',
'sensor_5__fft_coefficient__attr_"abs"__coeff_12',
'sensor_5__fft_coefficient__attr_"abs"__coeff_13',
'sensor_5__fft_coefficient__attr_"abs"__coeff_14',
'sensor_5__fft_coefficient__attr_"abs"__coeff_15',
'sensor_5__fft_coefficient__attr_"abs"__coeff_16',
'sensor_5__fft_coefficient__attr_"abs"__coeff_17',
'sensor_5__fft_coefficient__attr_"abs"__coeff_18',
'sensor_5__fft_coefficient__attr_"abs"__coeff_19',
'sensor_5__fft_coefficient__attr_"abs"__coeff_20',
'sensor_5__fft_coefficient__attr_"abs"__coeff_21',
'sensor_5__fft_coefficient__attr_"abs"__coeff_22',
'sensor_5__fft_coefficient__attr_"abs"__coeff_23',
'sensor_5__fft_coefficient__attr_"abs"__coeff_24',
'sensor_5__fft_coefficient__attr_"abs"__coeff_25',
'sensor_5__fft_coefficient__attr_"abs"__coeff_26',
'sensor_5__fft_coefficient__attr_"abs"__coeff_27',
'sensor_5__fft_coefficient__attr_"abs"__coeff_28',
'sensor_5__fft_coefficient__attr_"abs"__coeff_29',
'sensor_5__fft_coefficient__attr_"abs"__coeff_30',
'sensor_5__fft_coefficient__attr_"abs"__coeff_31',
'sensor_5__fft_coefficient__attr_"abs"__coeff_32',
'sensor_5__value_count__value_1',
'sensor_5__value_count__value_-1',
'sensor_5__approximate_entropy__m_2__r_0.1',
'sensor_5__approximate_entropy__m_2__r_0.3',
'sensor_5__approximate_entropy__m_2__r_0.5',
'sensor_5__agg_linear_trend__attr_"stderr"__chunk_len_50__f_agg_"mean"',
'sensor_5__number_crossing_m__m_0',
'sensor_5__permutation_entropy__dimension_3__tau_1'
]<define_variables>
train_data.isnull().values.any()
features = [re.sub('[^A-Za-z0-9_]+', '_', feature)for feature in features]<drop_column>
le = LabelEncoder()
target['surface'] = le.fit_transform(target['surface'] )
seg_id_test = test_df['segment_id']
x_test = test_df.drop(['segment_id'], axis=1)[features]<normalization>
target['surface'].value_counts()
train, label = get_train_dataset(train_df, labels_df)
 train = train[features]
test_df = test_df[features + ['segment_id']]
scaler = MinMaxScaler().fit(pd.concat([train, x_test]))
x_test = pd.DataFrame(scaler.transform(x_test))
train = pd.DataFrame(scaler.transform(train))
x_test.columns = features
train.columns = features<split>
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import StratifiedKFold
x_train, x_val, y_train, y_val = train_test_split(train, label, random_state=786, test_size=0.2, shuffle=False )<init_hyperparams>
folds = StratifiedKFold(n_splits=10, shuffle=True, random_state=42)
 predicted = np.zeros(( test_data.shape[0],9))
measured= np.zeros(( train_data.shape[0]))
score = 0
params = {'application':'regression',
'boosting ': 'dart',
'num_iterations':8000,
'learning_rate':0.03,
'num_leaves': 45,
'extra_trees': True,
'feature_fraction':0.8,
'bagging_fraction':0.9,
'lambda_l1':0.1,
'lambda_l2':0.1,
'min_split_gain':0.01,
'early_stopping_round':100,
'max_depth':6,
'min_child_weight':40,
'n_estimators': 400,
'metric':'mse',
'verbosity': -1}<train_model>
for times,(trn_idx,val_idx)in enumerate(folds.split(train_data.values,target['surface'].values)) :
rf = RandomForestClassifier(n_estimators=500,n_jobs = -1)
 rf.fit(train_data.iloc[trn_idx],target['surface'][trn_idx])
 measured[val_idx] = rf.predict(train_data.iloc[val_idx])
 predicted += rf.predict_proba(test_data)/folds.n_splits
score += rf.score(train_data.iloc[val_idx],target['surface'][val_idx])
 print("Fold: {} score: {}".format(times,rf.score(train_data.iloc[val_idx],target['surface'][val_idx])))
 gc.collect()
lgb_first = LGBMRegressor(**params)
 lgb_first.fit(x_train, y_train, eval_set=(x_val, y_val))
val_preds = lgb_first.predict(x_val )<create_dataframe>
print('Avg.accuracy',score /folds.n_splits )
<create_dataframe><EOS> 
submission['surface'] = le.inverse_transform(predicted.argmax(axis=1))
submission.to_csv('submission_92.csv',index=False)
 submission.head()