{"id":16511305,"url":"https://github.com/pbenner/classifierperformance","last_synced_at":"2025-09-23T03:30:11.102Z","repository":{"id":57535503,"uuid":"179032277","full_name":"pbenner/classifierPerformance","owner":"pbenner","description":"Program to compute performance measures from predictions of a classifier","archived":false,"fork":false,"pushed_at":"2020-07-29T22:05:34.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T20:22:54.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbenner.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}},"created_at":"2019-04-02T08:24:51.000Z","updated_at":"2020-07-29T22:05:36.000Z","dependencies_parsed_at":"2022-08-29T00:41:00.670Z","dependency_job_id":null,"html_url":"https://github.com/pbenner/classifierPerformance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbenner%2FclassifierPerformance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbenner%2FclassifierPerformance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbenner%2FclassifierPerformance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbenner%2FclassifierPerformance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbenner","download_url":"https://codeload.github.com/pbenner/classifierPerformance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476458,"owners_count":19968916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10-11T15:59:46.661Z","updated_at":"2025-09-23T03:30:05.999Z","avatar_url":"https://github.com/pbenner.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Compute performance measures of classification results\n\nPrediction results must be given as a table in the following format:\n```sh\n$ head README.table \nprediction label\n0.612547843484208 1\n0.364270970690995 1\n0.432136141695082 0\n0.140291077783331 0\n0.384895941475406 0\n0.244415489258245 1\n0.970641299150884 1\n0.890172811923549 1\n0.78178137098439 1\n```\n\nCompute the precision-recall curve:\n```sh\n$ classifierPerformance --print-header precision-recall README.table | head\nrecall precision\n0.989247 0.462312\n0.989247 0.464646\n0.978495 0.461929\n0.967742 0.459184\n0.967742 0.461538\n0.967742 0.463918\n0.967742 0.466321\n0.967742 0.468750\n0.967742 0.471204\n```\n\nPrint thresholds columns:\n```sh\n$ classifierPerformance --print-header --print-thresholds precision-recall README.table | head\nrecall precision threshold\n0.989247 0.462312 0.005423\n0.989247 0.464646 0.007746\n0.978495 0.461929 0.012654\n0.967742 0.459184 0.014824\n0.967742 0.461538 0.016694\n0.967742 0.463918 0.018528\n0.967742 0.466321 0.030235\n0.967742 0.468750 0.035815\n0.967742 0.471204 0.040907\n```\n\nPlot precision recall curve and save it as *Rplots.pdf*:\n```sh\nclassifierPerformance --print-header precision-recall README.table | Rscript -e 't \u003c- read.table(file(\"stdin\"), header=T); plot(precision ~ recall, t, type=\"l\")'\n```\n\nCompute ROC curve:\n```sh\n$ classifierPerformance --print-header --print-thresholds roc README.table | head\nFPR TPR threshold\n1.000000 0.989247 0.005423\n0.990654 0.989247 0.007746\n0.990654 0.978495 0.012654\n0.990654 0.967742 0.014824\n0.981308 0.967742 0.016694\n0.971963 0.967742 0.018528\n0.962617 0.967742 0.030235\n0.953271 0.967742 0.035815\n0.943925 0.967742 0.040907\n```\n\nIdentify an optimal threshold by maximizing precision and recall:\n```sh\n$ classifierPerformance --print-header optimal-precision-recall README.table\nrecall=0.849462 precision=0.831579 threshold=0.499788\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbenner%2Fclassifierperformance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbenner%2Fclassifierperformance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbenner%2Fclassifierperformance/lists"}