Closed QajikHakobyan closed 3 years ago
@sian-chen Could you answer this question?
Thanks.
@sian-chen Could you please provide an working example with hierarchical sampling
@sian-chen Could you please provide an working example with hierarchical sampling
@QajikHakobyan I write the working example and clarify this issue here. Please check it!
I consider that the AssertionError
occurs as you only use query strategy update. When next time qs.make_query()
, the former corresponded labeled in dataset
doesn't update.
Please check the example of Comparing Different Query Strategies to get more examples.
Thanks.
Got an assertion error, while doing query and update in herarchical clustering. `y = [] for idx in range(len(y_pool)): if idx in seed_set: y += [y_pool[idx]] else: y += [None] dataset = Dataset(X_pool, y)
sub_qs = UncertaintySampling( dataset, method='sm', model=libact.models.LogisticRegression(max_iter=1000)) qs = HierarchicalSampling( dataset, # Dataset object np.unique(y_pool), active_selecting=True, subsample_qs=sub_qs )
for idx in range(100): a = qs.make_query() qs.update(a, y_pool[a]) qs.sub_qs.update(a, y_pool[a])
`