{"id":20989873,"url":"https://github.com/robtillaart/gst","last_synced_at":"2026-04-14T00:31:46.968Z","repository":{"id":38241159,"uuid":"464094225","full_name":"RobTillaart/GST","owner":"RobTillaart","description":"Arduino library for Gold Standard Test metrics","archived":false,"fork":false,"pushed_at":"2025-09-07T16:27:01.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-02T07:20:24.893Z","etag":null,"topics":["arduino","math","statistic"],"latest_commit_sha":null,"homepage":"","language":"C++","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/RobTillaart.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"RobTillaart","custom":"https://www.paypal.me/robtillaart"}},"created_at":"2022-02-27T09:41:49.000Z","updated_at":"2025-09-07T16:26:24.000Z","dependencies_parsed_at":"2024-04-19T04:16:03.557Z","dependency_job_id":null,"html_url":"https://github.com/RobTillaart/GST","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/RobTillaart/GST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FGST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FGST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FGST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FGST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobTillaart","download_url":"https://codeload.github.com/RobTillaart/GST/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FGST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31776891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T00:11:49.126Z","status":"ssl_error","status_checked_at":"2026-04-14T00:10:29.837Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["arduino","math","statistic"],"created_at":"2024-11-19T06:26:33.549Z","updated_at":"2026-04-14T00:31:46.942Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":[],"sub_categories":[],"readme":"\n[![Arduino CI](https://github.com/RobTillaart/GST/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)\n[![Arduino-lint](https://github.com/RobTillaart/GST/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/GST/actions/workflows/arduino-lint.yml)\n[![JSON check](https://github.com/RobTillaart/GST/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/GST/actions/workflows/jsoncheck.yml)\n[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/GST.svg)](https://github.com/RobTillaart/GST/issues)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/GST/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/RobTillaart/GST.svg?maxAge=3600)](https://github.com/RobTillaart/GST/releases)\n[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/GST.svg)](https://registry.platformio.org/libraries/robtillaart/GST)\n\n\n# GST\n\nArduino library for Gold Standard Test metrics.\n\n\n## Description\n\n**Experimental**\n\nThe GST library is an experimental implementation of the **Gold Standard Test**.\n\nUsable for educational purposes.\n\n\n\n### Links\n\nThese sites describe the functions in more detail.\n\n- https://en.wikipedia.org/wiki/Sensitivity_and_specificity\n- https://en.wikipedia.org/wiki/Confusion_matrix\n\n\n### Related\n\n- https://github.com/RobTillaart/Correlation\n- https://github.com/RobTillaart/GST - Golden standard test metrics\n- https://github.com/RobTillaart/Histogram\n- https://github.com/RobTillaart/RunningAngle\n- https://github.com/RobTillaart/RunningAverage\n- https://github.com/RobTillaart/RunningMedian\n- https://github.com/RobTillaart/statHelpers - combinations \u0026 permutations\n- https://github.com/RobTillaart/Statistic\n\n\n### Performance\n\nThe math functions are from pretty straightforward to rather complex.\n\nIt is possible to optimize functions with intermediate values if needed. \nHowever the right way to optimize depends on the way the library is used. \nSo feel free to optimize.\n\n\n## Interface\n\n```cpp\n#include \"GST.h\"\n```\n\nSee .h file for all functions. Many function exist in a long descriptive name and an acronym version. Here only the long names are given.\n\nFor the definitions please check - https://en.wikipedia.org/wiki/Sensitivity_and_specificity or\nhttps://en.wikipedia.org/wiki/Confusion_matrix\n\n\n### Input functions\n\nThese four numbers should all be set before output functions make sense.\nThe parameter **value** is typical absolute value measured or counted.\nIf the parameter is omitted, the default 0 will be used to reset the value.\n\n- **void setTruePositive(float value = 0)** set the internal TP value.\n- **void setTrueNegative(float value = 0)** set the internal TN value.\n- **void setFalsePositive(float value = 0)** set the internal FP value.\n- **void setFalseNegative(float value = 0)** set the internal FN value.\n- **void clearAll()** reset all the above to 0.\n\nIn tests one often want to increase / change the numbers.\nThis can be done with the **addTruePositive()** etc functions. \nAfter every addition all output functions can be called.\n\n- **float addTruePositive(float value)** increases the internal TP value.\nUse a negative value to decrease.\nReturns the new value of TP.\n- **float addTrueNegative(float value)** increases the internal TN value.\nUse a negative value to decrease.\nReturns the new value of TN.\n- **float addFalsePositive(float value)** increases the internal FP value.\nUse a negative value to decrease.\nReturns the new value of FP.\n- **float addFalseNegative(float value)** increases the internal FN value.\nUse a negative value to decrease.\nReturns the new value of FN.\n\n\n### Output functions I\n\nBasic output\n\n- **float getTruePositive()** returns internal TP.\n- **float getTrueNegative()** returns internal TN.\n- **float getFalsePositive()** returns internal FP.\n- **float getFalseNegative()** returns internal FN.\n\n\n- **float getTotal()** returns total of four numbers.\n- **float getActualPositive()**\n- **float getActualNegative()**\n- **float getTestedPositive()**\n- **float getTestedNegative()**\n\n\n- **float sensitivity()** equals truePositiveRate().\n- **float specificity()** equals trueNegativeRate()\n\n\n**Rate** functions can be multiplied by 100.0 to get percentage.\n\n- **float truePositiveRate()** returns value between 0.0 and 1.0\n- **float trueNegativeRate()** returns value between 0.0 and 1.0\n- **float falseNegativeRate()** returns value between 0.0 and 1.0\n- **float falsePositiveRate()** returns value between 0.0 and 1.0\n\n\n### Output functions II\n\nThese output functions are the more 'complex' functions.\nRead the Wikipedia pages for their uses.\n\n- **float positivePredictiveValue()**\n- **float negativePredictiveValue()**\n- **float falseDiscoveryRate()**\n- **float falseOmissionRate()**\n\n\n- **float positiveLikelihoodRatio()**\n- **float negativeLikelihoodRatio()**\n\n\n- **float prevalenceThreshold()**\n- **float threatScore()**\n- **float criticalSuccessIndex()**\n\n\n- **float prevalence()**\n- **float accuracy()**\n- **float balancedAccuracy()**\n- **float F1Score()**\n\n\n- **float MatthewsCorrelationCoefficient()**\n- **float FowlkesMallowsIndex()**\n- **float BookmakerInformedness()**\n\n\n- **float markedness()**\n- **float deltaP()**\n- **float diagnosticOddsRatio()**\n\n\n## Future\n\n#### Must\n\n- improve documentation\n\n#### Should\n\n- add functions\n  - percentage functions for TP TN FP and FN?\n- test\n  - complete the CI test coverage.\n\n#### Could\n\n- examples\n  - add real life examples.\n  - combination with a sensor? batch testing?\n\n#### Wont\n\n\n## Support\n\nIf you appreciate my libraries, you can support the development and maintenance.\nImprove the quality of the libraries by providing issues and Pull Requests, or\ndonate through PayPal or GitHub sponsors.\n\nThank you,\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fgst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtillaart%2Fgst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fgst/lists"}