RobRomijnders / LSTM_tsc

An LSTM for time-series classification
MIT License
407 stars 146 forks source link

Accuracy vs Cost #4

Open AziziShekoofeh opened 7 years ago

AziziShekoofeh commented 7 years ago

Hi, Thanks for the nice example. I have a question about your check_test() function. When you're running the session and generating the output, it's [model.cost, model.accuracy] but after append and tuple you have [accuracy, cost]. I'm afraid to say that it's a swap between accuracy and cost. Even, when I ran it on another time-series dataset, it generates the accuracy of greater than 1, which is definitely incorrect.

Thanks, Shekoofeh

ghost commented 7 years ago

Hi, If one flips the cost and acc to cost,acc = [np.mean(x) for x in zip(*perfs)] in the check_test() it looks like the accuracy drops down to roughly 30%. I have tested it on the two_patterns example. Is there any way to tweak the LSTM to increase the accuracy?

AziziShekoofeh commented 7 years ago

@JosefHook You are right. It seems it's the bug in the code and the reported 80-90% accuracy is not correct. I think the only way is to retrain and research for the correct hyperparameters.

hackerwei commented 7 years ago

@JosefHook @JosefHook cost,acc = [np.mean(x) for x in zip(*perfs)] is the right code?

onesmileapp commented 7 years ago

Hi! I feel very strange,I couldn't find the check_test() function in the tsc_model.py. if you know, could you tell me where I can find the check_test() function. Thanks

AziziShekoofeh commented 7 years ago

Hi @onesmileapp I couldn't find it either. Maybe after the recent commits for the version compatibility, it has been changed to something else.

If you check my fork from this directory it's showing this function in line 83, tsc_main.py .

onesmileapp commented 7 years ago

@AziziShekoofeh yes, I have found it . thank you~