Skip to content

feature req: add w parameter (ex sample_weight) to progressive_val_score #1502

Open
@niccolopetti

Description

@niccolopetti

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

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