pawanaichra / stock-movement-prediction-using-hmm-in-python

This python script predicts stock movement for next day.
6 stars 8 forks source link

some error not able to get it #1

Closed animeshsingh04 closed 6 years ago

animeshsingh04 commented 6 years ago

price_movement = get_price_movements(stock_prices) optimal_states = hmm.get_optimal_states(price_movement)

error for above two line of code Traceback (most recent call last): File "C:/Users/ANIMESH/Desktop/stock-movement-prediction-using-hmm-in-python-master/stock-movement-prediction-using-hmm-in-python-master/stock-prediction.py", line 151, in price_movement = get_price_movements(stock_prices) File "C:/Users/ANIMESH/Desktop/stock-movement-prediction-using-hmm-in-python-master/stock-movement-prediction-using-hmm-in-python-master/stock-prediction.py", line 142, in get_price_movements price_movement = int(np.array(list(map((lambda x: 1 if x >0 else 0, price_change))))) TypeError: map() must have at least two arguments.

pawanaichra commented 6 years ago

I think its due to version problem. Its working fine with 3.6 and maybe now will also work with other versions.

animeshsingh04 commented 6 years ago

Even I hv same 3.6 version

On Tue, May 1, 2018, 12:23 PM Pawan Aichra notifications@github.com wrote:

I think its due to version problem. Its working fine with 3.6 and maybe now will also work with other versions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pawanaichra/stock-movement-prediction-using-hmm-in-python/issues/1#issuecomment-385611619, or mute the thread https://github.com/notifications/unsubscribe-auth/AfDgy30dzSHdsmXkSCYwQ-NqqSLMdLNdks5tuAZbgaJpZM4TtmTu .

animeshsingh04 commented 6 years ago

image please check this

pawanaichra commented 6 years ago

well, this may be problem with your compiler. Check it out on google. It was tested on Anaconda python 3.6 capture