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
Hello, I've been learning how to use River, especifically for a project that involves SAMKNN. I was able to replicate the site example for SAMKNN, and was trying to use the classifier to evaluate a dataset from a csv file using iter_csv. Unfortunately, with a very simple use I already can't use it, it keeps giving the error AttributeError: 'bool' object has no attribute 'tolist' when I try to do an evaluate.progressive_val_score().
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I've been learning how to use River, especifically for a project that involves SAMKNN. I was able to replicate the site example for SAMKNN, and was trying to use the classifier to evaluate a dataset from a csv file using iter_csv. Unfortunately, with a very simple use I already can't use it, it keeps giving the error AttributeError: 'bool' object has no attribute 'tolist' when I try to do an evaluate.progressive_val_score().
`from river import stream
converters = {'1': float, '2': float}
target = '3'
dataset = stream.iter_csv("C:/Users/Pichau/Documents/GitHub/research-project-stream-learning/lazy/fgt-sam-knn-tests/1000-recent/interchanging-rbf/interchanging.csv", converters=converters, target= target)
from river import neighbors
model = neighbors.SAMKNNClassifier(n_neighbors=3)
from river import metrics
metric = metrics.Accuracy()
from river import evaluate
print(evaluate.progressive_val_score(dataset, model, metric))`
Beta Was this translation helpful? Give feedback.
All reactions