-
-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Description
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_'
Reactions are currently unavailable