In [1]:
# HMM smoother
In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
import os
from hmmlearn import hmm
from sklearn.ensemble import RandomForestClassifier
from sklearn import cross_validation
from sklearn.cross_validation import KFold
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.grid_search import GridSearchCV, RandomizedSearchCV
from sklearn.preprocessing import PolynomialFeatures
from collections import deque
from itertools import islice
from wrangle_updated import trial
from utilities import convert_to_words, get_position_stats, combine_csv, resolve_acc_gyro, blank_filter, concat_data
TIME_SEQUENCE_LENGTH = 50
DIR = os.path.dirname(os.path.realpath('__file__'))
polynomial_features = PolynomialFeatures(interaction_only=False, include_bias=True, degree=3)
In [11]:
def root_sum_square(x, y, z):
sum = ((x**2)+(y**2)+(z**2))
rss = math.sqrt(sum)
return rss
def root_mean_square(x, y, z):
mean = ((x**2)+(y**2)+(z**2))/3
rss = math.sqrt(mean)
return rss
def tiltx(x, y, z):
try:
prep = (x/(math.sqrt((y**2)+(z**2))))
tilt = math.atan(prep)
except ZeroDivisionError:
tilt = 0
return tilt
def tilty(x, y, z):
try:
prep = (y/(math.sqrt((x**2)+(z**2))))
tilt = math.atan(prep)
except ZeroDivisionError:
tilt = 0
return tilt
def max_min_diff(max, min):
diff = max - min
return diff
def magnitude(x, y, z):
magnitude = x + y + z
return magnitude
def create_features(df, _window=50):
accel_x = df['ACCEL_X'].astype(float)
accel_y = df['ACCEL_Y'].astype(float)
accel_z = df['ACCEL_Z'].astype(float)
gyro_x = df['GYRO_X'].astype(float)
gyro_y = df['GYRO_Y'].astype(float)
gyro_z = df['GYRO_Z'].astype(float)
df2 = pd.DataFrame()
# Capture stand state here, then average later
df2['stand'] = df['stand'].astype(float)
TIME_SEQUENCE_LENGTH = _window
# Basics
df2['ACCEL_X'] = pd.rolling_mean(accel_x, TIME_SEQUENCE_LENGTH-2, center=True)
df2['ACCEL_Y'] = pd.rolling_mean(accel_y, TIME_SEQUENCE_LENGTH-2, center=True)
df2['ACCEL_Z'] = pd.rolling_mean(accel_z, TIME_SEQUENCE_LENGTH-2, center=True)
df2['GYRO_X'] = pd.rolling_mean(gyro_x, TIME_SEQUENCE_LENGTH-2, center=True)
df2['GYRO_Y'] = pd.rolling_mean(gyro_y, TIME_SEQUENCE_LENGTH-2, center=True)
df2['GYRO_Z'] = pd.rolling_mean(gyro_z, TIME_SEQUENCE_LENGTH-2, center=True)
# standing up detection
df2['avg_stand'] = pd.rolling_mean(df2['stand'], TIME_SEQUENCE_LENGTH-2, center=True)
print df2['avg_stand']
# round standing up as we need it to be either '0' or '1' for training later
df2['avg_stand'] = df2['avg_stand'].apply(lambda x: math.ceil(x))
print df2['avg_stand']
ol_upper = _window/2
ol_lower = ol_upper-1
new_df = df2[ol_lower::ol_upper] # 50% overlap with 30
return new_df
# Test method:
# data = np.array([np.mean(training_data.ACCEL_X[0:30]), np.mean(training_data.ACCEL_X[30:45]), np.mean(training_data.ACCEL_X[30:60])])
# desired_df = pd.DataFrame(data, columns=columns)
# print desired_df
In [12]:
def set_state(df, state):
"""set the state for training"""
if state == 'your_mount':
df['state'] = 0
elif state == 'your_side_control':
df['state'] = 1
elif state =='your_closed_guard':
df['state'] = 2
elif state =='your_back_control':
df['state'] = 3
elif state =='opponent_mount_or_sc':
df['state'] = 4
elif state =='opponent_closed_guard':
df['state'] = 5
elif state == 'opponent_back_control':
df['state'] = 6
elif state =='non_jj':
df['state'] = 7
return df
In [13]:
def set_stand_state(df, stand_state):
if (stand_state == 1):
df['stand'] = 1
else:
df['stand'] = 0
print df
return df
In [14]:
def combine_setState_createFeatures(directory, state, window=50, stand=0):
"""
convenience method to combine three steps in one function:
(1) combine multiple csv files, (2) set their movement state for training,
(3) combine to create time sequences and add features
"""
combined_data = combine_csv(directory)
combined_data_updated = set_state(combined_data, state)
combined_data_updated2 = set_stand_state(combined_data_updated, stand)
feature_training_data = create_features(combined_data_updated2, window)
ready_training_data = set_state(feature_training_data, state)
return ready_training_data
In [15]:
def prep(window=30):
"""prepare the raw sensor data"""
#1 Your mount
ymount_td = combine_setState_createFeatures('your_mount_raw_data', 'your_mount', window, 0)
#2 Your side control
ysc_td = combine_setState_createFeatures('your_side_control_raw_data', 'your_side_control', window, 0)
#3 Your closed guard
ycg_td = combine_setState_createFeatures('your_closed_guard_raw_data', 'your_closed_guard', window, 0)
#4 Your back control
ybc_td = combine_setState_createFeatures('your_back_control_raw_data', 'your_back_control', window, 0)
#5 Opponent mount or opponent side control
omountsc_td = combine_setState_createFeatures('opponent_mount_and_opponent_side_control_raw_data', 'opponent_mount_or_sc', window, 0)
#6 Opponent closed guard
ocg_td = combine_setState_createFeatures('opponent_closed_guard_raw_data', 'opponent_closed_guard', window, 0)
#7 Opponent back control
obc_td = combine_setState_createFeatures('opponent_back_control_raw_data', 'opponent_back_control', window, 0)
#8 "Non jiu-jitsu" motion
nonjj_td = combine_setState_createFeatures('non_jj_raw_data', 'non_jj', window, 0)
#9 "stand up" motion
stand_up_td = combine_setState_createFeatures('standing_up_raw_data', 'opponent_closed_guard', window, 1)
training_data = concat_data([ymount_td, ysc_td, ycg_td, ybc_td, omountsc_td, ocg_td, obc_td, nonjj_td])
# remove NaN
training_data = blank_filter(training_data)
return training_data
In [16]:
def prep_test(el_file):
el_file = 'data/test_cases/' + el_file
df = pd.DataFrame()
df = pd.read_csv(el_file, index_col=None, header=0)
df = resolve_acc_gyro(df)
df = create_features(df)
test_data = blank_filter(df)
return test_data
In [17]:
def test_model_stand(df_train):
"""check model accuracy"""
y = df_train['stand'].values
X = df_train.drop(['stand', 'state', 'index'], axis=1)
if X.isnull().values.any() == False:
rf = RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',
max_depth=None, max_features='auto', max_leaf_nodes=None,
min_samples_leaf=8, min_samples_split=4,
min_weight_fraction_leaf=0.0, n_estimators=500, n_jobs=-1,
oob_score=False, random_state=None, verbose=0,
warm_start=False)
X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.1)
rf.fit(X_train, y_train)
rf_pred = rf.predict(X_test)
rf_scores = cross_validation.cross_val_score(
rf, X, df_train.state, cv=10, scoring='accuracy')
print 'rf prediction: {}'.format(accuracy_score(y_test, rf_pred))
print("Random Forest Accuracy: %0.2f (+/- %0.2f)" % (rf_scores.mean(), rf_scores.std() * 2))
importances = rf.feature_importances_
std = np.std([tree.feature_importances_ for tree in rf.estimators_],
axis=0)
indices = np.argsort(importances)[::-1]
# Print the feature ranking
print("Feature ranking:")
for f in range(X.shape[1]):
print("%d. feature %s (%f)" % (f + 1, X.columns[indices[f]], importances[indices[f]]))
In [18]:
def test_model(df_train):
"""check model accuracy"""
y = df_train['state'].values
X = df_train.drop(['state', 'index'], axis=1)
if X.isnull().values.any() == False:
rf = RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',
max_depth=None, max_features='auto', max_leaf_nodes=None,
min_samples_leaf=8, min_samples_split=4,
min_weight_fraction_leaf=0.0, n_estimators=500, n_jobs=-1,
oob_score=False, random_state=None, verbose=0,
warm_start=False)
X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.1)
rf.fit(X_train, y_train)
rf_pred = rf.predict(X_test)
rf_scores = cross_validation.cross_val_score(
rf, X, df_train.state, cv=10, scoring='accuracy')
print 'rf prediction: {}'.format(accuracy_score(y_test, rf_pred))
print("Random Forest Accuracy: %0.2f (+/- %0.2f)" % (rf_scores.mean(), rf_scores.std() * 2))
importances = rf.feature_importances_
std = np.std([tree.feature_importances_ for tree in rf.estimators_],
axis=0)
indices = np.argsort(importances)[::-1]
# Print the feature ranking
print("Feature ranking:")
for f in range(X.shape[1]):
print("%d. feature %s (%f)" % (f + 1, X.columns[indices[f]], importances[indices[f]]))
In [19]:
training_data50 = prep(50)
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/DIO_YMOUNT.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:33:12.67 -0.358 0.636 0.721 2016-03-26 13:33:12.00 21.829 -123.049 -2.622 0 0
1 1 2016-03-26 13:33:12.67 -0.071 -0.115 -1.280 2016-03-26 13:33:12.00 27.012 -63.902 -14.878 0 0
2 2 2016-03-26 13:33:12.67 0.333 0.322 -0.766 2016-03-26 13:33:12.00 19.512 -82.317 -114.451 0 0
3 3 2016-03-26 13:33:12.67 0.015 -0.092 -0.526 2016-03-26 13:33:12.00 -201.768 -148.415 -157.561 0 0
4 4 2016-03-26 13:33:12.67 -0.179 -0.199 -0.809 2016-03-26 13:33:12.00 -128.841 121.524 -129.939 0 0
5 5 2016-03-26 13:33:12.67 -0.010 -0.193 -1.108 2016-03-26 13:33:12.00 9.146 122.622 9.817 0 0
6 6 2016-03-26 13:33:12.67 0.054 -0.190 -1.247 2016-03-26 13:33:12.00 86.159 157.012 79.756 0 0
7 7 2016-03-26 13:33:12.67 -0.081 -0.420 -1.198 2016-03-26 13:33:12.00 16.463 82.622 -8.841 0 0
8 8 2016-03-26 13:33:12.67 -0.299 -0.408 -1.229 2016-03-26 13:33:12.00 -3.841 14.207 -17.378 0 0
9 9 2016-03-26 13:33:12.67 -0.360 -0.201 -0.894 2016-03-26 13:33:13.00 19.390 -39.390 -28.537 0 0
10 10 2016-03-26 13:33:12.67 -0.211 -0.048 -0.570 2016-03-26 13:33:13.00 27.744 -21.159 0.915 0 0
11 11 2016-03-26 13:33:12.67 -0.288 -0.029 -0.955 2016-03-26 13:33:13.00 12.622 -32.805 -1.341 0 0
12 12 2016-03-26 13:33:12.67 -0.383 -0.008 -0.971 2016-03-26 13:33:13.00 5.976 -39.085 -20.061 0 0
13 13 2016-03-26 13:33:12.67 -0.406 -0.162 -0.805 2016-03-26 13:33:13.00 18.963 1.220 2.561 0 0
14 14 2016-03-26 13:33:12.68 -0.349 -0.013 -1.037 2016-03-26 13:33:13.00 -12.744 -17.195 22.256 0 0
15 15 2016-03-26 13:33:12.68 -0.527 0.065 -1.104 2016-03-26 13:33:13.00 -45.427 -70.000 24.695 0 0
16 16 2016-03-26 13:33:12.68 -0.564 0.061 -0.850 2016-03-26 13:33:13.00 -8.476 -44.756 26.220 0 0
17 17 2016-03-26 13:33:12.68 -0.636 0.075 -0.802 2016-03-26 13:33:13.00 -8.780 -16.402 45.854 0 0
18 18 2016-03-26 13:33:12.68 -0.613 0.103 -0.805 2016-03-26 13:33:13.00 -65.854 -61.768 38.415 0 0
19 19 2016-03-26 13:33:12.68 -0.271 0.368 -0.947 2016-03-26 13:33:13.00 -75.488 -74.878 29.756 0 0
20 20 2016-03-26 13:33:12.68 -0.521 0.277 -0.853 2016-03-26 13:33:13.00 -24.207 -0.976 3.780 0 0
21 21 2016-03-26 13:33:12.68 -0.545 0.287 -0.898 2016-03-26 13:33:13.00 4.024 -29.878 -46.829 0 0
22 22 2016-03-26 13:33:12.68 -0.421 0.125 -0.978 2016-03-26 13:33:13.00 -0.549 -16.159 -22.927 0 0
23 23 2016-03-26 13:33:12.68 -0.408 -0.005 -0.533 2016-03-26 13:33:13.00 -33.598 -11.524 -44.634 0 0
24 24 2016-03-26 13:33:12.68 -0.304 -0.068 -0.863 2016-03-26 13:33:13.00 -29.146 8.963 -56.280 0 0
25 25 2016-03-26 13:33:12.68 -0.398 -0.079 -1.206 2016-03-26 13:33:13.00 -16.524 -8.598 -45.244 0 0
26 26 2016-03-26 13:33:12.68 -0.368 -0.035 -1.088 2016-03-26 13:33:13.00 22.378 12.012 -40.793 0 0
27 27 2016-03-26 13:33:12.68 -0.234 0.004 -0.950 2016-03-26 13:33:13.00 45.671 77.622 -21.037 0 0
28 28 2016-03-26 13:33:12.68 -0.207 0.200 -0.881 2016-03-26 13:33:13.00 -10.427 -14.817 -34.573 0 0
29 29 2016-03-26 13:33:12.69 -0.323 -0.155 -0.934 2016-03-26 13:33:13.00 -31.890 -34.085 -27.256 0 0
... ... ... ... ... ... ... ... ... ... ... ...
16210 2568 2016-03-12 14:04:58.36 -0.899 0.180 -0.160 2016-03-12 14:04:58.96 17.988 -37.927 -16.280 0 0
16211 2569 2016-03-12 14:04:58.36 -0.974 0.180 -0.264 2016-03-12 14:04:58.96 42.439 -24.634 -10.854 0 0
16212 2570 2016-03-12 14:04:58.36 -0.973 0.136 -0.166 2016-03-12 14:04:58.96 26.220 -15.122 -1.220 0 0
16213 2571 2016-03-12 14:04:58.36 -1.021 0.164 -0.085 2016-03-12 14:04:58.96 13.110 -28.293 16.098 0 0
16214 2572 2016-03-12 14:04:58.36 -1.034 0.120 -0.189 2016-03-12 14:04:58.96 30.793 -17.683 36.037 0 0
16215 2573 2016-03-12 14:04:58.36 -0.898 0.193 -0.115 2016-03-12 14:04:58.96 33.659 -10.549 37.256 0 0
16216 2574 2016-03-12 14:04:58.36 -0.902 0.167 -0.205 2016-03-12 14:04:58.96 29.024 -5.854 23.110 0 0
16217 2575 2016-03-12 14:04:58.36 -0.965 0.114 -0.245 2016-03-12 14:04:58.96 17.988 -22.256 17.317 0 0
16218 2576 2016-03-12 14:04:58.36 -0.977 0.156 -0.207 2016-03-12 14:04:58.96 26.524 -19.817 10.488 0 0
16219 2577 2016-03-12 14:04:58.36 -1.026 0.101 -0.257 2016-03-12 14:04:58.96 21.280 6.585 6.524 0 0
16220 2578 2016-03-12 14:04:58.36 -1.055 -0.042 -0.335 2016-03-12 14:04:58.96 8.963 -12.317 2.927 0 0
16221 2579 2016-03-12 14:04:58.36 -1.057 -0.042 -0.427 2016-03-12 14:04:58.96 24.451 11.890 -8.049 0 0
16222 2580 2016-03-12 14:04:58.36 -1.042 -0.002 -0.297 2016-03-12 14:04:58.96 10.366 14.695 -7.622 0 0
16223 2581 2016-03-12 14:04:58.36 -1.006 -0.052 -0.353 2016-03-12 14:04:58.96 8.232 25.305 -10.915 0 0
16224 2582 2016-03-12 14:04:58.36 -1.006 -0.028 -0.438 2016-03-12 14:04:58.96 18.720 38.110 -15.915 0 0
16225 2583 2016-03-12 14:04:58.36 -0.952 -0.022 -0.451 2016-03-12 14:04:58.96 11.524 39.146 -16.707 0 0
16226 2584 2016-03-12 14:04:58.36 -0.925 -0.033 -0.450 2016-03-12 14:04:58.96 5.732 34.756 -19.207 0 0
16227 2585 2016-03-12 14:04:58.36 -0.877 -0.012 -0.511 2016-03-12 14:04:58.96 1.585 40.183 -20.976 0 0
16228 2586 2016-03-12 14:04:58.36 -0.898 -0.009 -0.593 2016-03-12 14:04:58.96 7.317 40.854 -22.927 0 0
16229 2587 2016-03-12 14:04:58.37 -0.927 0.131 -0.613 2016-03-12 14:04:58.96 -3.171 27.195 -19.207 0 0
16230 2588 2016-03-12 14:04:58.37 -0.894 0.101 -0.598 2016-03-12 14:04:58.96 -12.805 21.890 -18.720 0 0
16231 2589 2016-03-12 14:04:58.37 -0.884 0.100 -0.548 2016-03-12 14:04:58.96 -25.183 18.171 -14.756 0 0
16232 2590 2016-03-12 14:04:58.37 -0.900 0.013 -0.681 2016-03-12 14:04:58.96 -22.012 12.073 -13.598 0 0
16233 2591 2016-03-12 14:04:58.37 -0.826 0.043 -0.607 2016-03-12 14:04:58.96 -31.829 9.817 -10.610 0 0
16234 2592 NaN NaN NaN NaN 2016-03-12 14:04:58.96 -32.195 15.122 -6.585 0 0
16235 2593 NaN NaN NaN NaN 2016-03-12 14:04:58.96 -16.951 17.134 -1.341 0 0
16236 2594 NaN NaN NaN NaN 2016-03-12 14:04:58.96 -3.476 20.549 17.256 0 0
16237 2595 NaN NaN NaN NaN 2016-03-12 14:04:58.96 10.549 14.634 27.744 0 0
16238 2596 NaN NaN NaN NaN 2016-03-12 14:04:58.96 1.951 3.659 34.634 0 0
16239 2597 NaN NaN NaN NaN 2016-03-12 14:04:58.96 13.963 8.110 36.585 0 0
[16240 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
16210 0
16211 0
16212 0
16213 0
16214 0
16215 0
16216 0
16217 NaN
16218 NaN
16219 NaN
16220 NaN
16221 NaN
16222 NaN
16223 NaN
16224 NaN
16225 NaN
16226 NaN
16227 NaN
16228 NaN
16229 NaN
16230 NaN
16231 NaN
16232 NaN
16233 NaN
16234 NaN
16235 NaN
16236 NaN
16237 NaN
16238 NaN
16239 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
16210 0
16211 0
16212 0
16213 0
16214 0
16215 0
16216 0
16217 NaN
16218 NaN
16219 NaN
16220 NaN
16221 NaN
16222 NaN
16223 NaN
16224 NaN
16225 NaN
16226 NaN
16227 NaN
16228 NaN
16229 NaN
16230 NaN
16231 NaN
16232 NaN
16233 NaN
16234 NaN
16235 NaN
16236 NaN
16237 NaN
16238 NaN
16239 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/DIO_YSC.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:29:58.62 -0.646 -0.181 -0.770 2016-03-26 13:29:58.81 55.915 41.098 -11.829 1 0
1 1 2016-03-26 13:29:58.62 -0.841 -0.167 -0.888 2016-03-26 13:29:58.81 51.037 26.159 -10.976 1 0
2 2 2016-03-26 13:29:58.62 -0.788 -0.104 -0.893 2016-03-26 13:29:58.81 25.671 -28.110 -12.073 1 0
3 3 2016-03-26 13:29:58.62 -0.623 -0.141 -0.765 2016-03-26 13:29:58.81 -18.293 -49.512 6.829 1 0
4 4 2016-03-26 13:29:58.62 -0.512 -0.071 -0.807 2016-03-26 13:29:58.81 -46.098 -39.817 6.890 1 0
5 5 2016-03-26 13:29:58.62 -0.574 -0.069 -0.843 2016-03-26 13:29:58.81 -48.415 -81.646 -3.659 1 0
6 6 2016-03-26 13:29:58.62 -0.424 -0.068 -0.808 2016-03-26 13:29:58.81 -33.171 -128.293 -14.329 1 0
7 7 2016-03-26 13:29:58.62 -0.298 -0.133 -1.026 2016-03-26 13:29:58.81 -20.732 -62.805 -22.317 1 0
8 8 2016-03-26 13:29:58.62 -0.212 -0.249 -0.926 2016-03-26 13:29:58.81 -50.183 42.317 -13.354 1 0
9 9 2016-03-26 13:29:58.62 -0.110 -0.159 -0.926 2016-03-26 13:29:58.81 -37.805 90.427 -21.707 1 0
10 10 2016-03-26 13:29:58.62 -0.035 0.135 -0.896 2016-03-26 13:29:58.81 -22.927 121.585 -35.732 1 0
11 11 2016-03-26 13:29:58.62 -0.153 0.133 -0.959 2016-03-26 13:29:58.81 2.866 87.073 -36.524 1 0
12 12 2016-03-26 13:29:58.62 -0.227 0.002 -0.955 2016-03-26 13:29:58.81 -6.829 37.622 1.402 1 0
13 13 2016-03-26 13:29:58.62 -0.309 0.034 -1.001 2016-03-26 13:29:58.81 -24.756 86.463 11.220 1 0
14 14 2016-03-26 13:29:58.62 -0.301 0.084 -0.980 2016-03-26 13:29:58.81 -63.476 94.085 4.573 1 0
15 15 2016-03-26 13:29:58.62 -0.228 0.131 -1.041 2016-03-26 13:29:58.81 -70.549 51.524 -2.500 1 0
16 16 2016-03-26 13:29:58.62 -0.386 0.041 -0.878 2016-03-26 13:29:58.81 -45.976 14.268 5.305 1 0
17 17 2016-03-26 13:29:58.62 -0.512 0.082 -0.894 2016-03-26 13:29:58.81 -9.390 -15.854 -7.439 1 0
18 18 2016-03-26 13:29:58.62 -0.455 0.118 -0.841 2016-03-26 13:29:58.81 18.659 -24.939 -34.024 1 0
19 19 2016-03-26 13:29:58.62 -0.319 0.038 -0.884 2016-03-26 13:29:58.81 17.378 -24.695 -44.878 1 0
20 20 2016-03-26 13:29:58.62 -0.328 -0.124 -0.850 2016-03-26 13:29:58.81 31.707 -57.500 -2.561 1 0
21 21 2016-03-26 13:29:58.63 -0.600 -0.208 -0.866 2016-03-26 13:29:58.81 34.207 -64.634 27.073 1 0
22 22 2016-03-26 13:29:58.63 -0.664 -0.279 -0.900 2016-03-26 13:29:58.81 22.256 -54.634 12.805 1 0
23 23 2016-03-26 13:29:58.63 -0.679 -0.206 -0.838 2016-03-26 13:29:58.81 0.183 -5.732 2.561 1 0
24 24 2016-03-26 13:29:58.63 -0.589 -0.193 -0.839 2016-03-26 13:29:58.81 12.683 -25.488 -7.866 1 0
25 25 2016-03-26 13:29:58.63 -0.565 -0.110 -0.792 2016-03-26 13:29:58.81 14.268 -52.988 -30.671 1 0
26 26 2016-03-26 13:29:58.63 -0.440 0.047 -0.930 2016-03-26 13:29:58.81 -3.598 -5.671 -40.061 1 0
27 27 2016-03-26 13:29:58.63 -0.393 -0.027 -0.980 2016-03-26 13:29:58.81 5.061 33.780 -55.976 1 0
28 28 2016-03-26 13:29:58.63 -0.386 -0.133 -0.873 2016-03-26 13:29:58.82 -56.646 26.951 -12.500 1 0
29 29 2016-03-26 13:29:58.63 -0.434 -0.096 -0.890 2016-03-26 13:29:58.82 -26.463 15.000 19.146 1 0
... ... ... ... ... ... ... ... ... ... ... ...
9322 2493 2016-03-12 13:53:17.76 -0.375 -0.166 -0.946 2016-03-12 13:53:18.32 58.963 -26.280 -13.476 1 0
9323 2494 2016-03-12 13:53:17.76 -0.273 -0.228 -1.115 2016-03-12 13:53:18.32 25.793 -25.366 -4.268 1 0
9324 2495 2016-03-12 13:53:17.76 -0.276 -0.239 -1.172 2016-03-12 13:53:18.32 17.805 -13.537 0.793 1 0
9325 2496 2016-03-12 13:53:17.76 -0.694 -0.384 -1.174 2016-03-12 13:53:18.32 16.707 -1.220 -0.488 1 0
9326 2497 2016-03-12 13:53:17.76 -0.536 -0.201 -1.057 2016-03-12 13:53:18.32 18.902 5.610 -5.183 1 0
9327 2498 2016-03-12 13:53:17.76 -0.081 -0.157 -0.753 2016-03-12 13:53:18.32 21.402 5.305 -8.171 1 0
9328 2499 2016-03-12 13:53:17.76 -0.443 -0.370 -0.635 2016-03-12 13:53:18.32 14.573 5.061 -8.232 1 0
9329 2500 2016-03-12 13:53:17.76 -0.493 -0.455 -0.773 2016-03-12 13:53:18.32 15.244 11.585 -4.634 1 0
9330 2501 2016-03-12 13:53:17.76 -0.521 -0.370 -0.594 2016-03-12 13:53:18.32 13.476 0.366 -3.354 1 0
9331 2502 2016-03-12 13:53:17.76 -0.582 -0.724 -0.420 NaN NaN NaN NaN 1 0
9332 2503 2016-03-12 13:53:17.76 -0.685 -0.695 -0.274 NaN NaN NaN NaN 1 0
9333 2504 2016-03-12 13:53:17.76 -0.647 -0.560 -0.220 NaN NaN NaN NaN 1 0
9334 2505 2016-03-12 13:53:17.76 -0.678 -0.510 -0.064 NaN NaN NaN NaN 1 0
9335 2506 2016-03-12 13:53:17.76 -0.887 -0.690 -0.018 NaN NaN NaN NaN 1 0
9336 2507 2016-03-12 13:53:17.76 -0.792 -0.608 -0.073 NaN NaN NaN NaN 1 0
9337 2508 2016-03-12 13:53:17.76 -0.756 -0.611 -0.073 NaN NaN NaN NaN 1 0
9338 2509 2016-03-12 13:53:17.76 -0.779 -0.619 -0.007 NaN NaN NaN NaN 1 0
9339 2510 2016-03-12 13:53:17.77 -0.833 -0.573 0.075 NaN NaN NaN NaN 1 0
9340 2511 2016-03-12 13:53:17.77 -0.869 -0.651 0.097 NaN NaN NaN NaN 1 0
9341 2512 2016-03-12 13:53:17.77 -0.823 -0.670 0.140 NaN NaN NaN NaN 1 0
9342 2513 2016-03-12 13:53:17.77 -0.747 -0.626 0.172 NaN NaN NaN NaN 1 0
9343 2514 2016-03-12 13:53:17.77 -0.755 -0.433 0.396 NaN NaN NaN NaN 1 0
9344 2515 2016-03-12 13:53:17.77 -0.725 -0.525 0.336 NaN NaN NaN NaN 1 0
9345 2516 2016-03-12 13:53:17.77 -0.656 -0.585 0.273 NaN NaN NaN NaN 1 0
9346 2517 2016-03-12 13:53:17.77 -0.692 -0.620 0.258 NaN NaN NaN NaN 1 0
9347 2518 2016-03-12 13:53:17.77 -0.823 -0.662 0.314 NaN NaN NaN NaN 1 0
9348 2519 2016-03-12 13:53:17.77 -0.822 -0.558 0.316 NaN NaN NaN NaN 1 0
9349 2520 2016-03-12 13:53:17.77 -0.807 -0.453 0.350 NaN NaN NaN NaN 1 0
9350 2521 2016-03-12 13:53:17.77 -0.839 -0.525 0.444 NaN NaN NaN NaN 1 0
9351 2522 2016-03-12 13:53:17.77 -0.833 -0.617 0.514 NaN NaN NaN NaN 1 0
[9352 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
9322 0
9323 0
9324 0
9325 0
9326 0
9327 0
9328 0
9329 NaN
9330 NaN
9331 NaN
9332 NaN
9333 NaN
9334 NaN
9335 NaN
9336 NaN
9337 NaN
9338 NaN
9339 NaN
9340 NaN
9341 NaN
9342 NaN
9343 NaN
9344 NaN
9345 NaN
9346 NaN
9347 NaN
9348 NaN
9349 NaN
9350 NaN
9351 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
9322 0
9323 0
9324 0
9325 0
9326 0
9327 0
9328 0
9329 NaN
9330 NaN
9331 NaN
9332 NaN
9333 NaN
9334 NaN
9335 NaN
9336 NaN
9337 NaN
9338 NaN
9339 NaN
9340 NaN
9341 NaN
9342 NaN
9343 NaN
9344 NaN
9345 NaN
9346 NaN
9347 NaN
9348 NaN
9349 NaN
9350 NaN
9351 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/DIO_YCG.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:35:45.96 -0.198 -0.284 1.258 2016-03-26 13:35:46.36 -90.244 -95.427 -15.793 2 0
1 1 2016-03-26 13:35:45.96 -0.161 -0.292 1.031 2016-03-26 13:35:46.36 -85.305 -93.780 -10.976 2 0
2 2 2016-03-26 13:35:45.96 -0.240 -0.421 1.090 2016-03-26 13:35:46.36 -70.305 -79.695 -5.854 2 0
3 3 2016-03-26 13:35:45.96 0.201 -0.567 0.981 2016-03-26 13:35:46.36 -48.110 -77.805 5.305 2 0
4 4 2016-03-26 13:35:45.96 0.282 -0.669 0.791 2016-03-26 13:35:46.36 -2.561 -58.293 41.220 2 0
5 5 2016-03-26 13:35:45.96 0.013 -0.529 0.777 2016-03-26 13:35:46.36 -17.256 -42.073 20.183 2 0
6 6 2016-03-26 13:35:45.96 -0.195 -0.424 0.867 2016-03-26 13:35:46.36 -21.159 -12.683 7.378 2 0
7 7 2016-03-26 13:35:45.96 -0.182 -0.536 0.968 2016-03-26 13:35:46.36 29.695 -26.341 4.695 2 0
8 8 2016-03-26 13:35:45.96 -0.155 -0.401 0.963 2016-03-26 13:35:46.36 26.585 -16.524 -8.963 2 0
9 9 2016-03-26 13:35:45.96 -0.127 -0.344 1.004 2016-03-26 13:35:46.36 -18.293 14.878 -34.817 2 0
10 10 2016-03-26 13:35:45.96 -0.234 -0.354 0.969 2016-03-26 13:35:46.36 -16.890 23.659 -7.561 2 0
11 11 2016-03-26 13:35:45.96 -0.335 -0.516 0.900 2016-03-26 13:35:46.36 -3.293 23.415 23.232 2 0
12 12 2016-03-26 13:35:45.96 -0.405 -0.511 0.943 2016-03-26 13:35:46.36 4.512 20.305 29.207 2 0
13 13 2016-03-26 13:35:45.96 -0.423 -0.548 0.923 2016-03-26 13:35:46.36 0.915 26.768 24.085 2 0
14 14 2016-03-26 13:35:45.96 -0.274 -0.409 0.799 2016-03-26 13:35:46.36 -11.646 29.024 29.024 2 0
15 15 2016-03-26 13:35:45.96 -0.500 -0.293 0.807 2016-03-26 13:35:46.36 -28.049 25.488 41.280 2 0
16 16 2016-03-26 13:35:45.96 -0.562 -0.259 0.865 2016-03-26 13:35:46.36 -16.829 23.110 32.683 2 0
17 17 2016-03-26 13:35:45.96 -0.514 -0.232 0.869 2016-03-26 13:35:46.36 11.098 12.500 44.024 2 0
18 18 2016-03-26 13:35:45.96 -0.468 -0.085 0.988 2016-03-26 13:35:46.36 37.317 -12.988 67.866 2 0
19 19 2016-03-26 13:35:45.96 -0.267 0.055 0.955 2016-03-26 13:35:46.36 41.646 -5.976 54.146 2 0
20 20 2016-03-26 13:35:45.96 -0.378 -0.071 1.016 2016-03-26 13:35:46.36 32.012 -13.841 64.878 2 0
21 21 2016-03-26 13:35:45.96 -0.376 -0.165 0.940 2016-03-26 13:35:46.36 11.951 -24.268 74.451 2 0
22 22 2016-03-26 13:35:45.96 -0.172 -0.092 0.890 2016-03-26 13:35:46.36 11.402 -14.512 95.610 2 0
23 23 2016-03-26 13:35:45.96 -0.256 0.049 0.956 2016-03-26 13:35:46.36 9.695 1.524 100.183 2 0
24 24 2016-03-26 13:35:45.96 -0.253 0.024 0.967 2016-03-26 13:35:46.36 7.561 -19.573 74.817 2 0
25 25 2016-03-26 13:35:45.97 -0.083 0.236 1.098 2016-03-26 13:35:46.36 19.329 -5.671 98.354 2 0
26 26 2016-03-26 13:35:45.97 -0.101 0.299 1.193 2016-03-26 13:35:46.36 29.085 19.146 77.988 2 0
27 27 2016-03-26 13:35:45.97 -0.161 0.208 1.058 2016-03-26 13:35:46.36 44.207 -26.159 19.207 2 0
28 28 2016-03-26 13:35:45.97 -0.691 -0.009 1.077 2016-03-26 13:35:46.36 58.049 -51.829 1.098 2 0
29 29 2016-03-26 13:35:45.97 -0.055 0.145 0.917 2016-03-26 13:35:46.36 44.634 -46.037 -16.220 2 0
... ... ... ... ... ... ... ... ... ... ... ...
12790 831 2016-03-12 13:38:52.05 -0.137 -0.250 1.016 2016-03-12 13:38:52.25 -79.268 15.122 -36.585 2 0
12791 832 2016-03-12 13:38:52.05 -0.251 -0.154 0.975 2016-03-12 13:38:52.25 -68.232 17.622 -36.524 2 0
12792 833 2016-03-12 13:38:52.05 -0.291 -0.304 0.979 2016-03-12 13:38:52.25 -51.280 12.500 -38.780 2 0
12793 834 2016-03-12 13:38:52.05 -0.285 -0.360 0.923 2016-03-12 13:38:52.25 -43.171 17.256 -37.134 2 0
12794 835 2016-03-12 13:38:52.05 -0.316 -0.402 0.907 2016-03-12 13:38:52.25 -38.963 24.878 -33.963 2 0
12795 836 2016-03-12 13:38:52.05 -0.269 -0.363 0.947 2016-03-12 13:38:52.25 -33.963 27.012 -30.671 2 0
12796 837 2016-03-12 13:38:52.05 -0.237 -0.431 0.878 2016-03-12 13:38:52.25 -42.988 36.524 -28.049 2 0
12797 838 2016-03-12 13:38:52.05 -0.254 -0.431 0.914 2016-03-12 13:38:52.25 -40.854 38.720 -27.439 2 0
12798 839 2016-03-12 13:38:52.05 -0.269 -0.425 0.960 2016-03-12 13:38:52.25 -34.939 37.927 -26.951 2 0
12799 840 2016-03-12 13:38:52.05 -0.241 -0.423 0.888 2016-03-12 13:38:52.25 -42.012 30.305 -26.463 2 0
12800 841 2016-03-12 13:38:52.05 -0.255 -0.431 0.912 2016-03-12 13:38:52.25 -49.024 26.280 -17.561 2 0
12801 842 2016-03-12 13:38:52.05 -0.205 -0.378 0.945 2016-03-12 13:38:52.25 -40.366 17.866 -8.902 2 0
12802 843 2016-03-12 13:38:52.05 -0.253 -0.351 0.905 2016-03-12 13:38:52.25 -32.439 13.659 -2.134 2 0
12803 844 2016-03-12 13:38:52.05 -0.274 -0.314 0.921 2016-03-12 13:38:52.25 -27.866 16.463 -3.110 2 0
12804 845 2016-03-12 13:38:52.05 -0.251 -0.351 0.933 2016-03-12 13:38:52.25 -26.646 9.085 -3.293 2 0
12805 846 2016-03-12 13:38:52.05 -0.261 -0.362 0.893 2016-03-12 13:38:52.25 -17.378 7.073 -0.976 2 0
12806 847 2016-03-12 13:38:52.05 -0.304 -0.314 0.926 2016-03-12 13:38:52.25 -15.000 6.098 3.476 2 0
12807 848 2016-03-12 13:38:52.05 -0.308 -0.314 0.940 2016-03-12 13:38:52.25 -10.122 -6.280 5.488 2 0
12808 849 2016-03-12 13:38:52.05 -0.267 -0.216 0.976 2016-03-12 13:38:52.25 12.622 -17.134 7.439 2 0
12809 850 2016-03-12 13:38:52.05 -0.226 -0.259 1.048 2016-03-12 13:38:52.25 21.402 -18.902 5.488 2 0
12810 851 2016-03-12 13:38:52.05 -0.127 -0.195 0.984 2016-03-12 13:38:52.25 19.573 -13.902 4.329 2 0
12811 852 2016-03-12 13:38:52.05 -0.210 -0.184 1.012 2016-03-12 13:38:52.25 21.098 -8.659 8.171 2 0
12812 853 NaN NaN NaN NaN 2016-03-12 13:38:52.25 21.220 -10.183 8.476 2 0
12813 854 NaN NaN NaN NaN 2016-03-12 13:38:52.25 24.634 -13.049 5.854 2 0
12814 855 NaN NaN NaN NaN 2016-03-12 13:38:52.25 36.768 -16.951 4.756 2 0
12815 856 NaN NaN NaN NaN 2016-03-12 13:38:52.25 36.098 -19.878 6.037 2 0
12816 857 NaN NaN NaN NaN 2016-03-12 13:38:52.25 40.000 -26.402 6.524 2 0
12817 858 NaN NaN NaN NaN 2016-03-12 13:38:52.25 43.963 -29.695 11.280 2 0
12818 859 NaN NaN NaN NaN 2016-03-12 13:38:52.25 34.207 -30.488 7.683 2 0
12819 860 NaN NaN NaN NaN 2016-03-12 13:38:52.25 34.939 -32.561 17.988 2 0
[12820 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
12790 0
12791 0
12792 0
12793 0
12794 0
12795 0
12796 0
12797 NaN
12798 NaN
12799 NaN
12800 NaN
12801 NaN
12802 NaN
12803 NaN
12804 NaN
12805 NaN
12806 NaN
12807 NaN
12808 NaN
12809 NaN
12810 NaN
12811 NaN
12812 NaN
12813 NaN
12814 NaN
12815 NaN
12816 NaN
12817 NaN
12818 NaN
12819 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
12790 0
12791 0
12792 0
12793 0
12794 0
12795 0
12796 0
12797 NaN
12798 NaN
12799 NaN
12800 NaN
12801 NaN
12802 NaN
12803 NaN
12804 NaN
12805 NaN
12806 NaN
12807 NaN
12808 NaN
12809 NaN
12810 NaN
12811 NaN
12812 NaN
12813 NaN
12814 NaN
12815 NaN
12816 NaN
12817 NaN
12818 NaN
12819 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-15 20:31:42.26 -0.967 -0.336 0.011 2016-03-15 20:31:42.46 1.280 11.829 -2.439 3 0
1 1 2016-03-15 20:31:42.26 -0.993 -0.332 -0.021 2016-03-15 20:31:42.46 -0.732 11.159 -3.476 3 0
2 2 2016-03-15 20:31:42.26 -0.979 -0.343 -0.017 2016-03-15 20:31:42.46 -3.780 8.293 -3.354 3 0
3 3 2016-03-15 20:31:42.26 -0.961 -0.342 -0.014 2016-03-15 20:31:42.46 -6.037 2.439 -1.768 3 0
4 4 2016-03-15 20:31:42.26 -0.963 -0.357 -0.020 2016-03-15 20:31:42.46 -5.305 -0.732 -0.915 3 0
5 5 2016-03-15 20:31:42.26 -0.962 -0.368 -0.009 2016-03-15 20:31:42.46 -2.134 -6.646 0.244 3 0
6 6 2016-03-15 20:31:42.26 -0.951 -0.368 -0.002 2016-03-15 20:31:42.46 -0.793 -11.585 -0.061 3 0
7 7 2016-03-15 20:31:42.26 -0.959 -0.361 0.004 2016-03-15 20:31:42.46 0.122 -12.500 -0.671 3 0
8 8 2016-03-15 20:31:42.26 -0.962 -0.363 0.010 2016-03-15 20:31:42.47 0.183 -11.646 -1.037 3 0
9 9 2016-03-15 20:31:42.26 -0.953 -0.362 0.022 2016-03-15 20:31:42.47 -0.244 -12.744 -1.220 3 0
10 10 2016-03-15 20:31:42.26 -0.966 -0.354 0.044 2016-03-15 20:31:42.47 -0.122 -11.402 -1.220 3 0
11 11 2016-03-15 20:31:42.26 -0.959 -0.363 0.046 2016-03-15 20:31:42.47 -0.488 -7.683 -1.098 3 0
12 12 2016-03-15 20:31:42.26 -0.955 -0.361 0.047 2016-03-15 20:31:42.47 1.098 -7.378 -1.220 3 0
13 13 2016-03-15 20:31:42.26 -0.945 -0.360 0.055 2016-03-15 20:31:42.47 1.951 -3.537 0.427 3 0
14 14 2016-03-15 20:31:42.26 -0.965 -0.354 0.061 2016-03-15 20:31:42.47 2.500 -3.902 1.341 3 0
15 15 2016-03-15 20:31:42.26 -0.959 -0.361 0.061 2016-03-15 20:31:42.47 0.915 -1.646 0.854 3 0
16 16 2016-03-15 20:31:42.26 -0.946 -0.363 0.041 2016-03-15 20:31:42.47 0.488 -3.963 0.976 3 0
17 17 2016-03-15 20:31:42.26 -0.952 -0.323 0.057 2016-03-15 20:31:42.47 1.341 -2.439 0.976 3 0
18 18 2016-03-15 20:31:42.26 -0.965 -0.346 0.052 2016-03-15 20:31:42.47 -0.488 -0.183 1.524 3 0
19 19 2016-03-15 20:31:42.26 -0.939 -0.375 0.049 2016-03-15 20:31:42.47 0.244 0.976 3.476 3 0
20 20 2016-03-15 20:31:42.26 -0.966 -0.363 0.070 2016-03-15 20:31:42.47 4.207 5.305 1.037 3 0
21 21 2016-03-15 20:31:42.26 -0.985 -0.321 0.064 2016-03-15 20:31:42.47 11.280 5.915 -5.732 3 0
22 22 2016-03-15 20:31:42.26 -1.018 -0.248 0.137 2016-03-15 20:31:42.47 10.976 0.427 -13.171 3 0
23 23 2016-03-15 20:31:42.26 -0.961 -0.376 0.064 2016-03-15 20:31:42.47 -2.195 -10.610 -19.939 3 0
24 24 2016-03-15 20:31:42.26 -0.936 -0.443 0.108 2016-03-15 20:31:42.47 -28.902 16.098 -9.085 3 0
25 25 2016-03-15 20:31:42.27 -0.888 -0.444 0.062 2016-03-15 20:31:42.47 -15.793 17.561 -1.463 3 0
26 26 2016-03-15 20:31:42.27 -0.874 -0.466 0.085 2016-03-15 20:31:42.47 -12.622 15.305 0.793 3 0
27 27 2016-03-15 20:31:42.27 -0.889 -0.481 0.054 2016-03-15 20:31:42.47 -10.671 15.793 0.427 3 0
28 28 2016-03-15 20:31:42.27 -0.963 -0.416 -0.187 2016-03-15 20:31:42.47 -6.037 12.500 2.988 3 0
29 29 2016-03-15 20:31:42.27 -0.978 -0.449 -0.007 2016-03-15 20:31:42.47 59.695 31.829 1.280 3 0
... ... ... ... ... ... ... ... ... ... ... ...
5893 1170 2016-03-12 13:24:23.61 -0.005 0.868 0.510 2016-03-12 13:24:23.87 2.012 6.463 2.012 3 0
5894 1171 2016-03-12 13:24:23.61 0.024 0.869 0.522 2016-03-12 13:24:23.87 6.524 10.549 1.098 3 0
5895 1172 2016-03-12 13:24:23.61 -0.007 0.905 0.518 2016-03-12 13:24:23.87 3.354 13.232 -0.610 3 0
5896 1173 2016-03-12 13:24:23.61 0.050 0.727 0.581 2016-03-12 13:24:23.87 -1.951 15.244 0.061 3 0
5897 1174 2016-03-12 13:24:23.61 0.085 0.730 0.556 2016-03-12 13:24:23.87 0.488 6.585 -1.159 3 0
5898 1175 2016-03-12 13:24:23.61 0.054 0.793 0.581 2016-03-12 13:24:23.87 -4.207 6.890 -7.866 3 0
5899 1176 2016-03-12 13:24:23.61 0.021 0.860 0.534 2016-03-12 13:24:23.88 0.244 3.293 -11.220 3 0
5900 1177 2016-03-12 13:24:23.61 0.016 0.841 0.523 2016-03-12 13:24:23.88 0.854 -2.866 -9.390 3 0
5901 1178 2016-03-12 13:24:23.61 -0.015 0.826 0.583 2016-03-12 13:24:23.88 -1.524 -4.634 -11.768 3 0
5902 1179 2016-03-12 13:24:23.61 0.002 0.792 0.573 2016-03-12 13:24:23.88 2.927 -10.183 -7.317 3 0
5903 1180 2016-03-12 13:24:23.61 0.022 0.797 0.546 2016-03-12 13:24:23.88 -3.476 -10.671 -2.134 3 0
5904 1181 2016-03-12 13:24:23.61 0.043 0.851 0.567 2016-03-12 13:24:23.88 -9.939 -5.122 0.976 3 0
5905 1182 2016-03-12 13:24:23.61 -0.019 0.820 0.532 2016-03-12 13:24:23.88 -9.878 -5.305 -0.610 3 0
5906 1183 2016-03-12 13:24:23.61 -0.045 0.847 0.520 2016-03-12 13:24:23.88 -9.207 -2.683 -0.061 3 0
5907 1184 2016-03-12 13:24:23.61 -0.036 0.858 0.512 2016-03-12 13:24:23.88 -7.195 0.671 1.768 3 0
5908 1185 2016-03-12 13:24:23.61 -0.047 0.870 0.547 2016-03-12 13:24:23.88 -6.646 2.805 2.561 3 0
5909 1186 2016-03-12 13:24:23.62 -0.074 0.835 0.579 2016-03-12 13:24:23.88 -1.829 5.488 2.500 3 0
5910 1187 2016-03-12 13:24:23.62 -0.024 0.812 0.580 2016-03-12 13:24:23.88 1.524 0.854 0.244 3 0
5911 1188 2016-03-12 13:24:23.62 0.014 0.815 0.571 2016-03-12 13:24:23.88 3.049 -7.012 -1.280 3 0
5912 1189 2016-03-12 13:24:23.62 0.021 0.796 0.559 2016-03-12 13:24:23.88 2.683 -4.756 0.122 3 0
5913 1190 2016-03-12 13:24:23.62 -0.016 0.823 0.593 2016-03-12 13:24:23.88 -0.488 -0.183 3.537 3 0
5914 1191 2016-03-12 13:24:23.62 -0.064 0.779 0.605 2016-03-12 13:24:23.88 -1.220 2.073 4.207 3 0
5915 1192 2016-03-12 13:24:23.62 -0.026 0.812 0.601 2016-03-12 13:24:23.88 8.049 0.305 2.317 3 0
5916 1193 2016-03-12 13:24:23.62 -0.038 0.825 0.596 2016-03-12 13:24:23.88 35.671 -13.232 2.866 3 0
5917 1194 2016-03-12 13:24:23.62 0.002 0.812 0.596 NaN NaN NaN NaN 3 0
5918 1195 2016-03-12 13:24:23.62 0.004 0.815 0.567 NaN NaN NaN NaN 3 0
5919 1196 2016-03-12 13:24:23.62 0.006 0.792 0.587 NaN NaN NaN NaN 3 0
5920 1197 2016-03-12 13:24:23.62 0.021 0.793 0.571 NaN NaN NaN NaN 3 0
5921 1198 2016-03-12 13:24:23.62 0.013 0.825 0.542 NaN NaN NaN NaN 3 0
5922 1199 2016-03-12 13:24:23.62 0.015 0.834 0.522 NaN NaN NaN NaN 3 0
[5923 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
5893 0
5894 0
5895 0
5896 0
5897 0
5898 0
5899 0
5900 NaN
5901 NaN
5902 NaN
5903 NaN
5904 NaN
5905 NaN
5906 NaN
5907 NaN
5908 NaN
5909 NaN
5910 NaN
5911 NaN
5912 NaN
5913 NaN
5914 NaN
5915 NaN
5916 NaN
5917 NaN
5918 NaN
5919 NaN
5920 NaN
5921 NaN
5922 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
5893 0
5894 0
5895 0
5896 0
5897 0
5898 0
5899 0
5900 NaN
5901 NaN
5902 NaN
5903 NaN
5904 NaN
5905 NaN
5906 NaN
5907 NaN
5908 NaN
5909 NaN
5910 NaN
5911 NaN
5912 NaN
5913 NaN
5914 NaN
5915 NaN
5916 NaN
5917 NaN
5918 NaN
5919 NaN
5920 NaN
5921 NaN
5922 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/DIO_OMOUNT.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/DIO_OSC.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:49:04.72 -0.286 0.148 1.207 2016-03-26 13:49:05.06 -43.963 24.817 24.695 4 0
1 1 2016-03-26 13:49:04.72 0.030 0.050 1.042 2016-03-26 13:49:05.06 -0.427 27.073 8.171 4 0
2 2 2016-03-26 13:49:04.72 -0.064 0.104 0.998 2016-03-26 13:49:05.06 39.024 14.146 -45.976 4 0
3 3 2016-03-26 13:49:04.73 0.197 0.115 1.015 2016-03-26 13:49:05.07 14.878 -8.293 -59.939 4 0
4 4 2016-03-26 13:49:04.73 0.394 -0.045 0.931 2016-03-26 13:49:05.07 47.012 -47.439 0.671 4 0
5 5 2016-03-26 13:49:04.73 0.271 -0.245 1.017 2016-03-26 13:49:05.07 18.049 -15.549 18.780 4 0
6 6 2016-03-26 13:49:04.73 0.184 -0.200 1.009 2016-03-26 13:49:05.07 -35.305 -3.720 -34.329 4 0
7 7 2016-03-26 13:49:04.73 0.224 0.222 1.014 2016-03-26 13:49:05.07 -11.768 24.390 -13.049 4 0
8 8 2016-03-26 13:49:04.73 0.209 -0.111 1.047 2016-03-26 13:49:05.07 7.317 28.659 12.988 4 0
9 9 2016-03-26 13:49:04.73 0.209 -0.222 0.948 2016-03-26 13:49:05.07 19.695 15.732 21.463 4 0
10 10 2016-03-26 13:49:04.73 0.236 -0.008 1.187 2016-03-26 13:49:05.07 -16.159 48.963 4.634 4 0
11 11 2016-03-26 13:49:04.73 0.094 0.065 0.964 2016-03-26 13:49:05.07 -49.634 58.780 -46.098 4 0
12 12 2016-03-26 13:49:04.73 0.203 -0.042 0.964 2016-03-26 13:49:05.07 16.402 1.890 -27.134 4 0
13 13 2016-03-26 13:49:04.73 0.073 0.038 0.974 2016-03-26 13:49:05.07 -4.756 18.232 -17.988 4 0
14 14 2016-03-26 13:49:04.73 -0.007 -0.013 1.105 2016-03-26 13:49:05.07 1.829 29.817 -33.232 4 0
15 15 2016-03-26 13:49:04.73 -0.025 -0.394 1.003 2016-03-26 13:49:05.07 -16.463 1.280 -36.463 4 0
16 16 2016-03-26 13:49:04.73 -0.199 -0.176 1.014 2016-03-26 13:49:05.07 -14.390 16.524 -5.305 4 0
17 17 2016-03-26 13:49:04.73 0.073 -0.264 1.139 2016-03-26 13:49:05.07 -31.524 -0.671 13.110 4 0
18 18 2016-03-26 13:49:04.73 0.096 -0.100 0.917 2016-03-26 13:49:05.07 -33.598 -11.707 -1.220 4 0
19 19 2016-03-26 13:49:04.73 0.112 -0.087 1.052 2016-03-26 13:49:05.07 -18.293 -3.415 -26.280 4 0
20 20 2016-03-26 13:49:04.73 0.128 -0.013 1.023 2016-03-26 13:49:05.07 -0.915 -25.000 11.280 4 0
21 21 2016-03-26 13:49:04.73 0.151 -0.000 0.997 2016-03-26 13:49:05.07 11.220 2.073 23.902 4 0
22 22 2016-03-26 13:49:04.73 0.194 -0.092 0.980 2016-03-26 13:49:05.07 -3.598 20.183 5.122 4 0
23 23 2016-03-26 13:49:04.73 0.170 0.053 1.038 2016-03-26 13:49:05.07 1.585 22.805 7.378 4 0
24 24 2016-03-26 13:49:04.73 0.019 0.102 1.091 2016-03-26 13:49:05.07 -10.000 12.439 6.585 4 0
25 25 2016-03-26 13:49:04.73 0.109 -0.160 1.025 2016-03-26 13:49:05.07 -16.037 10.671 0.854 4 0
26 26 2016-03-26 13:49:04.73 0.092 -0.255 1.066 2016-03-26 13:49:05.07 -13.293 15.854 8.049 4 0
27 27 2016-03-26 13:49:04.74 0.059 -0.194 1.013 2016-03-26 13:49:05.07 -24.878 20.366 -1.159 4 0
28 28 2016-03-26 13:49:04.74 -0.247 -0.220 1.000 2016-03-26 13:49:05.07 -23.537 8.415 -14.329 4 0
29 29 2016-03-26 13:49:04.74 -0.294 -0.315 1.013 2016-03-26 13:49:05.07 -17.256 25.000 -13.354 4 0
... ... ... ... ... ... ... ... ... ... ... ...
18552 2582 2016-03-12 13:59:17.01 0.269 0.005 1.034 2016-03-12 13:59:17.64 -57.683 79.268 -94.939 4 0
18553 2583 2016-03-12 13:59:17.01 0.279 0.020 0.969 2016-03-12 13:59:17.64 -43.476 59.329 -88.720 4 0
18554 2584 2016-03-12 13:59:17.01 0.330 0.093 0.939 2016-03-12 13:59:17.64 -18.780 62.866 -103.476 4 0
18555 2585 2016-03-12 13:59:17.01 0.169 0.123 0.999 2016-03-12 13:59:17.64 -18.780 62.500 -71.159 4 0
18556 2586 2016-03-12 13:59:17.01 -0.052 0.320 1.017 2016-03-12 13:59:17.64 28.293 33.659 -49.512 4 0
18557 2587 2016-03-12 13:59:17.01 0.029 0.016 0.957 2016-03-12 13:59:17.64 70.549 0.976 -28.232 4 0
18558 2588 2016-03-12 13:59:17.01 0.065 -0.285 1.114 2016-03-12 13:59:17.64 79.573 -6.037 -18.232 4 0
18559 2589 2016-03-12 13:59:17.01 0.004 -0.095 1.012 2016-03-12 13:59:17.64 95.244 -39.512 7.988 4 0
18560 2590 2016-03-12 13:59:17.01 0.063 0.133 0.945 2016-03-12 13:59:17.64 130.549 -55.732 31.402 4 0
18561 2591 2016-03-12 13:59:17.01 0.085 -0.396 1.133 2016-03-12 13:59:17.64 112.256 -50.671 47.195 4 0
18562 2592 2016-03-12 13:59:17.01 0.138 -0.209 1.140 2016-03-12 13:59:17.64 83.902 -64.817 68.659 4 0
18563 2593 2016-03-12 13:59:17.01 0.236 0.049 1.150 2016-03-12 13:59:17.64 173.110 -54.451 37.317 4 0
18564 2594 2016-03-12 13:59:17.01 0.131 0.017 1.076 2016-03-12 13:59:17.64 -19.207 5.366 44.390 4 0
18565 2595 2016-03-12 13:59:17.01 -0.059 -0.196 1.058 2016-03-12 13:59:17.64 -120.610 -28.841 60.061 4 0
18566 2596 2016-03-12 13:59:17.01 -0.092 -0.721 0.803 NaN NaN NaN NaN 4 0
18567 2597 2016-03-12 13:59:17.01 -0.131 -0.611 0.704 NaN NaN NaN NaN 4 0
18568 2598 2016-03-12 13:59:17.01 -0.190 -0.570 0.801 NaN NaN NaN NaN 4 0
18569 2599 2016-03-12 13:59:17.01 -0.066 -0.625 0.833 NaN NaN NaN NaN 4 0
18570 2600 2016-03-12 13:59:17.01 -0.067 -0.542 0.854 NaN NaN NaN NaN 4 0
18571 2601 2016-03-12 13:59:17.01 0.014 -0.411 1.007 NaN NaN NaN NaN 4 0
18572 2602 2016-03-12 13:59:17.01 0.155 -0.530 0.850 NaN NaN NaN NaN 4 0
18573 2603 2016-03-12 13:59:17.01 0.093 -0.590 0.808 NaN NaN NaN NaN 4 0
18574 2604 2016-03-12 13:59:17.01 0.007 -0.583 0.717 NaN NaN NaN NaN 4 0
18575 2605 2016-03-12 13:59:17.01 0.100 -0.448 0.848 NaN NaN NaN NaN 4 0
18576 2606 2016-03-12 13:59:17.01 0.048 -0.244 1.048 NaN NaN NaN NaN 4 0
18577 2607 2016-03-12 13:59:17.01 -0.027 0.023 1.019 NaN NaN NaN NaN 4 0
18578 2608 2016-03-12 13:59:17.01 0.079 0.505 1.218 NaN NaN NaN NaN 4 0
18579 2609 2016-03-12 13:59:17.01 0.371 0.384 1.313 NaN NaN NaN NaN 4 0
18580 2610 2016-03-12 13:59:17.01 -0.268 -0.076 0.845 NaN NaN NaN NaN 4 0
18581 2611 2016-03-12 13:59:17.01 0.136 0.014 1.010 NaN NaN NaN NaN 4 0
[18582 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
18552 0
18553 0
18554 0
18555 0
18556 0
18557 0
18558 0
18559 NaN
18560 NaN
18561 NaN
18562 NaN
18563 NaN
18564 NaN
18565 NaN
18566 NaN
18567 NaN
18568 NaN
18569 NaN
18570 NaN
18571 NaN
18572 NaN
18573 NaN
18574 NaN
18575 NaN
18576 NaN
18577 NaN
18578 NaN
18579 NaN
18580 NaN
18581 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
18552 0
18553 0
18554 0
18555 0
18556 0
18557 0
18558 0
18559 NaN
18560 NaN
18561 NaN
18562 NaN
18563 NaN
18564 NaN
18565 NaN
18566 NaN
18567 NaN
18568 NaN
18569 NaN
18570 NaN
18571 NaN
18572 NaN
18573 NaN
18574 NaN
18575 NaN
18576 NaN
18577 NaN
18578 NaN
18579 NaN
18580 NaN
18581 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/DIO_OCG.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:39:22.18 -0.441 0.058 -1.054 2016-03-26 13:39:22.48 55.061 58.963 49.695 5 0
1 1 2016-03-26 13:39:22.18 -0.436 0.168 -1.169 2016-03-26 13:39:22.48 45.000 50.000 54.390 5 0
2 2 2016-03-26 13:39:22.18 -0.359 0.118 -1.037 2016-03-26 13:39:22.48 -23.598 6.341 63.780 5 0
3 3 2016-03-26 13:39:22.18 -0.392 0.296 -0.719 2016-03-26 13:39:22.48 -46.585 3.415 40.549 5 0
4 4 2016-03-26 13:39:22.18 -0.697 0.655 -0.847 2016-03-26 13:39:22.48 -41.951 8.902 28.232 5 0
5 5 2016-03-26 13:39:22.18 -0.918 0.820 -0.598 2016-03-26 13:39:22.48 -38.598 22.134 41.463 5 0
6 6 2016-03-26 13:39:22.18 -0.405 0.720 -0.682 2016-03-26 13:39:22.48 -93.293 -34.878 44.268 5 0
7 7 2016-03-26 13:39:22.18 -0.141 0.349 -0.785 2016-03-26 13:39:22.48 -95.610 -54.573 33.232 5 0
8 8 2016-03-26 13:39:22.18 -0.316 0.311 -0.680 2016-03-26 13:39:22.48 -115.610 -93.963 58.963 5 0
9 9 2016-03-26 13:39:22.19 -0.355 0.533 -0.922 2016-03-26 13:39:22.48 -55.915 -77.927 57.805 5 0
10 10 2016-03-26 13:39:22.19 0.428 0.964 -2.183 2016-03-26 13:39:22.48 -13.354 -61.707 35.854 5 0
11 11 2016-03-26 13:39:22.19 -1.301 -0.404 1.276 2016-03-26 13:39:22.48 -123.537 -87.439 -16.890 5 0
12 12 2016-03-26 13:39:22.19 -1.815 0.791 -0.550 2016-03-26 13:39:22.48 31.951 -79.756 -43.354 5 0
13 13 2016-03-26 13:39:22.19 -0.675 0.538 -0.846 2016-03-26 13:39:22.48 40.549 38.293 -12.500 5 0
14 14 2016-03-26 13:39:22.19 1.117 1.008 -1.513 2016-03-26 13:39:22.48 -57.073 89.756 -18.110 5 0
15 15 2016-03-26 13:39:22.19 -0.986 0.544 -0.327 2016-03-26 13:39:22.48 -186.768 -145.000 -104.756 5 0
16 16 2016-03-26 13:39:22.19 -0.834 0.356 -0.556 2016-03-26 13:39:22.48 -79.512 -5.793 65.244 5 0
17 17 2016-03-26 13:39:22.19 -0.179 0.759 -0.737 2016-03-26 13:39:22.48 -26.402 210.305 -123.720 5 0
18 18 2016-03-26 13:39:22.19 -0.544 0.323 -0.501 2016-03-26 13:39:22.48 108.963 116.646 -126.768 5 0
19 19 2016-03-26 13:39:22.19 -1.337 0.507 -0.823 2016-03-26 13:39:22.48 26.707 -79.695 -22.683 5 0
20 20 2016-03-26 13:39:22.19 -0.429 0.460 -0.447 2016-03-26 13:39:22.48 45.854 353.598 23.354 5 0
21 21 2016-03-26 13:39:22.19 -0.673 -0.260 -0.688 2016-03-26 13:39:22.48 -155.610 -85.244 -57.744 5 0
22 22 2016-03-26 13:39:22.19 -0.881 -0.011 -1.029 2016-03-26 13:39:22.48 -9.390 -264.695 -180.488 5 0
23 23 2016-03-26 13:39:22.19 0.700 -0.669 -1.198 2016-03-26 13:39:22.48 96.768 4.451 -90.000 5 0
24 24 2016-03-26 13:39:22.19 -0.831 0.989 -0.370 2016-03-26 13:39:22.48 -113.476 -106.341 43.963 5 0
25 25 2016-03-26 13:39:22.19 -0.780 -0.050 -0.919 2016-03-26 13:39:22.48 18.232 -90.976 31.646 5 0
26 26 2016-03-26 13:39:22.19 -0.430 0.120 -0.779 2016-03-26 13:39:22.48 109.939 17.256 69.024 5 0
27 27 2016-03-26 13:39:22.19 -0.456 0.102 -0.603 2016-03-26 13:39:22.48 0.549 140.793 -48.110 5 0
28 28 2016-03-26 13:39:22.19 -0.817 0.277 -0.914 2016-03-26 13:39:22.48 87.744 235.793 -93.293 5 0
29 29 2016-03-26 13:39:22.19 -1.025 0.438 -1.483 2016-03-26 13:39:22.48 -124.695 237.927 -44.939 5 0
... ... ... ... ... ... ... ... ... ... ... ...
16730 2569 2016-03-12 14:10:05.83 -0.757 0.241 -0.563 2016-03-12 14:10:06.44 -0.732 -38.415 -14.451 5 0
16731 2570 2016-03-12 14:10:05.84 -0.675 0.287 -0.603 2016-03-12 14:10:06.44 7.012 -27.012 -15.183 5 0
16732 2571 2016-03-12 14:10:05.84 -0.711 0.262 -0.631 2016-03-12 14:10:06.44 -1.098 -21.280 -15.000 5 0
16733 2572 2016-03-12 14:10:05.84 -0.749 0.299 -0.678 2016-03-12 14:10:06.44 -9.451 -4.268 -17.073 5 0
16734 2573 2016-03-12 14:10:05.84 -0.863 0.396 -0.614 2016-03-12 14:10:06.44 -3.232 19.085 -3.963 5 0
16735 2574 2016-03-12 14:10:05.84 -0.944 0.392 -0.433 2016-03-12 14:10:06.44 6.646 21.829 -5.610 5 0
16736 2575 2016-03-12 14:10:05.84 -0.926 0.410 -0.413 2016-03-12 14:10:06.44 8.110 26.707 -4.390 5 0
16737 2576 2016-03-12 14:10:05.84 -0.912 0.358 -0.323 2016-03-12 14:10:06.44 9.878 30.854 -7.927 5 0
16738 2577 2016-03-12 14:10:05.84 -0.924 0.335 -0.232 2016-03-12 14:10:06.44 7.134 33.171 -7.073 5 0
16739 2578 2016-03-12 14:10:05.84 -0.929 0.362 -0.156 2016-03-12 14:10:06.44 -3.171 35.305 -9.207 5 0
16740 2579 2016-03-12 14:10:05.84 -1.003 0.291 -0.120 2016-03-12 14:10:06.44 2.256 28.537 -10.244 5 0
16741 2580 2016-03-12 14:10:05.84 -1.014 0.338 0.013 2016-03-12 14:10:06.44 0.854 18.659 -8.963 5 0
16742 2581 2016-03-12 14:10:05.84 -0.926 0.288 -0.032 2016-03-12 14:10:06.44 5.000 26.402 -9.451 5 0
16743 2582 2016-03-12 14:10:05.84 -0.862 0.340 -0.011 2016-03-12 14:10:06.44 -1.707 29.634 -7.988 5 0
16744 2583 2016-03-12 14:10:05.84 -0.870 0.312 -0.019 2016-03-12 14:10:06.44 -12.988 34.451 -14.024 5 0
16745 2584 2016-03-12 14:10:05.84 -0.939 0.367 0.005 2016-03-12 14:10:06.44 -24.573 41.402 -10.366 5 0
16746 2585 2016-03-12 14:10:05.84 -0.994 0.168 -0.001 2016-03-12 14:10:06.44 -34.939 35.427 -7.378 5 0
16747 2586 2016-03-12 14:10:05.84 -0.956 0.228 -0.020 2016-03-12 14:10:06.44 -45.122 34.085 -5.549 5 0
16748 2587 2016-03-12 14:10:05.84 -0.924 0.244 -0.092 NaN NaN NaN NaN 5 0
16749 2588 2016-03-12 14:10:05.84 -0.938 0.298 -0.162 NaN NaN NaN NaN 5 0
16750 2589 2016-03-12 14:10:05.84 -1.009 0.343 -0.213 NaN NaN NaN NaN 5 0
16751 2590 2016-03-12 14:10:05.84 -1.004 0.264 -0.246 NaN NaN NaN NaN 5 0
16752 2591 2016-03-12 14:10:05.84 -1.003 0.151 -0.294 NaN NaN NaN NaN 5 0
16753 2592 2016-03-12 14:10:05.84 -0.957 0.208 -0.311 NaN NaN NaN NaN 5 0
16754 2593 2016-03-12 14:10:05.84 -0.875 0.322 -0.258 NaN NaN NaN NaN 5 0
16755 2594 2016-03-12 14:10:05.84 -0.851 0.334 -0.294 NaN NaN NaN NaN 5 0
16756 2595 2016-03-12 14:10:05.84 -0.983 0.095 -0.325 NaN NaN NaN NaN 5 0
16757 2596 2016-03-12 14:10:05.84 -0.965 0.248 -0.365 NaN NaN NaN NaN 5 0
16758 2597 2016-03-12 14:10:05.84 -0.951 0.254 -0.402 NaN NaN NaN NaN 5 0
16759 2598 2016-03-12 14:10:05.84 -0.887 0.090 -0.452 NaN NaN NaN NaN 5 0
[16760 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
16730 0
16731 0
16732 0
16733 0
16734 0
16735 0
16736 0
16737 NaN
16738 NaN
16739 NaN
16740 NaN
16741 NaN
16742 NaN
16743 NaN
16744 NaN
16745 NaN
16746 NaN
16747 NaN
16748 NaN
16749 NaN
16750 NaN
16751 NaN
16752 NaN
16753 NaN
16754 NaN
16755 NaN
16756 NaN
16757 NaN
16758 NaN
16759 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
16730 0
16731 0
16732 0
16733 0
16734 0
16735 0
16736 0
16737 NaN
16738 NaN
16739 NaN
16740 NaN
16741 NaN
16742 NaN
16743 NaN
16744 NaN
16745 NaN
16746 NaN
16747 NaN
16748 NaN
16749 NaN
16750 NaN
16751 NaN
16752 NaN
16753 NaN
16754 NaN
16755 NaN
16756 NaN
16757 NaN
16758 NaN
16759 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/DIO_OBC.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 13:42:56.89 -0.817 0.231 0.542 2016-03-26 13:42:57.22 12.439 16.768 6.890 6 0
1 1 2016-03-26 13:42:56.89 -0.840 0.246 0.551 2016-03-26 13:42:57.22 13.293 15.976 6.524 6 0
2 2 2016-03-26 13:42:56.89 -0.854 0.259 0.579 2016-03-26 13:42:57.22 15.549 15.671 6.585 6 0
3 3 2016-03-26 13:42:56.89 -0.845 0.251 0.588 2016-03-26 13:42:57.22 13.659 16.707 7.866 6 0
4 4 2016-03-26 13:42:56.89 -0.833 0.250 0.602 2016-03-26 13:42:57.22 11.037 4.268 7.012 6 0
5 5 2016-03-26 13:42:56.89 -0.832 0.267 0.616 2016-03-26 13:42:57.22 7.988 3.659 6.159 6 0
6 6 2016-03-26 13:42:56.89 -0.819 0.240 0.598 2016-03-26 13:42:57.22 5.000 0.305 6.098 6 0
7 7 2016-03-26 13:42:56.89 -0.805 0.224 0.579 2016-03-26 13:42:57.22 4.268 -5.610 4.634 6 0
8 8 2016-03-26 13:42:56.89 -0.777 0.240 0.614 2016-03-26 13:42:57.22 -0.976 -8.476 2.500 6 0
9 9 2016-03-26 13:42:56.89 -0.776 0.236 0.630 2016-03-26 13:42:57.22 -10.732 -19.329 0.427 6 0
10 10 2016-03-26 13:42:56.89 -0.766 0.196 0.668 2016-03-26 13:42:57.22 -17.439 -30.427 -0.427 6 0
11 11 2016-03-26 13:42:56.89 -0.777 0.210 0.708 2016-03-26 13:42:57.22 -18.293 -29.573 -1.463 6 0
12 12 2016-03-26 13:42:56.89 -0.745 0.264 0.735 2016-03-26 13:42:57.22 -11.341 -24.634 0.061 6 0
13 13 2016-03-26 13:42:56.89 -0.786 0.206 0.664 2016-03-26 13:42:57.22 -9.146 -20.122 2.988 6 0
14 14 2016-03-26 13:42:56.89 -0.694 0.172 0.681 2016-03-26 13:42:57.22 -9.207 -17.744 2.866 6 0
15 15 2016-03-26 13:42:56.89 -0.710 0.237 0.584 2016-03-26 13:42:57.22 -1.890 -12.805 3.232 6 0
16 16 2016-03-26 13:42:56.89 -0.731 0.349 0.559 2016-03-26 13:42:57.22 -2.500 -17.683 -0.122 6 0
17 17 2016-03-26 13:42:56.89 -0.760 0.329 0.676 2016-03-26 13:42:57.22 -13.049 -23.232 -8.232 6 0
18 18 2016-03-26 13:42:56.89 -0.902 0.276 0.726 2016-03-26 13:42:57.22 -17.622 -37.439 -1.890 6 0
19 19 2016-03-26 13:42:56.89 -0.956 0.082 0.713 2016-03-26 13:42:57.22 -17.378 -32.012 -8.780 6 0
20 20 2016-03-26 13:42:56.89 -0.891 0.033 0.629 2016-03-26 13:42:57.22 16.220 16.890 4.207 6 0
21 21 2016-03-26 13:42:56.89 -0.711 0.222 0.602 2016-03-26 13:42:57.22 17.927 16.402 14.390 6 0
22 22 2016-03-26 13:42:56.89 -0.697 0.287 0.564 2016-03-26 13:42:57.22 -8.476 -18.049 27.561 6 0
23 23 2016-03-26 13:42:56.90 -0.665 0.122 0.611 2016-03-26 13:42:57.22 -3.963 -2.317 22.683 6 0
24 24 2016-03-26 13:42:56.90 -0.662 0.111 0.743 2016-03-26 13:42:57.22 12.866 10.000 15.732 6 0
25 25 2016-03-26 13:42:56.90 -0.646 0.287 0.788 2016-03-26 13:42:57.23 17.561 -1.463 7.927 6 0
26 26 2016-03-26 13:42:56.90 -0.540 0.152 0.803 2016-03-26 13:42:57.23 4.451 -39.939 12.134 6 0
27 27 2016-03-26 13:42:56.90 -0.544 0.144 0.807 2016-03-26 13:42:57.23 7.439 -74.024 31.890 6 0
28 28 2016-03-26 13:42:56.90 -0.426 0.275 0.817 2016-03-26 13:42:57.23 3.780 -79.146 40.427 6 0
29 29 2016-03-26 13:42:56.90 -0.292 0.555 0.867 2016-03-26 13:42:57.23 14.451 -84.634 48.537 6 0
... ... ... ... ... ... ... ... ... ... ... ...
8690 1414 2016-03-12 13:27:53.26 -0.932 0.406 0.200 2016-03-12 13:27:53.59 -2.195 -18.659 18.780 6 0
8691 1415 2016-03-12 13:27:53.26 -0.915 0.385 0.187 2016-03-12 13:27:53.59 -3.293 -18.780 15.854 6 0
8692 1416 2016-03-12 13:27:53.26 -0.872 0.396 0.236 2016-03-12 13:27:53.59 -3.963 -20.305 5.854 6 0
8693 1417 2016-03-12 13:27:53.26 -0.906 0.392 0.255 2016-03-12 13:27:53.59 -7.805 -6.951 3.659 6 0
8694 1418 2016-03-12 13:27:53.26 -0.872 0.407 0.289 2016-03-12 13:27:53.59 -3.963 3.598 2.805 6 0
8695 1419 2016-03-12 13:27:53.26 -0.915 0.386 0.278 2016-03-12 13:27:53.59 -9.451 5.732 -6.829 6 0
8696 1420 2016-03-12 13:27:53.26 -0.955 0.408 0.290 2016-03-12 13:27:53.59 -18.293 -4.756 -11.585 6 0
8697 1421 2016-03-12 13:27:53.26 -0.939 0.376 0.261 2016-03-12 13:27:53.59 -19.939 -7.317 -12.378 6 0
8698 1422 2016-03-12 13:27:53.26 -0.901 0.364 0.280 2016-03-12 13:27:53.59 -13.476 -4.756 -11.159 6 0
8699 1423 2016-03-12 13:27:53.26 -0.849 0.322 0.313 2016-03-12 13:27:53.59 -7.805 7.012 -8.049 6 0
8700 1424 2016-03-12 13:27:53.26 -0.963 0.333 0.325 2016-03-12 13:27:53.60 -5.854 3.110 -9.451 6 0
8701 1425 2016-03-12 13:27:53.26 -0.953 0.313 0.292 2016-03-12 13:27:53.60 -5.305 -1.220 -10.061 6 0
8702 1426 2016-03-12 13:27:53.26 -0.932 0.286 0.282 2016-03-12 13:27:53.60 -3.841 -1.463 -8.537 6 0
8703 1427 2016-03-12 13:27:53.26 -0.891 0.265 0.290 2016-03-12 13:27:53.60 -2.256 1.159 -6.159 6 0
8704 1428 2016-03-12 13:27:53.26 -0.972 0.276 0.324 2016-03-12 13:27:53.60 -5.488 -4.329 -5.793 6 0
8705 1429 2016-03-12 13:27:53.26 -0.943 0.269 0.289 2016-03-12 13:27:53.60 -5.305 -3.659 -5.061 6 0
8706 1430 2016-03-12 13:27:53.26 -0.937 0.257 0.306 2016-03-12 13:27:53.60 -5.244 -4.878 -5.061 6 0
8707 1431 2016-03-12 13:27:53.26 -0.913 0.272 0.299 2016-03-12 13:27:53.60 -0.244 0.183 -7.256 6 0
8708 1432 2016-03-12 13:27:53.26 -0.943 0.266 0.309 2016-03-12 13:27:53.60 3.598 2.988 -9.451 6 0
8709 1433 2016-03-12 13:27:53.26 -0.929 0.251 0.335 2016-03-12 13:27:53.60 0.549 0.854 -4.512 6 0
8710 1434 2016-03-12 13:27:53.26 -0.903 0.273 0.298 2016-03-12 13:27:53.60 -4.451 8.598 0.000 6 0
8711 1435 2016-03-12 13:27:53.26 -0.917 0.261 0.292 2016-03-12 13:27:53.60 -3.659 9.085 0.793 6 0
8712 1436 2016-03-12 13:27:53.26 -0.935 0.236 0.298 2016-03-12 13:27:53.60 -5.427 9.695 0.732 6 0
8713 1437 2016-03-12 13:27:53.26 -0.945 0.257 0.271 2016-03-12 13:27:53.60 -3.110 11.159 1.402 6 0
8714 1438 2016-03-12 13:27:53.26 -0.957 0.253 0.280 2016-03-12 13:27:53.60 -1.585 10.366 0.000 6 0
8715 1439 2016-03-12 13:27:53.26 -0.956 0.254 0.290 2016-03-12 13:27:53.60 -1.402 5.915 -1.463 6 0
8716 1440 2016-03-12 13:27:53.26 -0.956 0.254 0.273 2016-03-12 13:27:53.60 -1.220 5.122 -0.671 6 0
8717 1441 2016-03-12 13:27:53.26 -0.960 0.245 0.270 2016-03-12 13:27:53.60 -0.427 5.183 -1.159 6 0
8718 1442 2016-03-12 13:27:53.26 -0.961 0.250 0.274 2016-03-12 13:27:53.60 -0.488 0.915 -1.768 6 0
8719 1443 2016-03-12 13:27:53.26 -0.954 0.249 0.266 NaN NaN NaN NaN 6 0
[8720 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
8690 0
8691 0
8692 0
8693 0
8694 0
8695 0
8696 0
8697 NaN
8698 NaN
8699 NaN
8700 NaN
8701 NaN
8702 NaN
8703 NaN
8704 NaN
8705 NaN
8706 NaN
8707 NaN
8708 NaN
8709 NaN
8710 NaN
8711 NaN
8712 NaN
8713 NaN
8714 NaN
8715 NaN
8716 NaN
8717 NaN
8718 NaN
8719 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
8690 0
8691 0
8692 0
8693 0
8694 0
8695 0
8696 0
8697 NaN
8698 NaN
8699 NaN
8700 NaN
8701 NaN
8702 NaN
8703 NaN
8704 NaN
8705 NaN
8706 NaN
8707 NaN
8708 NaN
8709 NaN
8710 NaN
8711 NaN
8712 NaN
8713 NaN
8714 NaN
8715 NaN
8716 NaN
8717 NaN
8718 NaN
8719 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/DIO_OTHER.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-03-26 14:12:39.00 -0.800 0.588 0.113 2016-03-26 14:12:40.64 1.402 -4.268 1.951 7 0
1 1 2016-03-26 14:12:39.00 -0.816 0.581 0.151 2016-03-26 14:12:40.64 1.707 -4.146 2.195 7 0
2 2 2016-03-26 14:12:39.00 -0.809 0.599 0.173 2016-03-26 14:12:40.64 -0.244 -9.268 4.390 7 0
3 3 2016-03-26 14:12:40.00 -0.823 0.597 0.165 2016-03-26 14:12:40.64 -3.049 -11.585 6.037 7 0
4 4 2016-03-26 14:12:40.00 -0.818 0.574 0.183 2016-03-26 14:12:40.64 0.244 -9.512 4.756 7 0
5 5 2016-03-26 14:12:40.00 -0.817 0.594 0.173 2016-03-26 14:12:40.64 -0.427 -6.951 2.622 7 0
6 6 2016-03-26 14:12:40.00 -0.820 0.582 0.165 2016-03-26 14:12:40.64 -1.829 -5.488 1.524 7 0
7 7 2016-03-26 14:12:40.00 -0.833 0.600 0.155 2016-03-26 14:12:40.64 -2.988 -7.927 0.061 7 0
8 8 2016-03-26 14:12:40.00 -0.837 0.609 0.155 2016-03-26 14:12:40.64 -1.585 -3.659 -2.683 7 0
9 9 2016-03-26 14:12:40.00 -0.831 0.582 0.149 2016-03-26 14:12:40.64 -1.951 -2.500 -4.085 7 0
10 10 2016-03-26 14:12:40.00 -0.823 0.590 0.143 2016-03-26 14:12:40.64 -0.976 -2.073 -4.085 7 0
11 11 2016-03-26 14:12:40.00 -0.832 0.582 0.147 2016-03-26 14:12:40.64 -0.061 -0.732 -2.744 7 0
12 12 2016-03-26 14:12:40.00 -0.849 0.588 0.141 2016-03-26 14:12:40.64 0.122 -2.256 -2.561 7 0
13 13 2016-03-26 14:12:40.00 -0.833 0.591 0.127 2016-03-26 14:12:40.64 3.049 0.183 -0.183 7 0
14 14 2016-03-26 14:12:40.00 -0.817 0.591 0.120 2016-03-26 14:12:40.64 3.354 -0.488 0.854 7 0
15 15 2016-03-26 14:12:40.00 -0.832 0.590 0.128 2016-03-26 14:12:40.64 1.037 -1.341 -0.427 7 0
16 16 2016-03-26 14:12:40.01 -0.829 0.604 0.118 2016-03-26 14:12:40.64 -0.183 -3.537 0.061 7 0
17 17 2016-03-26 14:12:40.01 -0.819 0.568 0.152 2016-03-26 14:12:40.64 -0.122 -3.720 2.378 7 0
18 18 2016-03-26 14:12:40.01 -0.833 0.559 0.173 2016-03-26 14:12:40.64 -0.427 0.000 1.951 7 0
19 19 2016-03-26 14:12:40.01 -0.842 0.592 0.184 2016-03-26 14:12:40.64 -1.524 2.805 0.610 7 0
20 20 2016-03-26 14:12:40.01 -0.850 0.571 0.204 2016-03-26 14:12:40.64 -4.207 2.378 -0.854 7 0
21 21 2016-03-26 14:12:40.01 -0.825 0.546 0.212 2016-03-26 14:12:40.64 -3.902 1.890 1.341 7 0
22 22 2016-03-26 14:12:40.01 -0.803 0.547 0.206 2016-03-26 14:12:40.64 -4.024 -2.805 0.976 7 0
23 23 2016-03-26 14:12:40.01 -0.806 0.596 0.209 2016-03-26 14:12:40.64 -5.732 -7.317 -0.732 7 0
24 24 2016-03-26 14:12:40.01 -0.805 0.597 0.223 2016-03-26 14:12:40.64 -5.610 -5.854 -1.951 7 0
25 25 2016-03-26 14:12:40.01 -0.830 0.559 0.223 2016-03-26 14:12:40.65 -0.549 -8.293 -1.524 7 0
26 26 2016-03-26 14:12:40.01 -0.842 0.570 0.199 2016-03-26 14:12:40.65 7.683 -9.024 0.244 7 0
27 27 2016-03-26 14:12:40.01 -0.830 0.586 0.165 2016-03-26 14:12:40.65 7.500 -5.366 1.463 7 0
28 28 2016-03-26 14:12:40.01 -0.827 0.579 0.173 2016-03-26 14:12:40.65 8.110 0.122 0.183 7 0
29 29 2016-03-26 14:12:40.01 -0.829 0.601 0.151 2016-03-26 14:12:40.65 6.829 1.463 -0.427 7 0
... ... ... ... ... ... ... ... ... ... ... ...
48810 7665 2016-03-05 13:44:42.30 -0.831 -0.293 0.529 2016-03-05 13:44:44.03 -0.244 3.110 -0.366 7 0
48811 7666 2016-03-05 13:44:42.30 -0.833 -0.294 0.515 2016-03-05 13:44:44.03 0.671 2.927 -0.732 7 0
48812 7667 2016-03-05 13:44:42.30 -0.831 -0.291 0.519 2016-03-05 13:44:44.03 0.793 0.671 -0.732 7 0
48813 7668 2016-03-05 13:44:42.30 -0.836 -0.294 0.522 2016-03-05 13:44:44.03 1.098 1.159 -0.549 7 0
48814 7669 2016-03-05 13:44:42.30 -0.836 -0.293 0.519 2016-03-05 13:44:44.03 -1.524 2.256 0.183 7 0
48815 7670 2016-03-05 13:44:42.30 -0.832 -0.294 0.518 2016-03-05 13:44:44.03 -1.341 3.537 0.000 7 0
48816 7671 2016-03-05 13:44:42.30 -0.836 -0.297 0.517 2016-03-05 13:44:44.03 -1.220 2.073 0.000 7 0
48817 7672 2016-03-05 13:44:42.30 -0.838 -0.294 0.514 2016-03-05 13:44:44.03 -0.671 2.195 0.000 7 0
48818 7673 2016-03-05 13:44:42.30 -0.834 -0.294 0.512 2016-03-05 13:44:44.03 -0.610 1.037 0.122 7 0
48819 7674 2016-03-05 13:44:42.30 -0.835 -0.299 0.514 2016-03-05 13:44:44.03 -1.402 0.488 0.183 7 0
48820 7675 2016-03-05 13:44:42.30 -0.837 -0.297 0.513 2016-03-05 13:44:44.03 -0.854 1.463 0.244 7 0
48821 7676 2016-03-05 13:44:42.30 -0.840 -0.293 0.507 2016-03-05 13:44:44.03 -0.427 1.585 0.366 7 0
48822 7677 2016-03-05 13:44:42.30 -0.841 -0.295 0.509 2016-03-05 13:44:44.03 -1.037 1.463 0.610 7 0
48823 7678 2016-03-05 13:44:42.30 -0.841 -0.296 0.507 2016-03-05 13:44:44.03 -0.976 1.524 0.549 7 0
48824 7679 2016-03-05 13:44:42.30 -0.841 -0.299 0.505 2016-03-05 13:44:44.03 -0.793 1.220 0.427 7 0
48825 7680 2016-03-05 13:44:42.30 -0.843 -0.302 0.511 2016-03-05 13:44:44.03 -0.671 0.976 0.427 7 0
48826 7681 2016-03-05 13:44:42.30 -0.838 -0.295 0.521 2016-03-05 13:44:44.03 -0.244 1.220 0.427 7 0
48827 7682 2016-03-05 13:44:42.30 -0.835 -0.294 0.526 2016-03-05 13:44:44.03 0.000 1.646 0.488 7 0
48828 7683 2016-03-05 13:44:42.30 -0.829 -0.295 0.520 2016-03-05 13:44:44.03 -0.061 1.037 0.549 7 0
48829 7684 2016-03-05 13:44:42.30 -0.835 -0.298 0.519 2016-03-05 13:44:44.03 0.732 0.976 0.305 7 0
48830 7685 2016-03-05 13:44:42.30 -0.829 -0.292 0.527 2016-03-05 13:44:44.03 1.341 -3.720 0.061 7 0
48831 7686 2016-03-05 13:44:42.30 -0.829 -0.295 0.527 2016-03-05 13:44:44.03 3.354 -6.402 0.000 7 0
48832 7687 2016-03-05 13:44:42.30 -0.828 -0.293 0.529 2016-03-05 13:44:44.03 0.854 -7.073 1.280 7 0
48833 7688 2016-03-05 13:44:42.30 -0.821 -0.292 0.538 2016-03-05 13:44:44.03 -0.549 -4.268 1.220 7 0
48834 7689 2016-03-05 13:44:42.30 -0.820 -0.294 0.539 2016-03-05 13:44:44.03 0.610 -7.500 0.732 7 0
48835 7690 2016-03-05 13:44:42.30 -0.819 -0.295 0.546 2016-03-05 13:44:44.03 0.183 -7.256 0.732 7 0
48836 7691 NaN NaN NaN NaN 2016-03-05 13:44:44.03 0.854 -6.829 0.366 7 0
48837 7692 NaN NaN NaN NaN 2016-03-05 13:44:44.03 0.610 -7.866 0.183 7 0
48838 7693 NaN NaN NaN NaN 2016-03-05 13:44:44.03 0.305 -6.037 0.427 7 0
48839 7694 NaN NaN NaN NaN 2016-03-05 13:44:44.03 1.037 -5.122 0.488 7 0
[48840 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
48810 0
48811 0
48812 0
48813 0
48814 0
48815 0
48816 0
48817 NaN
48818 NaN
48819 NaN
48820 NaN
48821 NaN
48822 NaN
48823 NaN
48824 NaN
48825 NaN
48826 NaN
48827 NaN
48828 NaN
48829 NaN
48830 NaN
48831 NaN
48832 NaN
48833 NaN
48834 NaN
48835 NaN
48836 NaN
48837 NaN
48838 NaN
48839 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 0
25 0
26 0
27 0
28 0
29 0
..
48810 0
48811 0
48812 0
48813 0
48814 0
48815 0
48816 0
48817 NaN
48818 NaN
48819 NaN
48820 NaN
48821 NaN
48822 NaN
48823 NaN
48824 NaN
48825 NaN
48826 NaN
48827 NaN
48828 NaN
48829 NaN
48830 NaN
48831 NaN
48832 NaN
48833 NaN
48834 NaN
48835 NaN
48836 NaN
48837 NaN
48838 NaN
48839 NaN
Name: avg_stand, dtype: float64
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND10.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND3.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND4.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND5.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND6.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND7.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND8.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/CS_STAND9.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND10.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND3.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND4.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND5.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND6.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND7.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND8.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/standing_up_raw_data/URS_STAND9.csv']
index timestamp_x ACCEL_X ACCEL_Y ACCEL_Z timestamp_y GYRO_X GYRO_Y GYRO_Z state stand
0 0 2016-05-01 13:22:01.80 -1.060 0.169 -0.090 2016-05-01 13:22:01.84 6.829 26.829 -3.415 5 1
1 1 2016-05-01 13:22:01.80 -1.083 0.177 -0.104 2016-05-01 13:22:01.84 6.463 27.683 -3.171 5 1
2 2 2016-05-01 13:22:01.80 -1.098 0.178 -0.128 2016-05-01 13:22:01.84 2.683 32.866 -3.171 5 1
3 3 2016-05-01 13:22:01.80 -1.083 0.197 -0.138 2016-05-01 13:22:01.84 6.159 27.622 -1.524 5 1
4 4 2016-05-01 13:22:01.80 -1.068 0.176 -0.114 2016-05-01 13:22:01.84 8.110 24.268 0.793 5 1
5 5 2016-05-01 13:22:01.80 -1.078 0.176 -0.131 2016-05-01 13:22:01.84 4.451 26.098 -0.061 5 1
6 6 2016-05-01 13:22:01.80 -1.071 0.190 -0.136 2016-05-01 13:22:01.84 2.012 19.817 -1.402 5 1
7 7 2016-05-01 13:22:01.80 -1.072 0.180 -0.130 2016-05-01 13:22:01.84 4.146 13.720 -1.220 5 1
8 8 2016-05-01 13:22:01.80 -1.072 0.194 -0.125 2016-05-01 13:22:01.84 3.902 9.329 -0.976 5 1
9 9 2016-05-01 13:22:01.81 -1.078 0.188 -0.115 2016-05-01 13:22:01.84 1.037 5.183 1.463 5 1
10 10 2016-05-01 13:22:01.81 -1.085 0.192 -0.092 2016-05-01 13:22:01.84 1.646 4.329 1.098 5 1
11 11 2016-05-01 13:22:01.81 -1.076 0.186 -0.087 2016-05-01 13:22:01.84 4.512 3.171 0.732 5 1
12 12 2016-05-01 13:22:01.81 -1.067 0.193 -0.090 2016-05-01 13:22:01.84 1.829 3.780 2.927 5 1
13 13 2016-05-01 13:22:01.81 -1.060 0.197 -0.084 2016-05-01 13:22:01.84 0.122 0.854 2.500 5 1
14 14 2016-05-01 13:22:01.81 -1.064 0.201 -0.080 2016-05-01 13:22:01.84 0.183 -1.037 1.890 5 1
15 15 2016-05-01 13:22:01.81 -1.078 0.203 -0.081 2016-05-01 13:22:01.84 0.427 -3.049 1.829 5 1
16 16 2016-05-01 13:22:01.81 -1.067 0.198 -0.079 2016-05-01 13:22:01.84 0.000 -5.610 1.646 5 1
17 17 2016-05-01 13:22:01.81 -1.064 0.195 -0.077 2016-05-01 13:22:01.84 -0.366 -5.549 0.976 5 1
18 18 2016-05-01 13:22:01.81 -1.067 0.195 -0.064 2016-05-01 13:22:01.84 0.000 -5.488 0.854 5 1
19 19 2016-05-01 13:22:01.81 -1.068 0.205 -0.069 2016-05-01 13:22:01.84 1.463 -3.902 0.671 5 1
20 20 2016-05-01 13:22:01.81 -1.069 0.198 -0.081 2016-05-01 13:22:01.84 -0.549 -3.720 0.488 5 1
21 21 2016-05-01 13:22:01.81 -1.080 0.190 -0.064 2016-05-01 13:22:01.84 -1.463 -5.183 -0.061 5 1
22 22 2016-05-01 13:22:01.81 -1.083 0.180 -0.054 2016-05-01 13:22:01.84 -2.927 -2.378 -0.915 5 1
23 23 2016-05-01 13:22:01.81 -1.068 0.191 -0.066 2016-05-01 13:22:01.84 -0.976 -4.329 -1.951 5 1
24 24 2016-05-01 13:22:01.81 -1.065 0.217 -0.073 2016-05-01 13:22:01.84 -1.585 -2.317 -2.622 5 1
25 25 2016-05-01 13:22:01.81 -1.000 0.185 -0.157 2016-05-01 13:22:01.84 -3.841 -0.305 -2.073 5 1
26 26 2016-05-01 13:22:01.81 -1.097 -0.023 -0.322 2016-05-01 13:22:01.84 -2.500 -1.402 -2.073 5 1
27 27 2016-05-01 13:22:01.81 -1.186 -0.012 0.354 2016-05-01 13:22:01.84 -1.098 -4.268 -2.134 5 1
28 28 2016-05-01 13:22:01.81 -1.170 -0.059 0.316 2016-05-01 13:22:01.84 -3.902 -6.037 -2.927 5 1
29 29 2016-05-01 13:22:01.81 -1.337 -0.103 0.068 2016-05-01 13:22:01.84 -5.305 -5.366 -3.110 5 1
... ... ... ... ... ... ... ... ... ... ... ...
1710 63 2016-05-01 12:56:53.42 -0.854 0.235 -0.673 2016-05-01 12:56:53.44 57.256 -117.622 -56.524 5 1
1711 64 2016-05-01 12:56:53.42 -0.900 0.234 -0.680 2016-05-01 12:56:53.44 -47.256 -75.488 -74.268 5 1
1712 65 2016-05-01 12:56:53.42 -0.853 0.128 -0.632 2016-05-01 12:56:53.44 -60.549 -107.134 -78.110 5 1
1713 66 2016-05-01 12:56:53.42 -0.896 0.107 -0.721 2016-05-01 12:56:53.44 19.756 -111.951 -81.463 5 1
1714 67 2016-05-01 12:56:53.42 -0.924 0.028 -0.602 2016-05-01 12:56:53.44 -33.110 -1.890 -73.720 5 1
1715 68 2016-05-01 12:56:53.42 -0.886 0.037 -0.442 2016-05-01 12:56:53.44 21.341 30.244 -56.585 5 1
1716 69 2016-05-01 12:56:53.42 -0.830 -0.019 -0.582 2016-05-01 12:56:53.44 24.451 -74.634 -48.293 5 1
1717 70 2016-05-01 12:56:53.42 -0.919 -0.037 -0.599 2016-05-01 12:56:53.44 25.671 -56.220 -39.878 5 1
1718 71 2016-05-01 12:56:53.42 -0.915 -0.017 -0.408 2016-05-01 12:56:53.44 56.220 -62.805 -32.256 5 1
1719 72 2016-05-01 12:56:53.42 -0.949 -0.067 0.006 2016-05-01 12:56:53.44 47.805 -79.756 -24.878 5 1
1720 73 2016-05-01 12:56:53.42 -0.945 -0.083 -0.385 2016-05-01 12:56:53.44 46.585 -78.476 -16.159 5 1
1721 74 2016-05-01 12:56:53.42 -0.941 -0.080 -0.241 2016-05-01 12:56:53.44 68.720 -40.244 -9.024 5 1
1722 75 2016-05-01 12:56:53.42 -1.000 -0.102 -0.250 2016-05-01 12:56:53.44 24.268 -24.329 -4.390 5 1
1723 76 2016-05-01 12:56:53.42 -0.960 0.000 -0.143 2016-05-01 12:56:53.44 71.585 -19.939 -4.207 5 1
1724 77 2016-05-01 12:56:53.42 -0.983 0.009 -0.210 2016-05-01 12:56:53.44 -16.037 -60.244 10.854 5 1
1725 78 2016-05-01 12:56:53.42 -0.999 -0.030 -0.170 2016-05-01 12:56:53.44 15.732 -77.500 13.841 5 1
1726 79 2016-05-01 12:56:53.42 -1.020 -0.024 -0.122 2016-05-01 12:56:53.45 29.756 -58.659 14.207 5 1
1727 80 2016-05-01 12:56:53.42 -1.029 -0.008 -0.110 2016-05-01 12:56:53.45 44.085 -42.622 16.280 5 1
1728 81 2016-05-01 12:56:53.42 -1.023 -0.017 -0.062 2016-05-01 12:56:53.45 19.634 -51.341 17.073 5 1
1729 82 2016-05-01 12:56:53.42 -0.997 -0.009 -0.033 2016-05-01 12:56:53.45 22.683 -46.524 13.902 5 1
1730 83 2016-05-01 12:56:53.42 -0.970 -0.016 0.012 2016-05-01 12:56:53.45 13.049 -44.329 8.049 5 1
1731 84 2016-05-01 12:56:53.42 -0.930 -0.045 -0.046 2016-05-01 12:56:53.45 5.122 -42.195 5.671 5 1
1732 85 2016-05-01 12:56:53.42 -0.990 -0.034 -0.088 2016-05-01 12:56:53.45 3.232 -38.902 3.963 5 1
1733 86 2016-05-01 12:56:53.42 -1.017 -0.039 -0.029 2016-05-01 12:56:53.45 0.427 -31.829 0.244 5 1
1734 87 2016-05-01 12:56:53.42 -1.085 -0.061 -0.070 2016-05-01 12:56:53.45 -0.793 -25.732 -1.585 5 1
1735 88 2016-05-01 12:56:53.42 -1.195 -0.057 -0.067 2016-05-01 12:56:53.45 -4.329 -20.793 -2.073 5 1
1736 89 NaN NaN NaN NaN 2016-05-01 12:56:53.45 -5.000 -13.537 -0.793 5 1
1737 90 NaN NaN NaN NaN 2016-05-01 12:56:53.45 -5.671 0.061 2.073 5 1
1738 91 NaN NaN NaN NaN 2016-05-01 12:56:53.45 -3.902 2.439 4.024 5 1
1739 92 NaN NaN NaN NaN 2016-05-01 12:56:53.45 -5.305 -10.610 3.415 5 1
[1740 rows x 11 columns]
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 1
25 1
26 1
27 1
28 1
29 1
..
1710 1
1711 1
1712 1
1713 1
1714 1
1715 1
1716 1
1717 NaN
1718 NaN
1719 NaN
1720 NaN
1721 NaN
1722 NaN
1723 NaN
1724 NaN
1725 NaN
1726 NaN
1727 NaN
1728 NaN
1729 NaN
1730 NaN
1731 NaN
1732 NaN
1733 NaN
1734 NaN
1735 NaN
1736 NaN
1737 NaN
1738 NaN
1739 NaN
Name: avg_stand, dtype: float64
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 1
25 1
26 1
27 1
28 1
29 1
..
1710 1
1711 1
1712 1
1713 1
1714 1
1715 1
1716 1
1717 NaN
1718 NaN
1719 NaN
1720 NaN
1721 NaN
1722 NaN
1723 NaN
1724 NaN
1725 NaN
1726 NaN
1727 NaN
1728 NaN
1729 NaN
1730 NaN
1731 NaN
1732 NaN
1733 NaN
1734 NaN
1735 NaN
1736 NaN
1737 NaN
1738 NaN
1739 NaN
Name: avg_stand, dtype: float64
Removed 118 NaN rows
In [21]:
print training_data50.avg_stand.describe()
count 5367
mean 0
std 0
min 0
25% 0
50% 0
75% 0
max 0
Name: avg_stand, dtype: float64
In [200]:
training_data = prep(30)
training_data10 = prep(10)
training_data20 = prep(20)
training_data26 = prep(26) # need numbers that divide into 2 easily
training_data36 = prep(36) # need numbers that divide into 2 easily
training_data40 = prep(40)
#training_data50 = prep(50)
training_data56 = prep(56)
training_data60 = prep(60)
training_data64 = prep(64)
training_data70 = prep(70)
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:85: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:86: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:88: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:89: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 109 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 186 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 127 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 114 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 101 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 99 NaN rows
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
Removed 93 NaN rows
In [43]:
print training_data50[training_data50.avg_stand == 0]
index tiltx tilty stand ACCEL_X ACCEL_Y ACCEL_Z GYRO_X GYRO_Y GYRO_Z ... max_min_gx max_min_gy max_min_gz acc_rss gyro_rss acc_rms gyro_rms acc_magnitude gyro_magnitude state
0 24 -0.337718 -0.074182 0 -0.298854 0.061854 -0.905396 -3.197437 -8.581000 2.266271 ... 287.927 287.927 287.927 0.955448 9.433618 0.551628 5.446502 -1.142396 -9.512167 0
1 49 0.078648 0.178678 0 -0.249208 0.099646 -0.944208 8.991375 -3.570812 2.945875 ... 279.695 279.695 279.695 0.981613 10.113046 0.566734 5.838770 -1.093771 8.366438 0
2 74 -0.308385 0.009462 0 -0.186458 0.086958 -0.948500 -10.496646 -1.448104 0.388729 ... 295.853 295.853 295.853 0.970557 10.603192 0.560351 6.121756 -1.048000 -11.556021 0
3 99 0.442236 0.669933 0 -0.096833 0.180833 -0.947500 -4.448667 6.206813 14.322896 ... 146.768 146.768 146.768 0.969450 16.231466 0.559712 9.371241 -0.863500 16.081042 0
4 124 -0.005017 0.182633 0 0.024417 0.202688 -0.971354 5.721563 5.988229 4.546500 ... 243.170 243.170 243.170 0.992576 9.448059 0.573064 5.454840 -0.744250 16.256292 0
5 149 -0.758348 0.332613 0 -0.015021 0.189625 -0.946208 7.996771 -2.223042 -12.204042 ... 243.170 243.170 243.170 0.965139 14.759027 0.557223 8.521128 -0.771604 -6.430312 0
6 174 -0.053906 0.131380 0 -0.288563 0.125521 -0.898000 4.512208 -8.610167 2.524021 ... 215.487 215.487 215.487 0.951540 10.043190 0.549372 5.798439 -1.061042 -1.573937 0
7 199 -0.611937 0.220517 0 -0.301167 0.159813 -0.878583 -2.760437 1.610792 -0.980729 ... 280.610 280.610 280.610 0.942417 3.343126 0.544105 1.930155 -1.019938 -2.130375 0
8 224 -0.093318 0.131612 0 -0.102833 0.245688 -0.923479 6.840771 2.183646 -19.349562 ... 280.610 280.610 280.610 0.961120 20.639041 0.554903 11.915956 -0.780625 -10.325146 0
9 249 -0.482192 0.442244 0 -0.183625 0.285833 -0.888812 1.906792 -7.258688 2.567313 ... 192.195 192.195 192.195 0.951529 7.931929 0.549365 4.579501 -0.786604 -2.784583 0
10 274 -0.196102 0.662022 0 -0.342021 0.324292 -0.824250 4.170479 1.708625 -16.910604 ... 285.183 285.183 285.183 0.949490 17.500881 0.548188 10.104138 -0.841979 -11.031500 0
11 299 -0.659925 0.415087 0 -0.322667 0.174271 -0.859229 9.672292 16.950000 -16.819167 ... 361.585 361.585 361.585 0.934216 25.763154 0.539370 14.874364 -1.007625 9.803125 0
12 324 0.200988 -0.109372 0 -0.103562 0.065604 -0.925833 8.816000 0.779979 2.109979 ... 351.951 351.951 351.951 0.933915 9.098474 0.539196 5.253007 -0.963792 11.705958 0
13 349 0.151612 0.574594 0 0.014188 0.032292 -0.907562 6.408771 6.110229 -4.081521 ... 719.452 719.452 719.452 0.908248 9.750182 0.524377 5.629270 -0.861083 8.437479 0
14 374 0.431029 -0.317504 0 0.112375 -0.133146 -0.925687 -4.432104 6.739042 6.743000 ... 719.452 719.452 719.452 0.941941 10.513148 0.543830 6.069769 -0.946458 9.049938 0
15 399 0.264143 0.027012 0 0.195417 -0.078167 -0.938917 -4.456208 -13.741125 9.098167 ... 177.744 177.744 177.744 0.962217 17.071993 0.555536 9.856520 -0.821667 -9.099167 0
16 424 -0.146925 0.494388 0 -0.122958 0.060312 -0.918729 -2.116333 -26.361771 -0.782479 ... 233.659 233.659 233.659 0.928881 26.458158 0.536290 15.275624 -0.981375 -29.260583 0
17 449 -0.510741 -0.171934 0 -0.427542 0.007208 -0.910479 5.655417 18.906271 -6.754250 ... 233.598 233.598 233.598 1.005891 20.857869 0.580751 12.042296 -1.330812 17.807438 0
18 474 -0.910436 0.248410 0 -0.193208 -0.075667 -0.890437 -1.979187 25.706292 2.709667 ... 151.280 151.280 151.280 0.914294 25.924369 0.527868 14.967441 -1.159312 26.436771 0
19 499 0.012917 0.312465 0 0.087708 -0.027667 -0.985812 -17.568562 -9.383917 -2.719792 ... 168.964 168.964 168.964 0.990093 20.102476 0.571631 11.606170 -0.925771 -29.672271 0
20 524 0.109811 -0.398053 0 0.076063 0.206000 -0.906667 -10.887958 -9.507104 0.142167 ... 172.317 172.317 172.317 0.932880 14.455202 0.538599 8.345715 -0.624604 -20.252896 0
21 549 0.630280 0.265899 0 -0.107875 0.342604 -0.848437 3.593750 -27.590167 1.028833 ... 269.086 269.086 269.086 0.921336 27.842249 0.531934 16.074730 -0.613708 -22.967583 0
22 574 -0.925740 0.209614 0 -0.428667 0.195979 -0.813500 -0.273083 0.259167 -1.157354 ... 269.086 269.086 269.086 0.940184 1.217050 0.542815 0.702664 -1.046187 -1.171271 0
23 599 -0.078332 0.088286 0 -0.358417 0.072625 -0.877146 1.528271 9.225062 8.612792 ... 174.878 174.878 174.878 0.950327 12.712890 0.548672 7.339790 -1.162937 19.366125 0
24 624 -0.287427 -0.124020 0 -0.375625 0.003313 -0.881021 3.058979 13.556896 -2.243458 ... 141.342 141.342 141.342 0.957759 14.077638 0.552963 8.127728 -1.253333 14.372417 0
25 649 -0.133860 -0.209258 0 -0.217771 -0.061896 -0.906937 8.340938 13.584937 -3.330854 ... 209.939 209.939 209.939 0.934768 16.285465 0.539688 9.402417 -1.186604 18.595021 0
26 674 0.370613 -0.298640 0 -0.053958 -0.001812 -0.980750 3.474271 0.165229 0.699917 ... 210.670 210.670 210.670 0.982235 3.547921 0.567094 2.048393 -1.036521 4.339417 0
27 699 0.148621 -0.207852 0 -0.085833 0.108146 -0.964875 7.713375 3.545458 -3.878292 ... 258.659 258.659 258.659 0.974703 9.333144 0.562745 5.388493 -0.942562 7.380542 0
28 724 0.099657 -0.339254 0 -0.000479 0.009750 -0.933958 -3.399354 -1.110229 -13.351083 ... 270.244 270.244 270.244 0.934009 13.821709 0.539251 7.979967 -0.924687 -17.860667 0
29 749 -0.275138 0.177821 0 -0.080833 0.009521 -0.956729 -31.440542 -5.604646 -11.458333 ... 219.573 219.573 219.573 0.960185 33.929532 0.554363 19.589224 -1.028042 -48.503521 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
5454 48074 -1.066465 -0.250198 0 -0.913688 -0.257562 0.381917 -0.622396 -0.815500 0.401437 ... 7.500 7.500 7.500 1.023242 1.101621 0.590769 0.636021 -0.789333 -1.036458 7
5455 48099 -1.095753 -0.233986 0 -0.910042 -0.251187 0.393542 -0.525854 0.496729 0.786396 ... 7.012 7.012 7.012 1.022813 1.068495 0.590521 0.616896 -0.767687 0.757271 7
5456 48124 -1.119910 -0.250395 0 -0.914313 -0.252167 0.384813 -0.133375 0.088917 0.252854 ... 6.159 6.159 6.159 1.023541 0.299383 0.590942 0.172849 -0.781667 0.208396 7
5457 48149 -1.069318 -0.250071 0 -0.898792 -0.259396 0.413167 0.689833 -1.834417 -0.261667 ... 8.171 8.171 8.171 1.022653 1.977226 0.590429 1.141552 -0.745021 -1.406250 7
5458 48174 -1.069752 -0.260435 0 -0.933250 -0.186875 0.340604 5.585687 9.424458 6.156000 ... 19.756 19.756 19.756 1.010885 12.566489 0.583635 7.255266 -0.779521 21.166146 7
5459 48199 -1.429273 0.053432 0 -0.999063 -0.012167 0.165938 5.190583 11.650146 8.664937 ... 24.939 24.939 24.939 1.012822 15.419118 0.584753 8.902232 -0.845292 25.505667 7
5460 48224 -1.415300 0.044516 0 -0.979021 -0.050896 0.205583 -4.419458 -6.955021 -6.079708 ... 23.475 23.475 23.475 1.001667 10.240448 0.578313 5.912326 -0.824333 -17.454188 7
5461 48249 -1.060437 -0.291727 0 -0.910167 -0.234562 0.381375 -4.582021 -9.766271 -7.028688 ... 19.451 19.451 19.451 1.014332 12.875458 0.585625 7.433649 -0.763354 -21.376979 7
5462 48274 -1.024455 -0.268518 0 -0.877292 -0.271917 0.451167 0.783896 -1.704771 0.877792 ... 17.621 17.621 17.621 1.023294 2.071534 0.590799 1.196001 -0.698042 -0.043083 7
5463 48299 -1.035420 -0.258163 0 -0.873688 -0.267042 0.462313 -0.027875 0.199375 0.423042 ... 8.171 8.171 8.171 1.023901 0.468499 0.591150 0.270488 -0.678417 0.594542 7
5464 48324 -1.029049 -0.268655 0 -0.879083 -0.267958 0.451625 -0.379792 0.539812 0.481500 ... 5.366 5.366 5.366 1.023989 0.816995 0.591201 0.471693 -0.695417 0.641521 7
5465 48349 -1.009006 -0.261509 0 -0.871771 -0.266542 0.465354 0.039333 -1.089958 0.458646 ... 5.853 5.853 5.853 1.023515 1.183179 0.590927 0.683109 -0.672958 -0.591979 7
5466 48374 -1.003390 -0.273162 0 -0.863417 -0.269000 0.480396 -0.109313 -0.222313 0.284583 ... 6.036 6.036 6.036 1.024026 0.377306 0.591222 0.217838 -0.652021 -0.047042 7
5467 48399 -1.007909 -0.267401 0 -0.871813 -0.270937 0.465188 -0.005104 1.189042 0.403958 ... 6.891 6.891 6.891 1.024629 1.255798 0.591570 0.725035 -0.677562 1.587896 7
5468 48424 -1.007634 -0.270142 0 -0.860708 -0.269625 0.484708 0.750792 -1.852083 0.147375 ... 6.891 6.891 6.891 1.023943 2.003901 0.591174 1.156953 -0.645625 -0.953917 7
5469 48449 -0.938304 -0.261053 0 -0.841667 -0.262625 0.516646 0.298562 -0.142167 0.240146 ... 9.878 9.878 9.878 1.021909 0.408682 0.589999 0.235953 -0.587646 0.396542 7
5470 48474 -1.076837 -0.271327 0 -0.894125 -0.274167 0.367021 -3.236792 11.736562 0.755896 ... 21.951 21.951 21.951 1.004655 12.198160 0.580038 7.042611 -0.801271 9.255667 7
5471 48499 -1.323072 -0.246296 0 -0.928208 -0.262542 -0.055062 -7.691875 25.766000 1.657875 ... 30.671 30.671 30.671 0.966194 26.940680 0.557832 15.554209 -1.245813 19.732000 7
5472 48524 -0.782937 -0.170726 0 -0.761729 -0.193458 -0.572667 -6.111583 26.330083 1.967812 ... 24.939 24.939 24.939 0.972422 27.101606 0.561428 15.647119 -1.527854 22.186312 7
5473 48549 -0.614800 -0.133733 0 -0.687938 -0.169479 -0.718896 1.262646 -5.533500 -0.081250 ... 27.744 27.744 27.744 1.009352 5.676310 0.582750 3.277219 -1.576313 -4.352104 7
5474 48574 -1.251782 -0.259116 0 -0.849063 -0.238187 -0.211167 10.304854 -38.348521 -2.343771 ... 23.231 23.231 23.231 0.906770 39.778038 0.523524 22.965861 -1.298417 -30.387438 7
5475 48599 -0.967152 -0.273931 0 -0.872563 -0.275896 0.380854 9.277125 -25.746896 -1.800021 ... 18.719 18.719 18.719 0.991228 27.426406 0.572286 15.834643 -0.767604 -18.269792 7
5476 48624 -0.931174 -0.277562 0 -0.827042 -0.275583 0.536521 1.783521 -2.585104 -0.208271 ... 15.183 15.183 15.183 1.023620 3.147553 0.590988 1.817240 -0.566104 -1.009854 7
5477 48649 -0.943571 -0.279720 0 -0.833167 -0.273812 0.529854 -1.257563 -0.106729 2.056583 ... 17.195 17.195 17.195 1.024639 2.412963 0.591576 1.393125 -0.577125 0.692292 7
5478 48674 -0.933760 -0.248164 0 -0.821396 -0.262521 0.552979 -0.989521 -2.319563 1.135625 ... 17.195 17.195 17.195 1.024399 2.765713 0.591437 1.596785 -0.530938 -2.173458 7
5479 48699 -0.903053 -0.261470 0 -0.812313 -0.266896 0.564333 -0.640208 0.296021 -0.102938 ... 10.792 10.792 10.792 1.024479 0.712805 0.591483 0.411538 -0.514875 -0.447125 7
5480 48724 -0.960065 -0.272204 0 -0.823104 -0.276437 0.543750 -0.605896 1.737792 0.283208 ... 10.487 10.487 10.487 1.024491 1.862052 0.591490 1.075056 -0.555792 1.415104 7
5481 48749 -0.956441 -0.279585 0 -0.824250 -0.282312 0.539188 0.224854 -1.074708 0.232500 ... 9.146 9.146 9.146 1.024603 1.122325 0.591555 0.647975 -0.567375 -0.617354 7
5482 48774 -0.901472 -0.268531 0 -0.818313 -0.278708 0.549604 -0.019104 -0.395083 0.497979 ... 8.171 8.171 8.171 1.024392 0.635955 0.591433 0.367169 -0.547417 0.083792 7
5483 48799 -0.944411 -0.274120 0 -0.825625 -0.284750 0.535604 -0.684771 1.789875 0.191750 ... 4.513 4.513 4.513 1.024505 1.925963 0.591498 1.111955 -0.574771 1.296854 7
[5367 rows x 56 columns]
In [177]:
#1 Your mount
ymount_td = combine_setState_createFeatures('your_mount_raw_data', 'your_mount')
#2 Your side control
ysc_td = combine_setState_createFeatures('your_side_control_raw_data', 'your_side_control')
#3 Your closed guard
ycg_td = combine_setState_createFeatures('your_closed_guard_raw_data', 'your_closed_guard')
#4 Your back control
ybc_td = combine_setState_createFeatures('your_back_control_raw_data', 'your_back_control')
#5 Opponent mount or opponent side control
omountsc_td = combine_setState_createFeatures('opponent_mount_and_opponent_side_control_raw_data', 'opponent_mount_or_sc')
#6 Opponent closed guard
ocg_td = combine_setState_createFeatures('opponent_closed_guard_raw_data', 'opponent_closed_guard')
#7 Opponent back control
obc_td = combine_setState_createFeatures('opponent_back_control_raw_data', 'opponent_back_control')
#8 "Non jiu-jitsu" motion
nonjj_td = combine_setState_createFeatures('non_jj_raw_data', 'non_jj')
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/GL_ymount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymount.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_mount_raw_data/ymountUrs2.csv']
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:79: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:80: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:82: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:83: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/GL_ysc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/ysc2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_side_control_raw_data/yscUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/GL_ycg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycg2Urs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_closed_guard_raw_data/ycgUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/GL_ybc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/your_back_control_raw_data/ybcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_omount_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/GL_osc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount1.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omount2.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/omountUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/osc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_mount_and_opponent_side_control_raw_data/oscUrs_100.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_ocg_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/GL_standupfromocgx4_2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocg.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_closed_guard_raw_data/ocgUrs2_complete.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/GL_obc_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obc.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/opponent_back_control_raw_data/obcUrs.csv']
['/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/generalMotionUrs.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general1_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general2_CS.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_flat_sensor.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/GL_general_UrsWearing.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_lying.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_sitting.csv', '/Users/christophersamiullah/repos/sensor_readings/ML_Sandbox/data/non_jj_raw_data/train_standing.csv']
In [166]:
test_data1 = prep_test('test1_ymount_ycg.csv')
test_data4 = prep_test('GL_TEST1_CS.csv')
test_data5 = prep_test('GL_TEST2_CS.csv')
test_data6 = prep_test('GL_TEST3_CS_very_still.csv')
test_data7 = prep_test('GL_TEST1_UrsWearing.csv')
test_data100 = prep_test('CS_OCG_STAND_OCG.csv')
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:79: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:80: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:82: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/ipykernel/__main__.py:83: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
Removed 2 NaN rows
Removed 2 NaN rows
Removed 1 NaN rows
Removed 5 NaN rows
Removed 1 NaN rows
index ACCEL_X ACCEL_Y ACCEL_Z GYRO_X GYRO_Y GYRO_Z rolling_median_x rolling_median_y rolling_median_z ... rolling_std_y rolling_std_z rolling_std_gx rolling_std_gy rolling_std_gz acc_rss gyro_rss acc_rms gyro_rms state
0 14 -0.957107 -0.142429 0.343357 1.631143 -3.353714 2.633 -0.9605 -0.147 0.341 ... 0.023024 0.028165 3.959507 3.959507 3.959507 1.026759 4.565163 0.5928 2.635698 0
[1 rows x 36 columns]
ACCEL_X ACCEL_Y ACCEL_Z GYRO_X GYRO_Y GYRO_Z rolling_median_x rolling_median_y rolling_median_z rolling_median_gx ... rolling_std_x rolling_std_y rolling_std_z rolling_std_gx rolling_std_gy rolling_std_gz acc_rss gyro_rss acc_rms gyro_rms
14 -0.973643 -0.279821 0.168107 0.44 0.568429 0.723107 -0.9755 -0.2795 0.164 0.427 ... 0.00523 0.004372 0.012568 0.67042 0.67042 0.67042 1.026908 1.019605 0.592886 0.588669
[1 rows x 34 columns]
In [15]:
print training_data50.columns
Index([u'index', u'tiltx', u'tilty', u'ACCEL_X', u'ACCEL_Y', u'ACCEL_Z', u'GYRO_X', u'GYRO_Y', u'GYRO_Z', u'rolling_median_x', u'rolling_median_y', u'rolling_median_z', u'rolling_median_gx', u'rolling_median_gy', u'rolling_median_gz', u'rolling_max_x', u'rolling_max_y', u'rolling_max_z', u'rolling_max_gx', u'rolling_max_gy', u'rolling_max_gz', u'rolling_min_x', u'rolling_min_y', u'rolling_min_z', u'rolling_min_gx', u'rolling_min_gy', u'rolling_min_gz', u'rolling_sum_x', u'rolling_sum_y', u'rolling_sum_z', u'rolling_sum_gx', u'rolling_sum_gy', u'rolling_sum_gz', u'rolling_std_x', u'rolling_std_y', u'rolling_std_z', u'rolling_std_gx', u'rolling_std_gy', u'rolling_std_gz', u'avg_tiltx', u'avg_tilty', u'max_min_x', u'max_min_y', u'max_min_z', u'max_min_gx', u'max_min_gy', u'max_min_gz', u'acc_rss', u'gyro_rss', u'acc_rms', u'gyro_rms', u'acc_magnitude', u'gyro_magnitude', u'state'], dtype='object')
In [155]:
pre_smooth = trial(training_data, test_data1)
[7 7 7 7 0 5 5 5 5 0 0 5 5 5 5 5 0 0 5 5 5 0 5 7 7 5 5 5 5 7 7 5 5 0 1 1 6
3 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 4 2 2 2 2 2 2 4 2 2 2 2 2 2 4 4 4 4
4 4 4 4 4 4 4 4]
['OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'OTHER', 'OTHER', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'OTHER', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'your_side_control', 'your_side_control', 'opponent_back_control', 'your_back_control', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc']
Your Mount: 0.0853658536585
Your Side Control: 0.0243902439024
Your Closed Guard: 0.341463414634
Your Back Control: 0.0121951219512
Opponent Mount or Opponent Side Control: 0.19512195122
Opponent Closed Guard: 0.231707317073
Opponent Back Control: 0.0121951219512
OTHER: 0.0975609756098
In [12]:
test_model_stand(training_data50) # newest with tilt
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-12-306fe3255187> in <module>()
----> 1 test_model_stand(training_data50) # newest with tilt
<ipython-input-8-1fd74f857e4f> in test_model_stand(df_train)
2 """check model accuracy"""
3
----> 4 y = df_train['stand'].values
5 X = df_train.drop(['stand', 'state', 'index'], axis=1)
6
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/pandas/core/frame.pyc in __getitem__(self, key)
1795 return self._getitem_multilevel(key)
1796 else:
-> 1797 return self._getitem_column(key)
1798
1799 def _getitem_column(self, key):
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
1802 # get column
1803 if self.columns.is_unique:
-> 1804 return self._get_item_cache(key)
1805
1806 # duplicate columns & possible reduce dimensionaility
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
1082 res = cache.get(item)
1083 if res is None:
-> 1084 values = self._data.get(item)
1085 res = self._box_item_values(item, values)
1086 cache[item] = res
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item, fastpath)
2849
2850 if not isnull(item):
-> 2851 loc = self.items.get_loc(item)
2852 else:
2853 indexer = np.arange(len(self.items))[isnull(self.items)]
/Users/christophersamiullah/repos/sensor_readings/venv/lib/python2.7/site-packages/pandas/core/index.pyc in get_loc(self, key, method)
1570 """
1571 if method is None:
-> 1572 return self._engine.get_loc(_values_from_object(key))
1573
1574 indexer = self.get_indexer([key], method=method)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3824)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3704)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12280)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12231)()
KeyError: 'stand'
In [204]:
print '*** 30 rows ***'
test_model(training_data)
print '*** 10 rows ***'
test_model(training_data10)
print '*** 20 rows ***'
test_model(training_data20)
print '*** 26 rows ***'
test_model(training_data26)
print '*** 36 rows ***'
test_model(training_data36)
print '*** 40 rows ***'
test_model(training_data40)
print '*** 50 rows ***'
test_model(training_data50)
print '*** 60 rows ***'
test_model(training_data60)
print '*** 56 rows ***'
test_model(training_data56)
print '*** 64 rows ***'
test_model(training_data64)
print '*** 70 rows ***'
test_model(training_data70)
*** 30 rows ***
rf prediction: 0.810615199035
Random Forest Accuracy: 0.73 (+/- 0.15)
Feature ranking:
1. feature rolling_max_z (0.100646)
2. feature ACCEL_Z (0.087646)
3. feature rolling_median_z (0.077526)
4. feature rolling_min_z (0.067189)
5. feature ACCEL_X (0.064614)
6. feature rolling_max_x (0.060364)
7. feature rolling_median_x (0.055946)
8. feature rolling_min_x (0.051143)
9. feature acc_rms (0.040409)
10. feature acc_rss (0.040108)
11. feature rolling_std_x (0.033889)
12. feature ACCEL_Y (0.029493)
13. feature rolling_median_y (0.028272)
14. feature rolling_std_y (0.026964)
15. feature rolling_max_y (0.024981)
16. feature rolling_min_y (0.024974)
17. feature rolling_std_gz (0.020580)
18. feature rolling_std_gy (0.019857)
19. feature rolling_std_gx (0.019550)
20. feature rolling_std_z (0.018499)
21. feature rolling_min_gx (0.009949)
22. feature rolling_max_gx (0.009949)
23. feature rolling_max_gy (0.009839)
24. feature gyro_rss (0.009706)
25. feature rolling_max_gz (0.009641)
26. feature gyro_rms (0.009547)
27. feature rolling_min_gy (0.009463)
28. feature rolling_min_gz (0.009357)
29. feature GYRO_Y (0.006623)
30. feature GYRO_X (0.005038)
31. feature rolling_median_gy (0.004582)
32. feature rolling_median_gx (0.004578)
33. feature rolling_median_gz (0.004571)
34. feature GYRO_Z (0.004507)
*** 10 rows ***
rf prediction: 0.800959232614
Random Forest Accuracy: 0.69 (+/- 0.16)
Feature ranking:
1. feature rolling_max_z (0.089464)
2. feature ACCEL_Z (0.082839)
3. feature rolling_median_z (0.079682)
4. feature ACCEL_X (0.068628)
5. feature rolling_min_z (0.067635)
6. feature rolling_median_x (0.061184)
7. feature rolling_max_x (0.059554)
8. feature rolling_min_x (0.054527)
9. feature rolling_std_x (0.045481)
10. feature rolling_std_y (0.033907)
11. feature rolling_std_z (0.031163)
12. feature ACCEL_Y (0.030227)
13. feature rolling_median_y (0.028829)
14. feature rolling_min_y (0.028702)
15. feature rolling_max_y (0.027918)
16. feature rolling_std_gy (0.021460)
17. feature rolling_std_gx (0.021381)
18. feature rolling_std_gz (0.019895)
19. feature gyro_rms (0.018262)
20. feature gyro_rss (0.017605)
21. feature acc_rss (0.016375)
22. feature acc_rms (0.015937)
23. feature GYRO_Y (0.010971)
24. feature GYRO_Z (0.008386)
25. feature rolling_max_gx (0.006950)
26. feature rolling_max_gz (0.006948)
27. feature rolling_max_gy (0.006897)
28. feature rolling_min_gx (0.006375)
29. feature rolling_min_gz (0.006246)
30. feature rolling_min_gy (0.006194)
31. feature GYRO_X (0.005422)
32. feature rolling_median_gy (0.005065)
33. feature rolling_median_gx (0.004993)
34. feature rolling_median_gz (0.004900)
*** 20 rows ***
rf prediction: 0.802884615385
Random Forest Accuracy: 0.71 (+/- 0.15)
Feature ranking:
1. feature rolling_max_z (0.098546)
2. feature ACCEL_Z (0.089308)
3. feature rolling_median_z (0.079295)
4. feature rolling_min_z (0.068500)
5. feature ACCEL_X (0.065135)
6. feature rolling_max_x (0.059484)
7. feature rolling_median_x (0.057757)
8. feature rolling_min_x (0.051230)
9. feature rolling_std_x (0.040991)
10. feature rolling_std_y (0.032525)
11. feature ACCEL_Y (0.030590)
12. feature rolling_median_y (0.028329)
13. feature acc_rms (0.027649)
14. feature acc_rss (0.027370)
15. feature rolling_min_y (0.027086)
16. feature rolling_max_y (0.026972)
17. feature rolling_std_z (0.025566)
18. feature rolling_std_gz (0.020795)
19. feature rolling_std_gx (0.019664)
20. feature rolling_std_gy (0.019358)
21. feature gyro_rss (0.012864)
22. feature gyro_rms (0.012821)
23. feature GYRO_Y (0.008507)
24. feature rolling_max_gz (0.008104)
25. feature rolling_max_gx (0.007858)
26. feature rolling_max_gy (0.007840)
27. feature rolling_min_gz (0.006576)
28. feature rolling_min_gx (0.006537)
29. feature rolling_min_gy (0.006279)
30. feature GYRO_Z (0.006209)
31. feature GYRO_X (0.005277)
32. feature rolling_median_gy (0.005029)
33. feature rolling_median_gz (0.005016)
34. feature rolling_median_gx (0.004934)
*** 26 rows ***
rf prediction: 0.791231732777
Random Forest Accuracy: 0.72 (+/- 0.15)
Feature ranking:
1. feature rolling_max_z (0.098693)
2. feature ACCEL_Z (0.087887)
3. feature rolling_median_z (0.077902)
4. feature rolling_min_z (0.068842)
5. feature ACCEL_X (0.063630)
6. feature rolling_max_x (0.060951)
7. feature rolling_median_x (0.056119)
8. feature rolling_min_x (0.051121)
9. feature rolling_std_x (0.039040)
10. feature acc_rss (0.036294)
11. feature acc_rms (0.034864)
12. feature rolling_std_y (0.031352)
13. feature ACCEL_Y (0.030592)
14. feature rolling_median_y (0.027059)
15. feature rolling_max_y (0.026216)
16. feature rolling_min_y (0.026133)
17. feature rolling_std_gx (0.020209)
18. feature rolling_std_gz (0.019481)
19. feature rolling_std_gy (0.019188)
20. feature rolling_std_z (0.019025)
21. feature gyro_rms (0.010415)
22. feature gyro_rss (0.010354)
23. feature rolling_max_gx (0.009905)
24. feature rolling_max_gy (0.009724)
25. feature rolling_max_gz (0.009401)
26. feature rolling_min_gx (0.008009)
27. feature rolling_min_gz (0.007938)
28. feature rolling_min_gy (0.007885)
29. feature GYRO_Y (0.007418)
30. feature GYRO_X (0.005203)
31. feature GYRO_Z (0.005201)
32. feature rolling_median_gy (0.004660)
33. feature rolling_median_gx (0.004659)
34. feature rolling_median_gz (0.004631)
*** 36 rows ***
rf prediction: 0.811594202899
Random Forest Accuracy: 0.74 (+/- 0.14)
Feature ranking:
1. feature rolling_max_z (0.102962)
2. feature ACCEL_Z (0.087586)
3. feature rolling_median_z (0.079168)
4. feature rolling_min_z (0.066650)
5. feature ACCEL_X (0.064979)
6. feature rolling_max_x (0.062869)
7. feature rolling_median_x (0.055817)
8. feature rolling_min_x (0.048738)
9. feature acc_rms (0.040374)
10. feature acc_rss (0.039679)
11. feature rolling_std_x (0.033492)
12. feature ACCEL_Y (0.029549)
13. feature rolling_median_y (0.028143)
14. feature rolling_std_y (0.027482)
15. feature rolling_min_y (0.025169)
16. feature rolling_max_y (0.024220)
17. feature rolling_std_gy (0.019574)
18. feature rolling_std_gz (0.019328)
19. feature rolling_std_gx (0.018373)
20. feature rolling_std_z (0.017382)
21. feature rolling_max_gx (0.011005)
22. feature rolling_min_gy (0.010928)
23. feature rolling_min_gx (0.010718)
24. feature rolling_max_gz (0.010375)
25. feature rolling_min_gz (0.010355)
26. feature rolling_max_gy (0.009867)
27. feature gyro_rss (0.008999)
28. feature gyro_rms (0.008670)
29. feature GYRO_Y (0.005876)
30. feature GYRO_X (0.004807)
31. feature rolling_median_gz (0.004268)
32. feature rolling_median_gy (0.004259)
33. feature rolling_median_gx (0.004199)
34. feature GYRO_Z (0.004136)
*** 40 rows ***
rf prediction: 0.808064516129
Random Forest Accuracy: 0.75 (+/- 0.15)
Feature ranking:
1. feature rolling_max_z (0.101670)
2. feature ACCEL_Z (0.087326)
3. feature rolling_median_z (0.078171)
4. feature rolling_min_z (0.069127)
5. feature ACCEL_X (0.063274)
6. feature rolling_max_x (0.060005)
7. feature rolling_median_x (0.054192)
8. feature rolling_min_x (0.048366)
9. feature acc_rss (0.042914)
10. feature acc_rms (0.042417)
11. feature rolling_std_x (0.031020)
12. feature ACCEL_Y (0.029493)
13. feature rolling_median_y (0.028651)
14. feature rolling_std_y (0.028226)
15. feature rolling_max_y (0.024177)
16. feature rolling_min_y (0.024117)
17. feature rolling_std_gz (0.020776)
18. feature rolling_std_gy (0.020449)
19. feature rolling_std_gx (0.019703)
20. feature rolling_std_z (0.015980)
21. feature rolling_max_gy (0.012712)
22. feature rolling_max_gz (0.012569)
23. feature rolling_max_gx (0.012219)
24. feature rolling_min_gx (0.009780)
25. feature rolling_min_gz (0.009582)
26. feature rolling_min_gy (0.009407)
27. feature gyro_rms (0.008137)
28. feature gyro_rss (0.007899)
29. feature GYRO_Y (0.006029)
30. feature GYRO_X (0.005056)
31. feature GYRO_Z (0.004179)
32. feature rolling_median_gy (0.004155)
33. feature rolling_median_gx (0.004112)
34. feature rolling_median_gz (0.004107)
*** 50 rows ***
rf prediction: 0.826262626263
Random Forest Accuracy: 0.75 (+/- 0.13)
Feature ranking:
1. feature rolling_max_z (0.103500)
2. feature ACCEL_Z (0.090047)
3. feature rolling_median_z (0.079806)
4. feature ACCEL_X (0.066519)
5. feature rolling_min_z (0.066011)
6. feature rolling_max_x (0.060945)
7. feature rolling_median_x (0.052998)
8. feature rolling_min_x (0.050469)
9. feature acc_rss (0.043880)
10. feature acc_rms (0.043259)
11. feature rolling_std_x (0.030966)
12. feature rolling_median_y (0.027746)
13. feature ACCEL_Y (0.027664)
14. feature rolling_max_y (0.024803)
15. feature rolling_std_y (0.024480)
16. feature rolling_min_y (0.022475)
17. feature rolling_std_gz (0.020139)
18. feature rolling_std_gy (0.019673)
19. feature rolling_std_gx (0.019011)
20. feature rolling_std_z (0.015849)
21. feature rolling_max_gx (0.012532)
22. feature rolling_max_gy (0.012443)
23. feature rolling_max_gz (0.011480)
24. feature rolling_min_gx (0.011030)
25. feature rolling_min_gy (0.010424)
26. feature rolling_min_gz (0.010036)
27. feature gyro_rms (0.008350)
28. feature gyro_rss (0.008293)
29. feature GYRO_Y (0.004905)
30. feature GYRO_X (0.004762)
31. feature GYRO_Z (0.003943)
32. feature rolling_median_gx (0.003897)
33. feature rolling_median_gy (0.003855)
34. feature rolling_median_gz (0.003811)
*** 60 rows ***
rf prediction: 0.83698296837
Random Forest Accuracy: 0.76 (+/- 0.13)
Feature ranking:
1. feature rolling_max_z (0.104726)
2. feature ACCEL_Z (0.087126)
3. feature rolling_median_z (0.079576)
4. feature rolling_min_z (0.069418)
5. feature ACCEL_X (0.064232)
6. feature rolling_max_x (0.059813)
7. feature rolling_median_x (0.052843)
8. feature rolling_min_x (0.048988)
9. feature acc_rss (0.047840)
10. feature acc_rms (0.046530)
11. feature ACCEL_Y (0.026955)
12. feature rolling_median_y (0.026871)
13. feature rolling_std_x (0.026059)
14. feature rolling_max_y (0.023962)
15. feature rolling_std_y (0.022477)
16. feature rolling_min_y (0.022035)
17. feature rolling_std_gy (0.021415)
18. feature rolling_std_gz (0.021040)
19. feature rolling_std_gx (0.019715)
20. feature rolling_std_z (0.016232)
21. feature rolling_max_gz (0.013889)
22. feature rolling_max_gy (0.013139)
23. feature rolling_max_gx (0.013088)
24. feature rolling_min_gz (0.011377)
25. feature rolling_min_gy (0.011207)
26. feature rolling_min_gx (0.011182)
27. feature gyro_rss (0.007674)
28. feature gyro_rms (0.007672)
29. feature GYRO_Y (0.005013)
30. feature GYRO_X (0.004235)
31. feature GYRO_Z (0.003438)
32. feature rolling_median_gy (0.003426)
33. feature rolling_median_gz (0.003422)
34. feature rolling_median_gx (0.003384)
*** 56 rows ***
rf prediction: 0.816326530612
Random Forest Accuracy: 0.75 (+/- 0.13)
Feature ranking:
1. feature rolling_max_z (0.101267)
2. feature ACCEL_Z (0.092868)
3. feature rolling_median_z (0.077312)
4. feature rolling_min_z (0.070636)
5. feature ACCEL_X (0.066966)
6. feature rolling_max_x (0.061292)
7. feature rolling_median_x (0.053524)
8. feature rolling_min_x (0.047428)
9. feature acc_rss (0.043532)
10. feature acc_rms (0.043411)
11. feature ACCEL_Y (0.028172)
12. feature rolling_median_y (0.027698)
13. feature rolling_std_x (0.027267)
14. feature rolling_max_y (0.024520)
15. feature rolling_std_y (0.023518)
16. feature rolling_min_y (0.022885)
17. feature rolling_std_gy (0.021073)
18. feature rolling_std_gx (0.020541)
19. feature rolling_std_gz (0.020238)
20. feature rolling_std_z (0.016658)
21. feature rolling_min_gz (0.012928)
22. feature rolling_min_gy (0.012392)
23. feature rolling_min_gx (0.012094)
24. feature rolling_max_gy (0.011247)
25. feature rolling_max_gx (0.010766)
26. feature rolling_max_gz (0.010575)
27. feature gyro_rss (0.008002)
28. feature gyro_rms (0.007602)
29. feature GYRO_X (0.005083)
30. feature GYRO_Y (0.004223)
31. feature rolling_median_gz (0.003678)
32. feature rolling_median_gx (0.003671)
33. feature rolling_median_gy (0.003540)
34. feature GYRO_Z (0.003394)
*** 64 rows ***
rf prediction: 0.828571428571
Random Forest Accuracy: 0.76 (+/- 0.13)
Feature ranking:
1. feature rolling_max_z (0.104010)
2. feature ACCEL_Z (0.091539)
3. feature rolling_median_z (0.081851)
4. feature rolling_min_z (0.068738)
5. feature ACCEL_X (0.065797)
6. feature rolling_max_x (0.062562)
7. feature rolling_median_x (0.052209)
8. feature acc_rms (0.045524)
9. feature acc_rss (0.044960)
10. feature rolling_min_x (0.044215)
11. feature rolling_std_x (0.027046)
12. feature ACCEL_Y (0.026750)
13. feature rolling_median_y (0.026077)
14. feature rolling_max_y (0.025093)
15. feature rolling_std_y (0.023375)
16. feature rolling_min_y (0.022309)
17. feature rolling_std_gz (0.021353)
18. feature rolling_std_gy (0.020880)
19. feature rolling_std_gx (0.020552)
20. feature rolling_std_z (0.015625)
21. feature rolling_max_gx (0.012570)
22. feature rolling_max_gz (0.012336)
23. feature rolling_min_gx (0.011721)
24. feature rolling_min_gz (0.011674)
25. feature rolling_min_gy (0.011612)
26. feature rolling_max_gy (0.011607)
27. feature gyro_rss (0.008293)
28. feature gyro_rms (0.008283)
29. feature GYRO_X (0.004370)
30. feature GYRO_Y (0.004322)
31. feature GYRO_Z (0.003344)
32. feature rolling_median_gz (0.003166)
33. feature rolling_median_gy (0.003121)
34. feature rolling_median_gx (0.003117)
*** 70 rows ***
rf prediction: 0.832386363636
Random Forest Accuracy: 0.76 (+/- 0.12)
Feature ranking:
1. feature rolling_max_z (0.098302)
2. feature ACCEL_Z (0.091922)
3. feature rolling_median_z (0.081628)
4. feature ACCEL_X (0.068240)
5. feature rolling_min_z (0.068104)
6. feature rolling_max_x (0.061481)
7. feature rolling_median_x (0.054829)
8. feature rolling_min_x (0.046176)
9. feature acc_rms (0.045980)
10. feature acc_rss (0.045900)
11. feature rolling_max_y (0.025905)
12. feature ACCEL_Y (0.025563)
13. feature rolling_median_y (0.025487)
14. feature rolling_std_x (0.023889)
15. feature rolling_min_y (0.022483)
16. feature rolling_std_gz (0.022034)
17. feature rolling_std_y (0.021972)
18. feature rolling_std_gy (0.021518)
19. feature rolling_std_gx (0.021482)
20. feature rolling_std_z (0.014809)
21. feature rolling_max_gy (0.012597)
22. feature rolling_max_gx (0.012545)
23. feature rolling_min_gz (0.012171)
24. feature rolling_min_gx (0.011985)
25. feature rolling_max_gz (0.011959)
26. feature rolling_min_gy (0.011658)
27. feature gyro_rms (0.008552)
28. feature gyro_rss (0.008284)
29. feature GYRO_X (0.004983)
30. feature GYRO_Y (0.004046)
31. feature rolling_median_gx (0.003526)
32. feature rolling_median_gz (0.003412)
33. feature rolling_median_gy (0.003408)
34. feature GYRO_Z (0.003170)
In [205]:
print training_data70
index ACCEL_X ACCEL_Y ACCEL_Z GYRO_X GYRO_Y GYRO_Z rolling_median_x rolling_median_y rolling_median_z ... rolling_std_y rolling_std_z rolling_std_gx rolling_std_gy rolling_std_gz acc_rss gyro_rss acc_rms gyro_rms state
0 34 -0.960191 -0.159721 0.313868 -2.416632 0.650971 -1.270588 -0.9620 -0.1450 0.3145 ... 0.060615 0.053717 13.342895 13.342895 13.342895 1.022737 2.806825 0.590477 1.620521 0
1 69 -0.982074 -0.210000 0.102059 -5.165956 7.133265 0.401721 -0.9820 -0.1740 0.0570 ... 0.082127 0.179222 19.247336 19.247336 19.247336 1.009448 8.816572 0.582805 5.090250 0
2 104 -1.008515 -0.184912 -0.044074 -0.022397 4.052206 4.580324 -1.0115 -0.1565 -0.0300 ... 0.067879 0.045111 14.121794 14.121794 14.121794 1.026273 6.115573 0.592519 3.530828 0
3 139 -1.015176 -0.152309 -0.007074 0.073500 -0.937971 1.153162 -1.0155 -0.1560 -0.0050 ... 0.016627 0.021366 3.891751 3.891751 3.891751 1.026563 1.488279 0.592686 0.859258 0
4 174 -1.011485 -0.152265 0.062794 1.745809 -3.368044 1.022324 -1.0140 -0.1590 0.0395 ... 0.040219 0.067630 4.679675 4.679675 4.679675 1.024807 3.928959 0.591673 2.268385 0
5 209 -1.008868 -0.145838 0.109500 0.451868 0.016147 0.243015 -1.0130 -0.1580 0.1110 ... 0.047927 0.058597 8.933034 8.933034 8.933034 1.025218 0.513324 0.591910 0.296368 0
6 244 -1.011338 -0.152309 0.091368 -1.400676 2.006838 -0.829485 -1.0120 -0.1590 0.0800 ... 0.030541 0.052417 7.232336 7.232336 7.232336 1.026816 2.584055 0.592832 1.491905 0
7 279 -1.010926 -0.164500 0.074382 -0.184691 0.365882 0.278015 -1.0120 -0.1670 0.0735 ... 0.012990 0.036140 1.852105 1.852105 1.852105 1.026920 0.495250 0.592893 0.285933 0
8 314 -1.011838 -0.168368 0.053426 -0.256456 0.772103 0.329206 -1.0120 -0.1680 0.0520 ... 0.002608 0.014139 0.777181 0.777181 0.777181 1.027141 0.877661 0.593020 0.506718 0
9 349 -1.012721 -0.165750 0.033750 -0.224221 0.868897 0.590176 -1.0130 -0.1660 0.0305 ... 0.004068 0.017010 0.821403 0.821403 0.821403 1.026750 1.074042 0.592794 0.620098 0
10 384 -1.011838 -0.164868 0.014794 -0.578426 2.065044 -0.335309 -1.0130 -0.1620 0.0225 ... 0.023757 0.045000 2.839034 2.839034 2.839034 1.025289 2.170580 0.591951 1.253185 0
11 419 -1.011500 -0.147779 -0.033544 0.646485 1.083176 3.358985 -1.0125 -0.1485 -0.0605 ... 0.071261 0.063230 4.704303 4.704303 4.704303 1.022788 3.588035 0.590507 2.071553 0
12 454 -1.011941 -0.089809 0.028176 -0.576574 -3.996603 2.208574 -1.0120 -0.0835 -0.0070 ... 0.084651 0.106815 6.474305 6.474305 6.474305 1.016309 4.602507 0.586766 2.657259 0
13 489 -1.011441 -0.107426 0.042426 -2.882882 0.286103 -0.550529 -1.0105 -0.1155 0.0360 ... 0.074967 0.097266 7.838282 7.838282 7.838282 1.018015 2.948889 0.587751 1.702542 0
14 524 -1.017882 -0.071221 -0.037059 4.268221 4.273735 4.516706 -1.0170 -0.0545 -0.0300 ... 0.088326 0.052603 9.280327 9.280327 9.280327 1.021044 7.542092 0.589500 4.354429 0
15 559 -1.016574 0.012897 -0.098676 2.374382 1.219529 0.309353 -1.0155 0.0150 -0.1290 ... 0.051083 0.087720 10.148440 10.148440 10.148440 1.021433 2.687125 0.589725 1.551413 0
16 594 -1.010603 -0.072603 -0.107662 -5.147059 -0.659926 -4.313162 -1.0085 -0.0920 -0.1290 ... 0.099709 0.072855 7.069291 7.069291 7.069291 1.018911 6.747672 0.588269 3.895770 0
17 629 -0.999397 -0.160015 -0.109471 -8.072985 2.983353 -3.078353 -1.0030 -0.1650 -0.1005 ... 0.032583 0.091667 8.689036 8.689036 8.689036 1.018029 9.140555 0.587759 5.277302 0
18 664 -0.920809 -0.131824 -0.349971 -7.134176 8.427176 -0.347912 -0.9070 -0.1330 -0.4150 ... 0.042299 0.202276 10.524675 10.524675 10.524675 0.993854 11.046937 0.573802 6.377952 0
19 699 -0.713912 -0.097074 -0.684265 -2.074971 12.645279 0.673441 -0.6645 -0.1045 -0.7415 ... 0.033578 0.156202 8.789682 8.789682 8.789682 0.993635 12.832074 0.573676 7.408601 0
20 734 -0.579926 -0.096221 -0.821941 -0.924529 6.047382 -0.160441 -0.5810 -0.1020 -0.8180 ... 0.026412 0.033755 5.787349 5.787349 5.787349 1.010525 6.119749 0.583427 3.533239 0
21 769 -0.636809 -0.116485 -0.761412 2.617456 -7.888235 1.277838 -0.5835 -0.1060 -0.8135 ... 0.024467 0.122810 6.945023 6.945023 6.945023 0.999421 8.408817 0.577016 4.854833 0
22 804 -0.729544 -0.072441 -0.672221 7.840779 -1.607706 6.570132 -0.6995 -0.1020 -0.7290 ... 0.072220 0.161806 12.580696 12.580696 12.580696 0.994667 10.355152 0.574271 5.978550 0
23 839 -0.711882 -0.032353 -0.708750 4.310485 7.503618 4.496941 -0.6835 -0.0435 -0.7455 ... 0.040979 0.115254 11.276064 11.276064 11.276064 1.005062 9.752284 0.580273 5.630484 0
24 874 -0.676618 -0.045647 -0.751529 -0.248412 0.116603 -0.092353 -0.6760 -0.0430 -0.7500 ... 0.009864 0.011421 2.047521 2.047521 2.047521 1.012270 0.289541 0.584435 0.167166 0
25 909 -0.681618 -0.039544 -0.748118 -0.263662 -0.222294 0.450265 -0.6810 -0.0400 -0.7490 ... 0.004202 0.009510 0.951785 0.951785 0.951785 1.012841 0.567160 0.584764 0.327450 0
26 944 -0.687015 -0.040176 -0.743912 0.004515 0.038603 0.402779 -0.6870 -0.0400 -0.7440 ... 0.003464 0.008329 0.562890 0.562890 0.562890 1.013414 0.404650 0.585095 0.233625 0
27 979 -0.694221 -0.042412 -0.736853 0.037706 0.083412 0.430559 -0.6915 -0.0420 -0.7385 ... 0.006184 0.012033 0.839285 0.839285 0.839285 1.013259 0.440182 0.585005 0.254139 0
28 1014 -0.700221 -0.039544 -0.732059 -0.121912 -0.292279 0.724588 -0.7000 -0.0420 -0.7305 ... 0.009429 0.011096 1.117233 1.117233 1.117233 1.013796 0.790770 0.585316 0.456552 0
29 1049 -0.700382 -0.030132 -0.732676 -0.216088 -0.147941 0.741588 -0.6990 -0.0290 -0.7335 ... 0.008065 0.011268 0.990342 0.990342 0.990342 1.014031 0.786469 0.585451 0.454068 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
3567 45009 -0.908868 -0.246926 0.398088 -0.069015 -0.045721 0.628588 -0.9080 -0.2460 0.4025 ... 0.009679 0.023650 3.521541 3.521541 3.521541 1.022491 0.634016 0.590335 0.366049 7
3568 45044 -0.916382 -0.246235 0.385294 0.230471 0.199882 0.170353 -0.9145 -0.2470 0.3905 ... 0.007906 0.024327 2.579916 2.579916 2.579916 1.024129 0.349413 0.591281 0.201734 7
3569 45079 -0.908912 -0.251044 0.395441 -0.137191 -0.569456 0.155985 -0.9080 -0.2505 0.3970 ... 0.010039 0.029884 2.378016 2.378016 2.378016 1.022505 0.606162 0.590344 0.349968 7
3570 45114 -0.909000 -0.253221 0.392221 -0.214294 0.190956 0.521853 -0.9090 -0.2545 0.3845 ... 0.011210 0.038614 2.442711 2.442711 2.442711 1.021880 0.595581 0.589983 0.343859 7
3571 45149 -0.933515 -0.236897 0.337412 1.276059 2.258750 2.443544 -0.9380 -0.2520 0.3425 ... 0.043550 0.067794 4.288816 4.288816 4.288816 1.020498 3.563872 0.589185 2.057603 7
3572 45184 -0.955132 -0.214485 0.294706 0.518382 1.687544 0.672603 -0.9635 -0.2205 0.2875 ... 0.044837 0.059862 4.780064 4.780064 4.780064 1.022318 1.889159 0.590235 1.090706 7
3573 45219 -0.936412 -0.233235 0.330647 -0.966559 -2.194221 -1.390809 -0.9350 -0.2390 0.3345 ... 0.027509 0.082367 4.624870 4.624870 4.624870 1.020095 2.771857 0.588952 1.600332 7
3574 45254 -0.921426 -0.250147 0.364897 0.334471 -1.350397 0.329926 -0.9240 -0.2500 0.3675 ... 0.013179 0.062236 3.003730 3.003730 3.003730 1.022130 1.429788 0.590127 0.825489 7
3575 45289 -0.917485 -0.254162 0.374926 -0.122853 -0.781015 0.274397 -0.9145 -0.2565 0.3840 ... 0.012710 0.037316 1.960822 1.960822 1.960822 1.023204 0.836881 0.590747 0.483174 7
3576 45324 -0.912029 -0.253162 0.387485 -0.470721 -0.757691 0.666294 -0.9125 -0.2520 0.3905 ... 0.010858 0.031410 1.527479 1.527479 1.527479 1.022758 1.113383 0.590489 0.642812 7
3577 45359 -0.909515 -0.253279 0.395191 0.227794 -0.165015 0.139912 -0.9060 -0.2540 0.3975 ... 0.009893 0.032225 1.899527 1.899527 1.899527 1.023496 0.314158 0.590916 0.181379 7
3578 45394 -0.922912 -0.211147 0.363118 4.115897 5.390897 4.141868 -0.9050 -0.2545 0.4035 ... 0.088539 0.095725 5.061890 5.061890 5.061890 1.014004 7.947166 0.585435 4.588298 7
3579 45429 -0.979691 -0.052338 0.214426 3.151044 6.761088 4.598324 -1.0050 0.0045 0.1650 ... 0.134073 0.131022 6.735429 6.735429 6.735429 1.004247 8.762761 0.579802 5.059182 7
3580 45464 -0.952985 -0.113735 0.266397 -3.565235 -5.713779 -3.755324 -0.9580 -0.1355 0.3045 ... 0.168256 0.150168 6.321781 6.321781 6.321781 0.996034 7.711072 0.575061 4.451990 7
3581 45499 -0.883147 -0.272191 0.437426 -1.969985 -5.114809 -2.679324 -0.8820 -0.2730 0.4455 ... 0.018871 0.034385 5.912879 5.912879 5.912879 1.022438 6.100892 0.590305 3.522352 7
3582 45534 -0.875735 -0.268132 0.458250 0.182074 0.254618 0.533574 -0.8760 -0.2695 0.4575 ... 0.007356 0.014908 1.801497 1.801497 1.801497 1.024110 0.618613 0.591270 0.357156 7
3583 45569 -0.873176 -0.267676 0.462309 -0.210750 -0.422382 0.382941 -0.8740 -0.2685 0.4585 ... 0.007376 0.022201 1.267338 1.267338 1.267338 1.023629 0.607837 0.590993 0.350935 7
3584 45604 -0.866676 -0.268500 0.474765 -0.132750 -0.273500 0.303103 -0.8675 -0.2685 0.4760 ... 0.007762 0.018668 1.435619 1.435619 1.435619 1.024022 0.429297 0.591220 0.247855 7
3585 45639 -0.864632 -0.270412 0.477824 0.351500 -0.644676 0.260074 -0.8645 -0.2700 0.4735 ... 0.006129 0.028255 1.728554 1.728554 1.728554 1.024220 0.778973 0.591334 0.449740 7
3586 45674 -0.854985 -0.266221 0.492809 -0.018809 0.911147 0.425059 -0.8460 -0.2670 0.5135 ... 0.012119 0.045633 2.575016 2.575016 2.575016 1.022122 1.005593 0.590123 0.580580 7
3587 45709 -0.902324 -0.269382 0.273897 -4.115853 13.870176 1.104779 -0.9145 -0.2670 0.3310 ... 0.021051 0.267737 6.821711 6.821711 6.821711 0.980701 14.510085 0.566208 8.377402 7
3588 45744 -0.823985 -0.223485 -0.339059 -6.559397 25.122853 1.744147 -0.8900 -0.2335 -0.3085 ... 0.058541 0.413011 6.632969 6.632969 6.632969 0.918618 26.023556 0.530364 15.024707 7
3589 45779 -0.746353 -0.188603 -0.609074 1.362059 -4.481662 -0.111132 -0.7195 -0.1735 -0.7280 ... 0.047961 0.260130 9.899432 9.899432 9.899432 0.981623 4.685387 0.566740 2.705109 7
3590 45814 -0.837574 -0.244103 -0.008779 8.680897 -30.697574 -1.739574 -0.8430 -0.2625 0.1395 ... 0.051541 0.517858 6.324316 6.324316 6.324316 0.872464 31.948789 0.503717 18.445642 7
3591 45849 -0.842882 -0.279441 0.493162 3.402941 -10.573897 -0.307559 -0.8325 -0.2785 0.5250 ... 0.017432 0.093803 5.479804 5.479804 5.479804 1.015749 11.112241 0.586443 6.415655 7
3592 45884 -0.829294 -0.271824 0.536897 -1.074191 -0.484221 0.990853 -0.8300 -0.2700 0.5360 ... 0.019754 0.017001 4.122904 4.122904 4.122904 1.024634 1.539528 0.591573 0.888847 7
3593 45919 -0.818500 -0.263147 0.556926 -0.335309 -0.366706 0.676956 -0.8180 -0.2650 0.5565 ... 0.010474 0.019476 3.398990 3.398990 3.398990 1.024381 0.839747 0.591426 0.484828 7
3594 45954 -0.821103 -0.275500 0.546574 -0.475191 1.362985 0.258191 -0.8235 -0.2780 0.5395 ... 0.010305 0.022552 2.606160 2.606160 2.606160 1.024135 1.466355 0.591285 0.846601 7
3595 45989 -0.821912 -0.280426 0.543441 -0.143485 -0.254662 0.457324 -0.8205 -0.2800 0.5460 ... 0.005109 0.016843 2.193928 2.193928 2.193928 1.024454 0.542757 0.591469 0.313361 7
3596 46024 -0.822529 -0.284044 0.540382 -0.245794 0.336279 0.246559 -0.8235 -0.2805 0.5430 ... 0.008512 0.019925 1.436643 1.436643 1.436643 1.024328 0.484035 0.591396 0.279458 7
[3511 rows x 36 columns]
In [180]:
pre_smooth2 = trial(training_data, test_data4)
[7 7 7 3 3 3 6 3 3 3 3 3 3 3 3 3 3 7 5 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 1 1 1
0 1 1 1 6 6 1 1 1 1 1 1 1 1 1 0 0 7 4 4 4 4 4 4 4 4 2 4 2 2 2 4 4 4 4 2 2
3 2 2 2 2 2 2 2 4 4 2 7 0 5 0 0 0 5 5 5 5 5 5 5 1 5 0 5 5 0 0 5 5 7 2 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 6 6 6 6 4 4 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 1 0 0 7]
['OTHER', 'OTHER', 'OTHER', 'your_back_control', 'your_back_control', 'your_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'OTHER', 'opponent_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'your_mount', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_back_control', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'OTHER', 'your_mount', 'opponent_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_side_control', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_mount', 'your_mount', 'OTHER']
Your Mount: 0.16049382716
Your Side Control: 0.104938271605
Your Closed Guard: 0.0987654320988
Your Back Control: 0.0864197530864
Opponent Mount or Opponent Side Control: 0.259259259259
Opponent Closed Guard: 0.0925925925926
Opponent Back Control: 0.148148148148
OTHER: 0.0493827160494
In [9]:
#pre_smooth3 = trial(training_data, test_data5)
[7 7 6 1 6 6 1 6 6 6 3 3 3 1 0 5 0 0 0 0 1 1 1 1 1 1 1 0 4 2 2 2 2 2 2 2 2
2 2 2 7 0 5 5 0 5 5 5 5 5 5 5 5 7 4 4 4 4 2 4 2 4 4 4 2 4 4 4 4 2 4 3 6 2
4 6 3 4 6 6 6 6 6 6 6 6 6 7 5 7]
['OTHER', 'OTHER', 'opponent_back_control', 'your_side_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_side_control', 'your_mount', 'opponent_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'your_back_control', 'opponent_back_control', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_back_control', 'your_back_control', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'OTHER', 'opponent_closed_guard', 'OTHER']
Your Mount: 0.0888888888889
Your Side Control: 0.111111111111
Your Closed Guard: 0.177777777778
Your Back Control: 0.0555555555556
Opponent Mount or Opponent Side Control: 0.177777777778
Opponent Closed Guard: 0.133333333333
Opponent Back Control: 0.188888888889
OTHER: 0.0666666666667
In [10]:
#pre_smooth4 = trial(training_data, test_data6)
[7 7 7 6 3 3 6 6 6 3 3 3 5 0 0 5 5 5 5 5 5 7 7 7 7 5 7 5 0 1 1 1 1 1 1 1 1
1 1 1 5 7 2 2 2 2 7 7 7 2 2 2 7 7 7 2 2 7 7 7 7 2 2 2 5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 0 5 7 4 4 4 4 4 7 7 7 7 7 7 7 7 7 2 4 4 4 4 4 4 4 4 7 4 7 7 7 7
4 4 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 0 0 7 5]
['OTHER', 'OTHER', 'OTHER', 'opponent_back_control', 'your_back_control', 'your_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'opponent_closed_guard', 'OTHER', 'opponent_closed_guard', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'opponent_closed_guard', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'OTHER', 'opponent_mount_or_sc', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_mount', 'your_mount', 'OTHER', 'opponent_closed_guard']
Your Mount: 0.0444444444444
Your Side Control: 0.0814814814815
Your Closed Guard: 0.103703703704
Your Back Control: 0.037037037037
Opponent Mount or Opponent Side Control: 0.118518518519
Opponent Closed Guard: 0.2
Opponent Back Control: 0.155555555556
OTHER: 0.259259259259
In [11]:
#pre_smooth5 = trial(training_data, test_data7)
[7 7 2 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 4 4 4 4 4 4 2 2 4 4
1 0 0 0 3 0 0 0 5 0 4 4 4 4 4 4 4 4 4 4 4 4 2 4 4 4 6 3 6 6 6 6 6 6 6 6 6
1 1 5 7]
['OTHER', 'OTHER', 'your_closed_guard', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_side_control', 'your_mount', 'your_mount', 'your_mount', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'your_mount', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'your_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_side_control', 'opponent_closed_guard', 'OTHER']
Your Mount: 0.217948717949
Your Side Control: 0.128205128205
Your Closed Guard: 0.0512820512821
Your Back Control: 0.115384615385
Opponent Mount or Opponent Side Control: 0.294871794872
Opponent Closed Guard: 0.025641025641
Opponent Back Control: 0.128205128205
OTHER: 0.0384615384615
In [110]:
print pre_smooth
pre_smooth_words = convert_to_words(pre_smooth)
pre_smooth_words2 = convert_to_words(pre_smooth2)
#pre_smooth_words3 = convert_to_words(pre_smooth3)
#pre_smooth_words4 = convert_to_words(pre_smooth4)
#pre_smooth_words5 = convert_to_words(pre_smooth5)
print pre_smooth_words
[7 7 7 0 0 0 5 5 0 5 0 5 5 0 5 7 5 0 6 4 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 4 4
4 4 4 4]
['OTHER', 'OTHER', 'OTHER', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'OTHER', 'opponent_closed_guard', 'your_mount', 'opponent_back_control', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc']
In [111]:
n_components = 8 # ('ybc', 'ymount', 'ysc', 'ycg', 'ocg', 'osc_mount', 'obc', 'other')
# n_components = 3
startprob = np.array([0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.65,]) # users will probably turn on sensor standing
# startprob = np.array([0.34, 0.33, 0.33])
In [112]:
# transmat = np.array([[0.34, 0.33, 0.33], [0.9, 0.05, 0.05], [0.9, 0.05, 0.05]])
"""
probability of these positions given current state:
your_mount' if v == 0
else 'your_side_control' if v == 1
else 'your_closed_guard' if v == 2
else 'your_back_control' if v == 3
else 'opponent_mount_or_sc' if v == 4
else 'opponent_closed_guard' if v == 5
else 'opponent_back_control' if v == 6
else 'OTHER' if v == 7
transition_probability = {
'ymt' : {'ymount': 0.800, 'ysc': 0.050, 'ycg': 0.010, 'ybc': 0.050, 'osc_mount': 0.001, 'ocg': 0.050, 'obc': 0.001, 'other': 0.038},
'ysc' : {'ymount': 0.100, 'ysc': 0.800, 'ycg': 0.010, 'ybc': 0.010, 'osc_mount': 0.001, 'ocg': 0.050, 'obc': 0.001, 'other': 0.028},
'ycg' : {'ymount': 0.010, 'ysc': 0.050, 'ycg': 0.800, 'ybc': 0.010, 'osc_mount': 0.050, 'ocg': 0.001, 'obc': 0.001, 'other': 0.078},
'ybc' : {'ymount': 0.050, 'ysc': 0.010, 'ycg': 0.050, 'ybc': 0.800, 'osc_mount': 0.001, 'ocg': 0.010, 'obc': 0.001, 'other': 0.078},
'omt' : {'ymount': 0.001, 'ysc': 0.050, 'ycg': 0.010, 'ybc': 0.001, 'osc_mount': 0.800, 'ocg': 0.050, 'obc': 0.050, 'other': 0.038},
'ocg' : {'ymount': 0.100, 'ysc': 0.050, 'ycg': 0.010, 'ybc': 0.010, 'osc_mount': 0.001, 'ocg': 0.800, 'obc': 0.001, 'other': 0.028},
'obc' : {'ymount': 0.010, 'ysc': 0.050, 'ycg': 0.001, 'ybc': 0.010, 'osc_mount': 0.050, 'ocg': 0.001, 'obc': 0.800, 'other': 0.078},
'oth' : {'ymount': 0.050, 'ysc': 0.010, 'ycg': 0.050, 'ybc': 0.078, 'osc_mount': 0.001, 'ocg': 0.010, 'obc': 0.001, 'other': 0.800}
}
"""
transmat = np.array([
[0.800, 0.050, 0.010, 0.050, 0.001, 0.050, 0.001, 0.038],
[0.100, 0.800, 0.010, 0.010, 0.001, 0.050, 0.001, 0.028],
[0.010, 0.050, 0.800, 0.010, 0.050, 0.001, 0.001, 0.078],
[0.050, 0.010, 0.050, 0.800, 0.001, 0.010, 0.001, 0.078],
[0.001, 0.050, 0.010, 0.001, 0.800, 0.050, 0.050, 0.038],
[0.100, 0.050, 0.010, 0.010, 0.001, 0.800, 0.001, 0.028],
[0.010, 0.050, 0.001, 0.010, 0.050, 0.001, 0.800, 0.078],
[0.050, 0.010, 0.050, 0.078, 0.001, 0.010, 0.001, 0.800],
])
In [113]:
# emissionprob = np.array([[0.34, 0.33, 0.33], [0.4, 0.55, 0.05], [0.05, 0.55, 0.4]])
"""
probability of these positions given current state:
your_mount' if v == 0
else 'your_side_control' if v == 1
else 'your_closed_guard' if v == 2
else 'your_back_control' if v == 3
else 'opponent_mount_or_sc' if v == 4
else 'opponent_closed_guard' if v == 5
else 'opponent_back_control' if v == 6
else 'OTHER' if v == 7
emission_probability = {
'ymt' : {'ymount': 0.500, 'ysc': 0.050, 'ycg': 0.010, 'ybc': 0.050, 'osc_mount': 0.001, 'ocg': 0.350, 'obc': 0.001, 'other': 0.038},
'ysc' : {'ymount': 0.100, 'ysc': 0.800, 'ycg': 0.010, 'ybc': 0.010, 'osc_mount': 0.001, 'ocg': 0.050, 'obc': 0.001, 'other': 0.028},
'ycg' : {'ymount': 0.010, 'ysc': 0.050, 'ycg': 0.400, 'ybc': 0.010, 'osc_mount': 0.500, 'ocg': 0.001, 'obc': 0.001, 'other': 0.078},
'ybc' : {'ymount': 0.050, 'ysc': 0.010, 'ycg': 0.050, 'ybc': 0.600, 'osc_mount': 0.001, 'ocg': 0.010, 'obc': 0.201, 'other': 0.078},
'omt' : {'ymount': 0.001, 'ysc': 0.050, 'ycg': 0.210, 'ybc': 0.050, 'osc_mount': 0.600, 'ocg': 0.050, 'obc': 0.001, 'other': 0.038},
'ocg' : {'ymount': 0.400, 'ysc': 0.050, 'ycg': 0.010, 'ybc': 0.010, 'osc_mount': 0.001, 'ocg': 0.400, 'obc': 0.001, 'other': 0.028},
'obc' : {'ymount': 0.010, 'ysc': 0.050, 'ycg': 0.001, 'ybc': 0.110, 'osc_mount': 0.050, 'ocg': 0.001, 'obc': 0.700, 'other': 0.078},
'oth' : {'ymount': 0.050, 'ysc': 0.010, 'ycg': 0.050, 'ybc': 0.078, 'osc_mount': 0.001, 'ocg': 0.010, 'obc': 0.001, 'other': 0.800}
}
"""
emissionprob = np.array([
[0.500, 0.050, 0.010, 0.050, 0.001, 0.350, 0.001, 0.038],
[0.100, 0.800, 0.010, 0.010, 0.001, 0.050, 0.001, 0.028],
[0.010, 0.050, 0.350, 0.010, 0.500, 0.001, 0.001, 0.078],
[0.050, 0.010, 0.050, 0.700, 0.001, 0.010, 0.101, 0.078],
[0.001, 0.050, 0.210, 0.050, 0.600, 0.050, 0.001, 0.038],
[0.400, 0.050, 0.010, 0.010, 0.001, 0.400, 0.001, 0.028],
[0.010, 0.050, 0.001, 0.110, 0.050, 0.001, 0.700, 0.078],
[0.050, 0.010, 0.050, 0.078, 0.001, 0.010, 0.001, 0.800],
])
In [114]:
# Hidden Markov Model with multinomial (discrete) emissions
model = hmm.MultinomialHMM(n_components=n_components,
n_iter=10,
verbose=False)
model.startprob_ = startprob
model.transmat_ = transmat
model.emissionprob_ = emissionprob
# model.n_features = 8
In [115]:
# observations = np.array([1, 1, 2, 2, 1, 0, 1, 2, 2, 0])
observations = np.array(pre_smooth)
observations2 = np.array(pre_smooth2)
#observations3 = np.array(pre_smooth3)
#observations4 = np.array(pre_smooth4)
#observations5 = np.array(pre_smooth5)
a,b = model.sample(5)
print a,b
print '=========='
n_samples = len(observations)
data = observations.reshape((n_samples, -1))
print data
n_samples2 = len(observations2)
data2 = observations2.reshape((n_samples2, -1))
#n_samples3 = len(observations3)
#data3 = observations3.reshape((n_samples3, -1))
#n_samples4 = len(observations4)
#data4 = observations4.reshape((n_samples4, -1))
#n_samples5 = len(observations5)
#data5 = observations5.reshape((n_samples5, -1))
[[2]
[2]
[4]
[4]
[3]] [4 4 4 4 4]
==========
[[7]
[7]
[7]
[0]
[0]
[0]
[5]
[5]
[0]
[5]
[0]
[5]
[5]
[0]
[5]
[7]
[5]
[0]
[6]
[4]
[2]
[2]
[2]
[2]
[2]
[2]
[2]
[2]
[4]
[2]
[2]
[2]
[2]
[2]
[2]
[4]
[4]
[4]
[4]
[4]
[4]]
In [116]:
# decode(X, lengths=None, algorithm=None)[source]
# Find most likely state sequence corresponding to X.
# Will work best for organic tests
"""correct sequence
your_mount' if v == 0
else 'your_side_control' if v == 1
else 'your_closed_guard' if v == 2
else 'your_back_control' if v == 3
else 'opponent_mount_or_sc' if v == 4
else 'opponent_closed_guard' if v == 5
else 'opponent_back_control' if v == 6
else 'OTHER' if v == 7
[3, 0, 1, 2, 5, 4, 6]
"""
Out[116]:
"correct sequence\nyour_mount' if v == 0 \nelse 'your_side_control' if v == 1\nelse 'your_closed_guard' if v == 2\nelse 'your_back_control' if v == 3\nelse 'opponent_mount_or_sc' if v == 4\nelse 'opponent_closed_guard' if v == 5\nelse 'opponent_back_control' if v == 6\nelse 'OTHER' if v == 7\n\n\n[3, 0, 1, 2, 5, 4, 6]\n\n"
In [117]:
print 'TEST 1'
result = model.decode(data, algorithm='viterbi')
print 'pre smooth: {}'.format(pre_smooth)
print 'result accuracy {}%'.format(result[0])
print 'final result: {}'.format(result[1])
result_words = convert_to_words(result[1])
print '====================='
print 'pre smooth words: {}'.format(pre_smooth_words)
print '====================='
print 'result words: {}'.format(result_words)
print '\n'
print "pre smooth stats"
print get_position_stats(pre_smooth_words)
print '\n'
print 'result stats'
print get_position_stats(result_words)
print '******************'
TEST 1
pre smooth: [7 7 7 0 0 0 5 5 0 5 0 5 5 0 5 7 5 0 6 4 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 4 4
4 4 4 4]
result accuracy -56.3499979936%
final result: [7 7 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2]
=====================
pre smooth words: ['OTHER', 'OTHER', 'OTHER', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'OTHER', 'opponent_closed_guard', 'your_mount', 'opponent_back_control', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc']
=====================
result words: ['OTHER', 'OTHER', 'OTHER', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_back_control', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard']
pre smooth stats
Your Mount: 0.170731707317
Your Side Control: 0.0
Your Closed Guard: 0.341463414634
Your Back Control: 0.0
Opponent Mount or Opponent Side Control: 0.19512195122
Opponent Closed Guard: 0.170731707317
Opponent Back Control: 0.0243902439024
OTHER: 0.0975609756098
None
result stats
Your Mount: 0.365853658537
Your Side Control: 0.0
Your Closed Guard: 0.536585365854
Your Back Control: 0.0243902439024
Opponent Mount or Opponent Side Control: 0.0
Opponent Closed Guard: 0.0
Opponent Back Control: 0.0
OTHER: 0.0731707317073
None
******************
In [118]:
print 'TEST2'
result2 = model.decode(data2, algorithm='viterbi')
print 'pre smooth: {}'.format(pre_smooth2)
print 'result accuracy {}%'.format(result2[0])
print 'final result: {}'.format(result2[1])
result_words2 = convert_to_words(result2[1])
print '====================='
print 'pre smooth words: {}'.format(pre_smooth_words2)
print '====================='
print 'result words: {}'.format(result_words2)
print '\n'
print "pre smooth stats"
print get_position_stats(pre_smooth_words2)
print '\n'
print 'result stats'
print get_position_stats(result_words2)
print '******************'
TEST2
pre smooth: [7 7 3 6 3 3 3 3 3 0 0 0 0 5 7 0 0 1 1 0 1 6 1 1 1 1 0 7 4 4 4 4 2 3 4 4 2
2 2 2 2 4 2 5 0 0 5 5 5 5 0 5 5 5 2 4 4 4 4 4 4 4 4 4 4 4 4 4 6 6 4 6 6 6
6 6 6 6 6 1 0]
result accuracy -120.080821923%
final result: [7 7 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 7 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 2 4 4 4 4 4 4 4 4 4 4 4 4 4 6 6 6 6 6 6
6 6 6 6 6 1 1]
=====================
pre smooth words: ['OTHER', 'OTHER', 'your_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'OTHER', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_mount', 'your_side_control', 'opponent_back_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_back_control', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_mount']
=====================
result words: ['OTHER', 'OTHER', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_side_control']
pre smooth stats
Your Mount: 0.148148148148
Your Side Control: 0.0987654320988
Your Closed Guard: 0.0987654320988
Your Back Control: 0.0864197530864
Opponent Mount or Opponent Side Control: 0.259259259259
Opponent Closed Guard: 0.111111111111
Opponent Back Control: 0.148148148148
OTHER: 0.0493827160494
None
result stats
Your Mount: 0.234567901235
Your Side Control: 0.148148148148
Your Closed Guard: 0.197530864198
Your Back Control: 0.0864197530864
Opponent Mount or Opponent Side Control: 0.16049382716
Opponent Closed Guard: 0.0
Opponent Back Control: 0.135802469136
OTHER: 0.037037037037
None
******************
In [21]:
"""
print 'TEST3'
result3 = model.decode(data3, algorithm='viterbi')
print 'pre smooth: {}'.format(pre_smooth3)
print 'result accuracy {}%'.format(result3[0])
print 'final result: {}'.format(result3[1])
result_words3 = convert_to_words(result3[1])
print '====================='
print 'pre smooth words: {}'.format(pre_smooth_words3)
print '====================='
print 'result words: {}'.format(result_words3)
print '\n'
print "pre smooth stats"
print get_position_stats(pre_smooth_words3)
print '\n'
print 'result stats'
print get_position_stats(result_words3)
print '******************'
"""
TEST3
pre smooth: [7 7 6 1 6 6 1 6 6 6 3 3 3 1 0 5 0 0 0 0 1 1 1 1 1 1 1 0 4 2 2 2 2 2 2 2 2
2 2 2 7 0 5 5 0 5 5 5 5 5 5 5 5 7 4 4 4 4 2 4 2 4 4 4 2 4 4 4 4 2 4 3 6 2
4 6 3 4 6 6 6 6 6 6 6 6 6 7 5 7]
result accuracy -142.448382567%
final result: [7 7 6 6 6 6 6 6 6 6 3 3 3 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
2 2 2 7 0 0 0 0 0 0 0 0 0 0 0 0 7 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 6 6 4
4 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7]
=====================
pre smooth words: ['OTHER', 'OTHER', 'opponent_back_control', 'your_side_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_side_control', 'your_mount', 'opponent_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'your_back_control', 'opponent_back_control', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_back_control', 'your_back_control', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'OTHER', 'opponent_closed_guard', 'OTHER']
=====================
result words: ['OTHER', 'OTHER', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'OTHER', 'OTHER', 'OTHER']
pre smooth stats
Your Mount: 0.0888888888889
Your Side Control: 0.111111111111
Your Closed Guard: 0.177777777778
Your Back Control: 0.0555555555556
Opponent Mount or Opponent Side Control: 0.177777777778
Opponent Closed Guard: 0.133333333333
Opponent Back Control: 0.188888888889
OTHER: 0.0666666666667
None
result stats
Your Mount: 0.211111111111
Your Side Control: 0.0888888888889
Your Closed Guard: 0.211111111111
Your Back Control: 0.0333333333333
Opponent Mount or Opponent Side Control: 0.133333333333
Opponent Closed Guard: 0.0
Opponent Back Control: 0.244444444444
OTHER: 0.0777777777778
None
******************
In [22]:
"""
print 'TEST4'
result4 = model.decode(data4, algorithm='viterbi')
print 'pre smooth: {}'.format(pre_smooth4)
print 'result accuracy {}%'.format(result4[0])
print 'final result: {}'.format(result4[1])
result_words4 = convert_to_words(result4[1])
print '====================='
print 'pre smooth words: {}'.format(pre_smooth_words4)
print '====================='
print 'result words: {}'.format(result_words4)
print '\n'
print "pre smooth stats"
print get_position_stats(pre_smooth_words4)
print '\n'
print 'result stats'
print get_position_stats(result_words4)
print '******************'
"""
TEST4
pre smooth: [7 7 7 6 3 3 6 6 6 3 3 3 5 0 0 5 5 5 5 5 5 7 7 7 7 5 7 5 0 1 1 1 1 1 1 1 1
1 1 1 5 7 2 2 2 2 7 7 7 2 2 2 7 7 7 2 2 7 7 7 7 2 2 2 5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 0 5 7 4 4 4 4 4 7 7 7 7 7 7 7 7 7 2 4 4 4 4 4 4 4 4 7 4 7 7 7 7
4 4 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 0 0 7 5]
result accuracy -190.670795411%
final result: [7 7 7 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 7 7 7 7 0 0 0 0 1 1 1 1 1 1 1 1
1 1 1 0 7 2 2 2 2 7 7 7 2 2 2 7 7 7 7 7 7 7 7 7 2 2 2 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 7 2 2 2 2 2 7 7 7 7 7 7 7 7 7 2 2 2 2 2 2 2 2 2 2 2 7 7 7 7
2 4 4 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 0 0 0 0]
=====================
pre smooth words: ['OTHER', 'OTHER', 'OTHER', 'opponent_back_control', 'your_back_control', 'your_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'opponent_closed_guard', 'your_mount', 'your_mount', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'opponent_closed_guard', 'OTHER', 'opponent_closed_guard', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'opponent_closed_guard', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'opponent_closed_guard', 'your_mount', 'opponent_closed_guard', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'OTHER', 'opponent_mount_or_sc', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_mount', 'your_mount', 'OTHER', 'opponent_closed_guard']
=====================
result words: ['OTHER', 'OTHER', 'OTHER', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'OTHER', 'OTHER', 'OTHER', 'OTHER', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount']
pre smooth stats
Your Mount: 0.0444444444444
Your Side Control: 0.0814814814815
Your Closed Guard: 0.103703703704
Your Back Control: 0.037037037037
Opponent Mount or Opponent Side Control: 0.118518518519
Opponent Closed Guard: 0.2
Opponent Back Control: 0.155555555556
OTHER: 0.259259259259
None
result stats
Your Mount: 0.259259259259
Your Side Control: 0.0814814814815
Your Closed Guard: 0.2
Your Back Control: 0.0666666666667
Opponent Mount or Opponent Side Control: 0.0148148148148
Opponent Closed Guard: 0.0
Opponent Back Control: 0.125925925926
OTHER: 0.251851851852
None
******************
In [23]:
"""
print 'TEST5'
result5 = model.decode(data5, algorithm='viterbi')
print 'pre smooth: {}'.format(pre_smooth5)
print 'result accuracy {}%'.format(result5[0])
print 'final result: {}'.format(result5[1])
result_words5 = convert_to_words(result5[1])
print '====================='
print 'pre smooth words: {}'.format(pre_smooth_words5)
print '====================='
print 'result words: {}'.format(result_words5)
print '\n'
print "pre smooth stats"
print get_position_stats(pre_smooth_words5)
print '\n'
print 'result stats'
print get_position_stats(result_words5)
"""
TEST5
pre smooth: [7 7 2 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 4 4 4 4 4 4 2 2 4 4
1 0 0 0 3 0 0 0 5 0 4 4 4 4 4 4 4 4 4 4 4 4 2 4 4 4 6 3 6 6 6 6 6 6 6 6 6
1 1 5 7]
result accuracy -101.599747597%
final result: [7 7 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2
1 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 6 6 6 6 6 6 6 6 6 6 6
1 1 0 0]
=====================
pre smooth words: ['OTHER', 'OTHER', 'your_closed_guard', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_mount', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_side_control', 'your_mount', 'your_mount', 'your_mount', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'opponent_closed_guard', 'your_mount', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'your_closed_guard', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'your_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_side_control', 'opponent_closed_guard', 'OTHER']
=====================
result words: ['OTHER', 'OTHER', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_back_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_side_control', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_closed_guard', 'your_side_control', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'your_mount', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_mount_or_sc', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'opponent_back_control', 'your_side_control', 'your_side_control', 'your_mount', 'your_mount']
pre smooth stats
Your Mount: 0.217948717949
Your Side Control: 0.128205128205
Your Closed Guard: 0.0512820512821
Your Back Control: 0.115384615385
Opponent Mount or Opponent Side Control: 0.294871794872
Opponent Closed Guard: 0.025641025641
Opponent Back Control: 0.128205128205
OTHER: 0.0384615384615
None
result stats
Your Mount: 0.25641025641
Your Side Control: 0.141025641026
Your Closed Guard: 0.128205128205
Your Back Control: 0.102564102564
Opponent Mount or Opponent Side Control: 0.205128205128
Opponent Closed Guard: 0.0
Opponent Back Control: 0.141025641026
OTHER: 0.025641025641
None
In [ ]:
In [ ]:
Content source: ChristopherGS/sensor_readings
Similar notebooks: