Use k samples for training before evaluating the progressing validation score #756
-
Hello, I was wondering if it were easily possible to use k samples (say 100) of a data stream for training before evaluating the progressing validation score in an online fashion. It would be useful for me, as I'm using River's algorithms to benchmark the results of some models which assume to have (a few) training data before starting to work online. |
Beta Was this translation helpful? Give feedback.
Answered by
MaxHalford
Nov 4, 2021
Replies: 1 comment 2 replies
-
Hello! What's preventing you from doing that right now? For example: import itertools
from river import datasets
from river import evaluate
from river import linear_model
from river import metrics
from river import preprocessing
model = (
preprocessing.StandardScaler() |
linear_model.LogisticRegression()
)
dataset = iter(datasets.Phishing())
# Warm up
k = 200
for x, y in itertools.islice(dataset, k):
model.predict_one(x)
model.learn_one(x, y)
evaluate.progressive_val_score(
model=model,
dataset=dataset,
metric=metrics.ROCAUC(),
print_every=100
) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
SirPopiel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! What's preventing you from doing that right now? For example: