Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iris example not working (data is not downloaded?) #71

Open
MartinThoma opened this issue Jan 30, 2017 · 1 comment
Open

Iris example not working (data is not downloaded?) #71

MartinThoma opened this issue Jan 30, 2017 · 1 comment

Comments

@MartinThoma
Copy link

When I execute

# Create a suitable view of the Iris data set.
# (For larger data sets, this can trigger a download the first time)
from skdata.iris.view import KfoldClassification
iris_view = KfoldClassification(5)

# Create a learning algorithm based on scikit-learn's LinearSVC
# that will be driven by commands the `iris_view` object.
from sklearn.svm import LinearSVC
from skdata.base import SklearnClassifier
learning_algo = SklearnClassifier(LinearSVC)

# Drive the learning algorithm from the data set view object.
# (An iterator interface is sometimes also be available,
#  so you don't have to give up control flow completely.)
iris_view.protocol(learning_algo)

# The learning algorithm keeps track of what it did when under
# control of the iris_view object. This base example is useful for
# internal testing and demonstration. Use a custom learning algorithm
# to track and save the statistics you need.
for loss_report in algo.results['loss']:
    print loss_report['task_name'] + \
        (": err = %0.3f" % (loss_report['err_rate']))

I get

/home/moose/.local/lib/python2.7/site-packages/sklearn/cross_validation.py:44: 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)
Traceback (most recent call last):
  File "testskdata.py", line 4, in <module>
    iris_view = KfoldClassification(5)
  File "build/bdist.linux-x86_64/egg/skdata/iris/view.py", line 27, in __init__
  File "build/bdist.linux-x86_64/egg/skdata/toy.py", line 20, in __init__
  File "build/bdist.linux-x86_64/egg/skdata/toy.py", line 33, in build_all
  File "build/bdist.linux-x86_64/egg/skdata/iris/dataset.py", line 91, in build_meta
IOError: [Errno 20] Not a directory: '/usr/local/lib/python2.7/dist-packages/skdata-0.0.4-py2.7.egg/skdata/iris/iris.csv'
@hemanthsavasere
Copy link

I want to fix this bug, is it assigned to anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants