-
Notifications
You must be signed in to change notification settings - Fork 688
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
What format of s and psx should be inputted into get_noise_indices() in a multi-label scenario #23
Comments
Hi @KongMingxi. Easy fix. The labels need to start at 0. So, use labels 0, 1, 2, 3, 4 instead of 1, 2, 3, 4, 5. |
Hi @cgnorthcutt |
Hi @KongMingxi You can use For example, from cleanlab.util import onehot2int
correctly_formatted_labels = onehot2int(onehot_matrix) |
Please share the function call and the first few lines of all inputs.
…On Thu, Jul 9, 2020, 7:21 AM nuaayuyang ***@***.***> wrote:
[image: image]
<https://user-images.githubusercontent.com/67412250/87033619-1de8fa00-c219-11ea-8e95-abd1867f0e87.png>
when i am using it to mutil lable i have got this problem , how can i
solve it
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/cgnorthcutt/cleanlab/issues/23#issuecomment-656069595>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGOHF7T4U6XWXXJVDNE2HSLR2WR3PANCNFSM4LDUR6SQ>
.
|
I have 20 samples with multi-label and 5 classes, such as:
[[2, 3, 4], [1, 3, 4, 5], [1, 3, 4], [1, 2, 3, 4, 5], [2, 3, 5], [1, 2, 4], [1, 3, 4, 5], [1, 3], [1, 5], [1, 3, 4, 5], [2, 3, 4], [3, 4], [4], [1, 3, 4], [2, 3, 4, 5], [1, 4], [3, 4], [3, 5], [2, 3, 5], [2, 5]]
I inputted this label list and a probabilities matrix as psx (shape=(20,5)) into get_noise_indices().
However, the error is:
File "C:\Users\Anaconda2\envs\tf18\lib\site-packages\cleanlab\pruning.py", line 342, in get_noise_indices
multi_label=multi_label,
File "C:\Users\Anaconda2\envs\tf18\lib\site-packages\cleanlab\latent_estimation.py", line 303, in compute_confident_joint
calibrate=calibrate,
File "C:\Users\Anaconda2\envs\tf18\lib\site-packages\cleanlab\latent_estimation.py", line 216, in _compute_confident_joint_multi_label
multi_label=True,
File "C:\Users\Anaconda2\envs\tf18\lib\site-packages\cleanlab\latent_estimation.py", line 121, in calibrate_confident_joint
confident_joint.T / confident_joint.sum(axis=1) * s_counts
ValueError: operands could not be broadcast together with shapes (5,5) (6,)
Is there any wrong with my inputs?
What format of s and psx are correct in this multi-label scenario?
The text was updated successfully, but these errors were encountered: