{"id":20990647,"url":"https://github.com/wnjxyk/cma","last_synced_at":"2026-04-21T22:31:41.466Z","repository":{"id":154800603,"uuid":"480757412","full_name":"WNJXYK/CMA","owner":"WNJXYK","description":"A Python Implementation of 'Continuous Manifold-based Adaptation'","archived":false,"fork":false,"pushed_at":"2022-04-12T11:26:25.000Z","size":14375,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-13T12:17:42.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WNJXYK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-12T10:18:59.000Z","updated_at":"2022-06-04T09:12:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"296c703c-0efc-4988-8288-95e1d2709941","html_url":"https://github.com/WNJXYK/CMA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WNJXYK/CMA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FCMA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FCMA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FCMA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FCMA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WNJXYK","download_url":"https://codeload.github.com/WNJXYK/CMA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FCMA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32112910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T06:34:52.848Z","updated_at":"2026-04-21T22:31:41.435Z","avatar_url":"https://github.com/WNJXYK.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMA\n\nA Python Implementation of 'Continuous Manifold-based Adaptation', the official MatLab version: [jhoffman/cma](https://github.com/jhoffman/cma).\n\nJudy Hoffman, Trevor Darrell, Kate Saenko: Continuous Manifold Based Adaptation for Evolving Visual Domains. CVPR 2014: 867-874\n\n# How to use\n\n```py3\nfrom sklearn.svm import LinearSVC\nfrom cma import CMA\n\n# Define a CMA module with Linear SVM\n# Mode is 'cgfk' (cgfk / csa)\n# Alpha is 1.5 - Forgetting parameter for online subspace learning\n# Dim is 10\ncma = CMA(LinearSVC(), **{'alpha': 1.5, 'dim': 10, 'mode': 'cgfk'})\n\n# Init on source domain\ncma.fit(Xs, ys.ravel())\n\n# Envolves on data stream\nfor Xt in data_steam:\n    yt = cma.predict(Xt)\n```\n\nWe provide a [Notebook](https://github.com/WNJXYK/CMA/blob/main/CMA-Caltran.ipynb) to reproduce the default experiment in the official Matlab code.\n\n# Experiments\n\nHere is the experiment setting and hyper-parameters.\n```\nDataset: caltran_gist\nNorm_type: L1 Zscore\nSize of Source Domain: 50\nSize of Streaming: 480\nBlock Size: 2\nAlpha: 1.5\nDim: 10\n```\n\n## Original Matlab Version\n\n|StartIdx|  KNN |   SVM | KNN_cgfk | KNN_csa | SVM_cgfk | SVM_csa |\n| ---: | ----: | -------: | ------: | -------: | ------: | -----:|\n| 350  | 65.49 | 77.75 | 64.66    | 64.45   | 83.99    | 83.58   |\n| 400  | 65.70 | 71.93 | 66.53    | 66.32   | 73.39    | 73.80   |\n| 450  | 55.30 | 70.48 | 55.30    | 54.89   | 72.77    | 72.56   |\n| 500  | 54.89 | 71.93 | 55.51    | 55.51   | 67.98    | 67.98   |\n| 550  | 67.57 | 71.52 | 62.99    | 63.41   | 79.21    | 79.21   |\n| Mean | 61.79 | 72.72 | 61.00    | 60.91   | 75.47    | 75.43   |\n\n## This Python Implementation\n\n|StartIdx|  KNN |   SVM | KNN_cgfk | KNN_csa | SVM_cgfk | SVM_csa |\n| ---: | ----: | -------: | ------: | -------: | ------: | -----:|\n|  350 | 63.96 |    77.50 |   66.46 |    69.17 |   84.79 | 84.79 |\n|  400 | 65.21 |    72.08 |   64.17 |    64.17 |   73.96 | 74.17 |\n|  450 | 56.46 |    69.58 |   56.67 |    56.88 |   72.50 | 72.71 |\n|  500 | 56.04 |    71.88 |   52.92 |    53.54 |   66.25 | 67.92 |\n|  550 | 55.00 |    71.67 |   55.00 |    53.96 |   76.25 | 79.38 |\n| Mean | 59.33 |    72.54 |   59.04 |    59.54 |   74.75 | 75.79 |\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnjxyk%2Fcma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwnjxyk%2Fcma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnjxyk%2Fcma/lists"}