healthDataScience / deep-learning-HAR

Convolutional and LSTM networks to classify human activity
457 stars 238 forks source link

Use train data as test data? #3

Closed traveller59 closed 7 years ago

traveller59 commented 7 years ago

The offical code in HAR-CNN use "train" folder to generate test data:

X_train, labels_train, list_ch_train = read_data(data_path="./data/", split="train") # train
X_test, labels_test, list_ch_test = read_data(data_path="./data/", split="train") # test

When I change them to:

X_train, labels_train, list_ch_train = read_data(data_path="./data/", split="train") # train
X_test, labels_test, list_ch_test = read_data(data_path="./data/", split="test") # test

The test accuracy will decrease to 0.877917, not 0.98.

bhimmetoglu commented 7 years ago

Good catch! This is a typo and will be corrected...

bhimmetoglu commented 7 years ago

Thanks for reporting the problem.

The code has been fixed and the accuracies have been updated accordingly.

guillaume-chevalier commented 6 years ago

@bhimmetoglu I still see the 98% here: https://www.datasciencecentral.com/profiles/blogs/time-series-classification-with-tensorflow It might still be unchanged at other places, too.

bhimmetoglu commented 6 years ago

It is not easy (or sometimes possible) to edit websites that publish the blog. The original blog on my website has the corrections. The third party websites has links to the corrected blog as well as the repo, which are corrected.

I added a comment to that site in particular pointing the readers to the corrected versions.