Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Already labeled data is labeled again in every iteration in "Growing Datasets" #9

Open
Alx-Wo opened this issue Mar 19, 2023 · 0 comments

Comments

@Alx-Wo
Copy link

Alx-Wo commented Mar 19, 2023

Hi, I'm just doing this course out of personal interest. In

def passive_selection(x, labeled, label_func, n):
    candidates = set(range(0, len(x))) - set(labeled)
    labeled = np.concatenate([labeled, random.sample(list(candidates), n)])
    labels = [label_func(example) for example in x[labeled]]
    return labeled, labels

and

def active_selection(x, labeled, label_func, n):
    labels = [label_func(example) for example in x[labeled]]
    candidates = set(np.arange(len(x))) - set(labeled)
    # YOUR CODE HERE
    pass

both functions apply the label_func to all samples in labeled, so already labeled data will always be rel-labeled. Is there a reason for re-labeling already labeled examples in every iteration. It does not really matter since the label_func is O(1) but in practice this would be very bad I assume?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant