skada
skada copied to clipboard
Change target_labels name for the SupervisedScorer
In this example:
X, y, sample_domain = da_dataset.pack_train(as_sources=['s'], as_targets=['t'])
estimator = make_da_pipeline(
ReweightDensityAdapter(),
LogisticRegression().set_score_request(sample_weight=True),
)
cv = ShuffleSplit(n_splits=3, test_size=0.3, random_state=0)
_, target_labels, _ = da_dataset.pack(as_sources=['s'], as_targets=['t'], train=False)
scoring = SupervisedScorer()
scores = cross_validate(
estimator,
X,
y,
cv=cv,
params={'sample_domain': sample_domain, 'target_labels': target_labels},
scoring=scoring,
)
The target_labels corresponds to the labels of the SOURCE + TARGET samples. Calling this array target_labels is super confusing...
We could call it unmasked_labels, all_labels, source_target_labels or even y_test.