{"id":26255387,"url":"https://github.com/yutsuro/copmar","last_synced_at":"2026-05-16T11:05:53.213Z","repository":{"id":147980783,"uuid":"536173970","full_name":"Yutsuro/COPMAR","owner":"Yutsuro","description":"Calculate One Prediction from MAny Results","archived":false,"fork":false,"pushed_at":"2022-09-15T15:01:11.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T18:41:45.401Z","etag":null,"topics":["csv","pandas","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Yutsuro.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-13T14:47:12.000Z","updated_at":"2023-01-10T05:05:06.000Z","dependencies_parsed_at":"2023-05-28T04:15:06.518Z","dependency_job_id":null,"html_url":"https://github.com/Yutsuro/COPMAR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yutsuro/COPMAR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yutsuro%2FCOPMAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yutsuro%2FCOPMAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yutsuro%2FCOPMAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yutsuro%2FCOPMAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yutsuro","download_url":"https://codeload.github.com/Yutsuro/COPMAR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yutsuro%2FCOPMAR/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["csv","pandas","python"],"created_at":"2025-03-13T19:18:31.620Z","updated_at":"2026-05-16T11:05:53.208Z","avatar_url":"https://github.com/Yutsuro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# COPMAR\n\n## **C**alculate **O**ne **P**rediction from **MA**ny **R**esults\n\n指定したデータフレームから基準に合わせた時系列データを切り出してjsonに保存する処理と、複数の確信度出力結果から最も確信度が高いクラスを算定するライブラリ（？）です。\n\n## How to use\n\n作業しているディレクトリにCOPMARをクローンして、`import COPMAR`で宣言\n\n### COPMAR.COPMAR.MakeTestData\n\n指定したテストデータから、`num_frames_list`に指定したフレーム幅の時系列データを作る関数。不連続データを弾く基準は`num_frames_list`の最大値に依存。作られたデータはjsonファイルに格納される。\n\n```python\nimport COPMAR\nimport pandas as pd\n\ndf = pd.read_csv(csv_path)\ninput_dim = 25\nnum_frames_list = [1,5,10,20]\n\nCOPMAR.COPMAR.MakeTestData(df, input_dim, num_frames_list)\n```\n\n### COPMAR.COPMAR.CalculatePredictions\n\n確信度を記録した複数のcsvファイルから、確信度が最大のクラスを算出する関数。クラス数およびデータ数は各ファイルで同じでないと失敗するので注意。\n\n想定するCSVファイルの構造は以下の通り：  \n```csv\nclass pred_0 pred_1 pred_2 pred_3 pred_4 pred_5\n    0   0.25   0.20   0.15   0.10   0.10   0.20\n    4   0.20   0.20   0.20   0.10   0.25   0.05\n    1   0.25   0.40   0.05   0.00   0.10   0.20\n                    .\n                    .\n                    .\n```\n\n実行例は以下の通り。この例では10000データ分の推論結果に対して、4つの推論結果を記録したCSVファイルから6クラス分類の確信度を算出した結果を受け取っている。\n\n```python\nimport COPMAR\nimport pandas as pd\n\ndata_length = 10000\nnum_class = 6\ntest_pred_list = [\"pred_A.csv\",\"pred_B.csv\",\"pred_C.csv\",\"pred_D.csv\"]\n\npred_data = COPMAR.COPMAR.CalculatePredictions(data_length,num_class,test_pred_list)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutsuro%2Fcopmar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyutsuro%2Fcopmar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutsuro%2Fcopmar/lists"}