You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the following code in Python 3.6 but nothing is running
#download an example dataset from
from sklearn import datasets
data = datasets.load_iris()
iris = pd.DataFrame(data.data, columns=data.feature_names)
create a classifier
elmk = elm.ELMKernel()
search for best parameter for this dataset
define "kfold" cross-validation method, "accuracy" as a objective function
to be optimized and perform 10 searching steps.
best parameters will be saved inside 'elmk' object
I have used the following code in Python 3.6 but nothing is running
#download an example dataset from
from sklearn import datasets
data = datasets.load_iris()
iris = pd.DataFrame(data.data, columns=data.feature_names)
create a classifier
elmk = elm.ELMKernel()
search for best parameter for this dataset
define "kfold" cross-validation method, "accuracy" as a objective function
to be optimized and perform 10 searching steps.
best parameters will be saved inside 'elmk' object
elmk.search_param(iris, cv="kfold", of="accuracy", eval=10)
split data in training and testing sets
use 80% of dataset to training and shuffle data before splitting
tr_set, te_set = elm.split_sets(iris, training_percent=.8, perm=True)
#train and test
results are Error objects
tr_result = elmk.train(iris)
te_result = elmk.test(te_set)
print(te_result.get_accuracy)
The text was updated successfully, but these errors were encountered: