Gitlab service upgraded. Please report any problems to dl_gitadmin@cs.lth.se

Commit 28496532 authored by Noric Couderc's avatar Noric Couderc

Removed polynomial features.

Removed polynomial features from the classification algorithm.
parent 724a22e7
......@@ -112,7 +112,7 @@ def load_jmh_data(filename):
# Grouping the applications, to compare similar ones.
selected_jmh_columns = ["Param: seed",
"Param: applicationSize",
"Param: baseStructureSize"
"Param: baseStructureSize",
"Benchmark"]
# Best data structures
jmh_best_structures = jmh_data_filtered\
......@@ -359,7 +359,7 @@ if __name__ == "__main__":
#%%
print("Training classifier...")
X_train, X_test, y_train, y_test, w_train, w_test = train_test_split(features_extended_poly,
X_train, X_test, y_train, y_test, w_train, w_test = train_test_split(features_extended,
labels,
sw_hw_cleaned["Sample weight"],
stratify=labels,
......@@ -375,8 +375,7 @@ if __name__ == "__main__":
classifier.fit(X_train, y_train, w_train)
# We just add it to the class
classifier.feature_names = poly_transformer \
.get_feature_names(features_extended.columns.values)
classifier.feature_names = features_extended.columns.values
print("Accuracy: {0}".format(classifier.score(X_test, y_test, w_test)))
print("Classifier trained")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment