Title: Broadcasting error in avg_score · Issue #193 · modAL-python/modAL · GitHub
Open Graph Title: Broadcasting error in avg_score · Issue #193 · modAL-python/modAL
X Title: Broadcasting error in avg_score · Issue #193 · modAL-python/modAL
Description: I get the following error with avg_score multilabel strategy - File "C:\Users\localuserSKSG\anaconda3\envs\alenv\lib\site-packages\modAL\models\base.py", line 175, in query query_result, query_metrics = self.query_strategy( File "C:\User...
Open Graph Description: I get the following error with avg_score multilabel strategy - File "C:\Users\localuserSKSG\anaconda3\envs\alenv\lib\site-packages\modAL\models\base.py", line 175, in query query_result, query_metr...
X Description: I get the following error with avg_score multilabel strategy - File "C:\Users\localuserSKSG\anaconda3\envs\alenv\lib\site-packages\modAL\models\base.py", line 175, in query query_result, ...
Opengraph URL: https://github.com/modAL-python/modAL/issues/193
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Broadcasting error in avg_score","articleBody":"I get the following error with avg_score multilabel strategy -\r\n\r\nFile \"C:\\Users\\localuserSKSG\\anaconda3\\envs\\alenv\\lib\\site-packages\\modAL\\models\\base.py\", line 175, in query \r\nquery_result, query_metrics = self.query_strategy( File \"C:\\Users\\localuserSKSG\\anaconda3\\envs\\alenv\\lib\\site-packages\\modAL\\multilabel.py\", \r\nline 258, in avg_score classwise_scores = classwise_confidence*(classwise_predictions-1/2) \r\nValueError: operands could not be broadcast together with shapes (26872,2,3) (26872,3) \r\n\r\nDuring handling of the above exception, another exception occurred: \r\nTraceback (most recent call last): File \"avg-score.py\", line 264, in \u003cmodule\u003e \r\nquery_index, query_instance = learner.query(X_pool_np, n_instances=n_instances)\r\nFile \"C:\\Users\\localuserSKSG\\anaconda3\\envs\\alenv\\lib\\site-packages\\modAL\\models\\base.py\", line 180, in query\r\nquery_result = self.query_strategy( File \"C:\\Users\\localuserSKSG\\anaconda3\\envs\\alenv\\lib\\site-packages\\modAL\\multilabel.py\", line 258, in \r\navg_score classwise_scores = classwise_confidence*(classwise_predictions-1/2) ValueError: operands could not be broadcast together with shapes (26872,2,3) (26872,3)\r\n\r\nWe do not see this error with avg_confidence. Clearly this is because of these lines of code in avg_score which are not present in avg_confidence-\r\n\r\nclasswise_predictions = classifier.predict(X_pool)\r\nclasswise_scores = classwise_confidence*(classwise_predictions-1/2)\r\n\r\nDoes anyone has a solution/workaround for this?","author":{"url":"https://github.com/shubhamgp47","@type":"Person","name":"shubhamgp47"},"datePublished":"2024-12-03T12:05:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/193/modAL/issues/193"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0880e8d6-1c89-b794-9373-40e56a7ec5b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA9A:B7070:6A12E1:8E6E0D:698ED7CE |
| html-safe-nonce | 21cfa9acda67770a4bb144f2c21e593166516118809398e1bea7f6b9ef26203d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTlBOkI3MDcwOjZBMTJFMTo4RTZFMEQ6Njk4RUQ3Q0UiLCJ2aXNpdG9yX2lkIjoiMTg3OTQ0NjY4OTQyNjYyNjUxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 19cd96ddbce83c4faa2746f7cb0c5b449f7878db4ca11bd5d1e6f533836ff4a2 |
| hovercard-subject-tag | issue:2714843466 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modAL-python/modAL/193/issue_layout |
| twitter:image | https://opengraph.githubassets.com/85b1631f61f3b66a43bae9e1af8b129f52eb3424eadf21c756430eab52112078/modAL-python/modAL/issues/193 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/85b1631f61f3b66a43bae9e1af8b129f52eb3424eadf21c756430eab52112078/modAL-python/modAL/issues/193 |
| og:image:alt | I get the following error with avg_score multilabel strategy - File "C:\Users\localuserSKSG\anaconda3\envs\alenv\lib\site-packages\modAL\models\base.py", line 175, in query query_result, query_metr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shubhamgp47 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/modAL-python/modAL git https://github.com/modAL-python/modAL.git |
| octolytics-dimension-user_id | 42179679 |
| octolytics-dimension-user_login | modAL-python |
| octolytics-dimension-repository_id | 110697473 |
| octolytics-dimension-repository_nwo | modAL-python/modAL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 110697473 |
| octolytics-dimension-repository_network_root_nwo | modAL-python/modAL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width