René's URL Explorer Experiment


Title: Active Learning Yields Poor Results in Multi-Label Task · Issue #191 · modAL-python/modAL · GitHub

Open Graph Title: Active Learning Yields Poor Results in Multi-Label Task · Issue #191 · modAL-python/modAL

X Title: Active Learning Yields Poor Results in Multi-Label Task · Issue #191 · modAL-python/modAL

Description: I am using modAL for an active learning project in multi-label classification. My implementation is in PyTorch, and I use DinoV2 as the backbone model. For the same dataset, I apply both active learning (using minimum confidence and aver...

Open Graph Description: I am using modAL for an active learning project in multi-label classification. My implementation is in PyTorch, and I use DinoV2 as the backbone model. For the same dataset, I apply both active lea...

X Description: I am using modAL for an active learning project in multi-label classification. My implementation is in PyTorch, and I use DinoV2 as the backbone model. For the same dataset, I apply both active lea...

Opengraph URL: https://github.com/modAL-python/modAL/issues/191

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Active Learning Yields Poor Results in Multi-Label Task","articleBody":"I am using modAL for an active learning project in multi-label classification. My implementation is in PyTorch, and I use DinoV2 as the backbone model.\r\n For the same dataset, I apply both active learning (using minimum confidence and average confidence strategies) and random sampling. I select the same number of samples in both strategies, but the results from random sampling are significantly better than those from the active learning approach. I would like to know if this discrepancy might be due to an issue with my code or the modAL library's handling of multi-label classification. Below is my active learning loop:\r\n\r\n```\r\nfor i in range(n_queries):\r\n    if i == 12:\r\n        n_instances = X_pool.shape[0]\r\n    else:\r\n        n_instances = batch(int(np.ceil(np.power(10, POWER))), BATCH_SIZE)\r\n\r\n    print(f\"\\nQuery {i + 1}: Requesting {n_instances} samples from a pool of size {X_pool.shape[0]}\")\r\n\r\n    if X_pool.shape[0] \u003c n_instances:\r\n        print(\"Not enough samples left in the pool to query the desired number of instances.\")\r\n        break\r\n\r\n    query_idx, _ = learner.query(X_pool, n_instances=n_instances)\r\n    query_idx = np.unique(query_idx)\r\n\r\n    if len(query_idx) == 0:\r\n        print(\"No indices were selected, which may indicate an issue with the query function or pool.\")\r\n        continue\r\n\r\n    # Add the newly selected samples to the cumulative training set\r\n    cumulative_X_train.append(X_pool[query_idx])\r\n    cumulative_y_train.append(y_pool[query_idx])\r\n\r\n    # Concatenate all the samples to form the cumulative training data\r\n    X_train_cumulative = np.concatenate(cumulative_X_train, axis=0)\r\n    y_train_cumulative = np.concatenate(cumulative_y_train, axis=0)\r\n\r\n    learner.teach(X_train_cumulative, y_train_cumulative)\r\n\r\n    # Log the selected sample names\r\n    selected_sample_names = train_df.loc[query_idx, \"image\"].tolist()\r\n    print(f\"Selected samples in Query {i + 1}: {selected_sample_names}\")\r\n    with open(samples_log_file, mode='a', newline='') as f:\r\n        writer = csv.writer(f)\r\n        writer.writerow([i + 1] + selected_sample_names)\r\n\r\n    # Remove the selected samples from the pool\r\n    X_pool = np.delete(X_pool, query_idx, axis=0)\r\n    y_pool = np.delete(y_pool, query_idx, axis=0)\r\n\r\n    # Evaluate the model\r\n    y_pred = learner.predict(X_test_np)\r\n    accuracy = accuracy_score(y_test_np, y_pred)\r\n    f1 = f1_score(y_test_np, y_pred, average='macro')\r\n    acc_test_data.append(accuracy)\r\n    f1_test_data.append(f1)\r\n    print(f\"Accuracy after query {i + 1}: {accuracy}\")\r\n    print(f\"F1 Score after query {i + 1}: {f1}\")\r\n\r\n    # Early stopping logic\r\n    if f1 \u003e best_f1_score:\r\n        best_f1_score = f1\r\n        wait = 0\r\n    else:\r\n        wait += 1\r\n        if wait \u003e= patience:\r\n            print(f\"Stopping early after {i + 1} queries due to no improvement in F1 score.\")\r\n            break\r\n\r\n    total_samples += len(query_idx)\r\n    print(f\"Total samples used for training after query {i + 1}: {total_samples}\")\r\n    POWER += 0.25\r\n    torch.cuda.empty_cache()\r\n\r\n```\r\n   ","author":{"url":"https://github.com/shadikhamsehh","@type":"Person","name":"shadikhamsehh"},"datePublished":"2024-09-10T20:16:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/191/modAL/issues/191"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:dc7b6755-67a1-e623-c3ff-0579588882f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB546:13DEEE:DE1031:130DFD5:698F08FD
html-safe-noncecb0e0158633e1de7804feb21cc8cf7bfb6369ff7dd7343a287dbae7d9fca6ddf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTQ2OjEzREVFRTpERTEwMzE6MTMwREZENTo2OThGMDhGRCIsInZpc2l0b3JfaWQiOiIxMDA3NTA4NzIyNzgyNTA1MjEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca12b743906e586650f0137300f99397f0981c847e4d857a7dee8039304156e2b
hovercard-subject-tagissue:2517672547
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modAL-python/modAL/191/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4f3724aba2432916981ea755d22207e12f7440018d18bd1065917a063c076724/modAL-python/modAL/issues/191
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4f3724aba2432916981ea755d22207e12f7440018d18bd1065917a063c076724/modAL-python/modAL/issues/191
og:image:altI am using modAL for an active learning project in multi-label classification. My implementation is in PyTorch, and I use DinoV2 as the backbone model. For the same dataset, I apply both active lea...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshadikhamsehh
hostnamegithub.com
expected-hostnamegithub.com
None2da1a0d1318592c9965539b12269c4641177dfabfc86c3807992efb13e1d96ff
turbo-cache-controlno-preview
go-importgithub.com/modAL-python/modAL git https://github.com/modAL-python/modAL.git
octolytics-dimension-user_id42179679
octolytics-dimension-user_loginmodAL-python
octolytics-dimension-repository_id110697473
octolytics-dimension-repository_nwomodAL-python/modAL
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id110697473
octolytics-dimension-repository_network_root_nwomodAL-python/modAL
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release66d26b1a7f81bd3ffe8d0f16abab43f6e64fd21a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/modAL-python/modAL/issues/191#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FmodAL-python%2FmodAL%2Fissues%2F191
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FmodAL-python%2FmodAL%2Fissues%2F191
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modAL-python%2FmodAL
Reloadhttps://patch-diff.githubusercontent.com/modAL-python/modAL/issues/191
Reloadhttps://patch-diff.githubusercontent.com/modAL-python/modAL/issues/191
Reloadhttps://patch-diff.githubusercontent.com/modAL-python/modAL/issues/191
modAL-python https://patch-diff.githubusercontent.com/modAL-python
modALhttps://patch-diff.githubusercontent.com/modAL-python/modAL
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FmodAL-python%2FmodAL
Fork 327 https://patch-diff.githubusercontent.com/login?return_to=%2FmodAL-python%2FmodAL
Star 2.3k https://patch-diff.githubusercontent.com/login?return_to=%2FmodAL-python%2FmodAL
Code https://patch-diff.githubusercontent.com/modAL-python/modAL
Issues 93 https://patch-diff.githubusercontent.com/modAL-python/modAL/issues
Pull requests 12 https://patch-diff.githubusercontent.com/modAL-python/modAL/pulls
Actions https://patch-diff.githubusercontent.com/modAL-python/modAL/actions
Projects 0 https://patch-diff.githubusercontent.com/modAL-python/modAL/projects
Wiki https://patch-diff.githubusercontent.com/modAL-python/modAL/wiki
Security 0 https://patch-diff.githubusercontent.com/modAL-python/modAL/security
Insights https://patch-diff.githubusercontent.com/modAL-python/modAL/pulse
Code https://patch-diff.githubusercontent.com/modAL-python/modAL
Issues https://patch-diff.githubusercontent.com/modAL-python/modAL/issues
Pull requests https://patch-diff.githubusercontent.com/modAL-python/modAL/pulls
Actions https://patch-diff.githubusercontent.com/modAL-python/modAL/actions
Projects https://patch-diff.githubusercontent.com/modAL-python/modAL/projects
Wiki https://patch-diff.githubusercontent.com/modAL-python/modAL/wiki
Security https://patch-diff.githubusercontent.com/modAL-python/modAL/security
Insights https://patch-diff.githubusercontent.com/modAL-python/modAL/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/modAL-python/modAL/issues/191
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/modAL-python/modAL/issues/191
Active Learning Yields Poor Results in Multi-Label Taskhttps://patch-diff.githubusercontent.com/modAL-python/modAL/issues/191#top
https://github.com/shadikhamsehh
https://github.com/shadikhamsehh
shadikhamsehhhttps://github.com/shadikhamsehh
on Sep 10, 2024https://github.com/modAL-python/modAL/issues/191#issue-2517672547
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.