hi,when the data is less,it will return false answer,and whats meaning of A binary vector of labels, s #71
Unanswered
DiWang4data
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when there is ten datas,the program return worng unswer
numpy_array_of_noisy_labels = [0,0,0,0,0,1,1,1,1,1]
numpy_array_of_predicted_probabilities = [[0.9, 0.1], [0.9, 0.1], [0.5, 0.5], [0.3, 0.7], [0.3, 0.7],
[0.2, 0.8], [0.2, 0.8], [0.3, 0.7], [0.5, 0.5], [0.6, 0.4]]
s = np.array(numpy_array_of_noisy_labels)
psx = np.array(numpy_array_of_predicted_probabilities)
num = 25
s = s[:num]
psx = psx[:num,:]
print(psx)
import cleanlab
Method 3:Prune by Class (PBC)
baseline_cl_pbc = cleanlab.pruning.get_noise_indices(s, psx, prune_method='prune_by_class',n_jobs=1)
Method 4:Prune by Noise Rate (PBNR)
baseline_cl_pbnr = cleanlab.pruning.get_noise_indices(s, psx, prune_method='prune_by_noise_rate',n_jobs=1)
Method 5:C+NR
baseline_cl_both = cleanlab.pruning.get_noise_indices(s, psx, prune_method='both',n_jobs=1)
print(baseline_cl_pbc)
print(baseline_cl_pbnr)
print(baseline_cl_both)
it will return
[False False False False False False False False False False]
[False False False False False False False False False False]
[False False False False False False False False False False]
but When twice the amount of data,it works in right way.
numpy_array_of_noisy_labels = [0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1]
numpy_array_of_predicted_probabilities = [[0.9, 0.1], [0.9, 0.1], [0.5, 0.5], [0.3, 0.7], [0.3, 0.7],
[0.2, 0.8], [0.2, 0.8], [0.3, 0.7], [0.5, 0.5], [0.6, 0.4],[0.9, 0.1], [0.9, 0.1], [0.5, 0.5], [0.3, 0.7], [0.3, 0.7],
[0.2, 0.8], [0.2, 0.8], [0.3, 0.7], [0.5, 0.5], [0.6, 0.4]]
[False False False True True False False False False True False False
False True True False False False False True]
[False False False True True False False False False True False False
False True True False False False False True]
[False False False True True False False False False True False False
False True True False False False False True]
another question ,the annotation of s:,A binary vector of labels, does it need onehot vector?but when i given a onehot,the program is over
s : np.array
A binary vector of labels, s, which may contain mislabeling. "s" denotes
the noisy label instead of \tilde(y), for ASCII encoding reasons.
Beta Was this translation helpful? Give feedback.
All reactions