roclark / clarktech-ncaab-predictor

A machine learning project to predict NCAA Men's Basketball outcomes
33 stars 8 forks source link

Remove warnings #3

Closed clark173 closed 6 years ago

clark173 commented 6 years ago

There are a couple of warnings currently being thrown, such as:

/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning)

- [x] A warning about overwriting copies in a DataFrame

analyze-games.py:70: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy stats[field] = float(stats[field]) / num_games /home/travis/build/clark173/basketball-predictor/predictor.py:49: FutureWarning: '.reindex_axis' is deprecated and will be removed in a future version. Use '.reindex' instead. self._test = self._test.reindex_axis(self._filtered_features, axis=1)

- [x] A deprecation warning about the `.reindex_axis` method

/home/prometheus/basketball-predictor/predictor.py:45: FutureWarning: '.reindex_axis' is deprecated and will be removed in a future version. Use '.reindex' instead. self._test = self._test.reindex_axis(self._filtered_features, axis=1)



These should be removed for a cleaner build and run.