Skip to content

Commit

Permalink
using new cross validation
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani committed Oct 18, 2016
1 parent 6edacc3 commit ecbef61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -46,7 +46,7 @@ print('score: {0}'.format(rgf_score))
## Software Requirement

* Python (2.7 or 3.4)
* scikit-learn
* scikit-learn (0.18 or later)
* RGF(http://stat.rutgers.edu/home/tzhang/software/rgf/)

If you can't access the avove URL, alternatively, you can get RGF by downloading https://github.com/fukatani/rgf_python/releases/download/0.1.0/rgf1.2.zip.
Expand Down
4 changes: 2 additions & 2 deletions example/cross_validation_for_iris.py
Expand Up @@ -3,7 +3,7 @@

from sklearn import datasets
from sklearn.utils.validation import check_random_state
from sklearn.cross_validation import StratifiedKFold
from sklearn.model_selection import StratifiedKFold
from sklearn.ensemble import GradientBoostingClassifier
from rgf.rgf import RGFClassifier

Expand All @@ -24,7 +24,7 @@
gb_score = 0
n_folds = 3

for train_idx, test_idx in StratifiedKFold(iris.target, n_folds):
for train_idx, test_idx in StratifiedKFold(n_folds).split(iris.data, iris.target):
xs_train = iris.data[train_idx]
y_train = iris.target[train_idx]
xs_test = iris.data[test_idx]
Expand Down

0 comments on commit ecbef61

Please sign in to comment.