alvarobartt / twitter-stock-recommendation

Simple Stock Investment Recommendation System based on Machine-Learning algorithms for prediction and Twitter Sentiment Analysis.
MIT License
118 stars 43 forks source link

add different prediction algorithms #4

Open alvarobartt opened 6 years ago

alvarobartt commented 6 years ago

We need to add new and different prediction algorithms from sklearn as DecisionTree, SVM, etc. to make more reliable predictions based on their score for every dataset

alvarobartt commented 6 years ago

Maybe wider data-range from stock needed, the actual range is from the last 3 years until today:

actual_date = dt.date.today()
past_date = actual_date - dt.timedelta(days=365 * 3)
actual_date = actual_date.strftime("%Y-%m-%d")
past_date = past_date.strftime("%Y-%m-%d")

Maybe we need to retrieve the dataset from the last 5 years:

dt.timedelta(days=365 * 5)

or up to the 10 last ones:

dt.timedelta(days=365 * 10)

Depending on the prediction algorithms implemented.

harshilvarsani commented 5 years ago

In your code on Main.py, you have: "from Tweet import Tweet", what is this Tweet? Is it a module we need to install?

alvarobartt commented 5 years ago

Hi @harshilvarsani, no, Tweet is a python class you need to have in the same directory as the main.py file. You can see Tweet class file here.

harshilvarsani commented 5 years ago

So can I run the class on the same file? I.e. in the main.py file? If so, where do I run it as the "from Tweet import Tweet line is not working for me.

It says "tweet module not found"

On 16 Mar 2019 19:11, Álvaro Bartolomé del Canto notifications@github.com wrote:

Hi @harshilvarsanihttps://github.com/harshilvarsani, no, Tweet is a python class you need to have in the same directory as the main.py file. You can see Tweet class file herehttps://github.com/alvarob96/twitter-stock-recommendation/blob/master/Tweet.py.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alvarob96/twitter-stock-recommendation/issues/4#issuecomment-473576076, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AsscXRlJSzgbNf9-21ptihhWTh4U1aALks5vXUH-gaJpZM4WWjj_.

harshilvarsani commented 5 years ago

I have one python file - same as the main.py file you have. But with this I get the following error: ModuleNotFoundError: No module named 'Tweet' This is because of the command: from Tweet import tweet. Any ideas on how I can tackle this issue? I have added the Tweet class code into the main.py code.