Support Vector Machines with Scikit Learn - Getting more features from our data

by: mksamelson, 8 years ago


Harrison:

I ran your complete code on this lesson against the files of Yahoo pages you provided and a file of index data I created per your instructions earlier in the series.

It seems that each security has at least one "N/A" in value_list (I think there is at least one factor that has all N/As).

Anyway - because of this - when I run the code with the lines:

if value_list.count("N/A") > (0):
                        pass

I get an empty dataframe.

When I remove this line I get a filled dataframe with N/As in some places (as I would expect).

You run the code in the video and get values.  Did the files change since you did the video?  Is something weird happening (e.g., I am running Python 2.7), etc.

Thanks.



You must be logged in to post. Please login or register an account.



The data should be the same. Feel free to continue with NA values. Results should be pretty close, and allowing for some NA will give you more realistic data and more data to work with anyway.

There might be another reason why this is happening though, so look out for anything else weird. It might be prudent to compare your code to mine very closely here: https://pythonprogramming.net/collecting-features-machine-learning/

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.