Open
Description
The fit method of sklearn has a sample_weight
parameter to pass weights of the instances, and the learn_one
method of river also has that attribute, recently renamed to w
in #1457 , currently if we had a list of weights and instances to perform our training using our weights we would have to use the learn_one
method manually iterating over our data,
it would be much more comfortable to be able to pass the weights with the instances as it happens with sklearn.
it would be nice to be able to do something like:
from river import datasets
from river import evaluate
from river import metrics
evaluate.progressive_val_score(
model=model,
dataset=datasets.Phishing(),
metric=metrics.ROCAUC(),
print_every=200,
w=weights
)
where weights
contain for each instance of the dataset the corresponding weight