Skip to content

Commit

Permalink
Fixed #181
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiever committed Jun 22, 2016
1 parent 0d2e5ad commit 3fdf711
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import pandas as pd

from sklearn.cross_validation import train_test_split
from sklearn.kernel_approximation import Nystroem
from sklearn.tree import DecisionTreeClassifier

# NOTE: Make sure that the class is labeled 'class' in the data file
tpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import pandas as pd

from sklearn.cross_validation import train_test_split
from sklearn.kernel_approximation import RBFSampler
from sklearn.tree import DecisionTreeClassifier

# NOTE: Make sure that the class is labeled 'class' in the data file
tpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Example Exported Code
import numpy as np
import pandas as pd
from sklearn.cross_validation import train_test_split
from sklearn.ensumble import AdaBoostClassifier
from sklearn.ensemble import AdaBoostClassifier

# NOTE: Make sure that the class is labeled 'class' in the data file
tpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ if len(training_features.columns.values) > 0:
scaler = RobustScaler()
scaler.fit(training_features.values.astype(np.float64))
scaled_features = scaler.transform(result1.drop('class', axis=1).values.astype(np.float64))

for col_num, column in enumerate(result1.drop('class', axis=1).columns.values):
result1.loc[:, column] = scaled_features[:, col_num]
result1 = pd.DataFrame(data=scaled_features)
result1['class'] = tpot_data['class'].values

# Perform classification with a decision tree classifier
result2 = result1.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ if len(training_features.columns.values) > 0:
scaler = StandardScaler()
scaler.fit(training_features.values.astype(np.float64))
scaled_features = scaler.transform(result1.drop('class', axis=1).values.astype(np.float64))

for col_num, column in enumerate(result1.drop('class', axis=1).columns.values):
result1.loc[:, column] = scaled_features[:, col_num]
result1 = pd.DataFrame(data=scaled_features)
result1['class'] = tpot_data['class'].values


# Perform classification with a decision tree classifier
Expand Down

0 comments on commit 3fdf711

Please sign in to comment.