Skip to content

Running regression flow requires clases? #312

Closed

Description

@joaquinvanschoren

See example error below.

%matplotlib inline
import openml as oml
import pandas as pd
import numpy as np
import seaborn as sns
from matplotlib import pyplot
from sklearn import neighbors, model_selection, tree, ensemble

oml.config.apikey = "5a17d410c0a181e5ec2595ee9da79849"

task = oml.tasks.get_task(146685)

clf = ensemble.RandomForestRegressor()

flow = oml.flows.sklearn_to_flow(clf)

run = oml.runs.run_flow_on_task(task, flow)
#myrun = run.publish()
#print("Uploaded to http://www.openml.org/r/" + str(myrun.run_id))
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-5-e4b1318833fe> in <module>()
     15 flow = oml.flows.sklearn_to_flow(clf)
     16 
---> 17 run = oml.runs.run_flow_on_task(task, flow)
     18 #myrun = run.publish()
     19 #print("Uploaded to http://www.openml.org/r/" + str(myrun.run_id))

/usr/local/lib/python3.6/site-packages/openml/runs/functions.py in run_flow_on_task(task, flow, avoid_duplicate_runs, flow_tags, seed)
     99 
    100     # execute the run
--> 101     res = _run_task_get_arffcontent(flow.model, task, class_labels)
    102 
    103     if flow.flow_id is None:

/usr/local/lib/python3.6/site-packages/openml/runs/functions.py in _run_task_get_arffcontent(model, task, class_labels)
    424                     model_classes = used_estimator.best_estimator_.classes_
    425                 else:
--> 426                     model_classes = used_estimator.classes_
    427 
    428                 if can_measure_runtime:

AttributeError: 'RandomForestRegressor' object has no attribute 'classes_'

Activity

  1. mfeurer commented on Sep 27, 2017

    @mfeurer
    Collaborator

    We didn't implement regression yet. Therefore, the actual issue is that the error message is a very bad one for 'sorry, this isn't implemented yet'.

  2. joaquinvanschoren commented on Sep 27, 2017

    @joaquinvanschoren
    ContributorAuthor
  3. mfeurer commented on Sep 29, 2017

    @mfeurer
    Collaborator

    I don't know, partly because of openml/OpenML#413. Probably one has to generalize this file for different task types.

  4. joaquinvanschoren commented on Mar 3, 2018

    @joaquinvanschoren
    ContributorAuthor

    This really feels like a bug for users. Can we make this a priority for the next workshop? I'll try to look into it earlier.

    I don't see how this is related to #openml/OpenML#413?

  5. mfeurer commented on Mar 5, 2018

    @mfeurer
    Collaborator

    Could you please comment on priorities in #410 ? It is related to openml/OpenML#413 because I wouldn't know how to upload the trace of a regression task.

  6. joaquinvanschoren commented on Mar 28, 2018

    @joaquinvanschoren
    ContributorAuthor

    Yes, I think this is a priority.
    See this recent zinger on reddit:
    https://www.reddit.com/r/MachineLearning/comments/83ju64/d_other_sites_besides_kaggle_where_you_can/

  7. self-assigned this
    on Apr 4, 2018
  8. mfeurer commented on Feb 25, 2019

    @mfeurer
    Collaborator

    Fixed via #560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions