{"id":15444338,"url":"https://github.com/qbarthelemy/stats-simple-cpp","last_synced_at":"2025-03-28T08:13:30.592Z","repository":{"id":106947243,"uuid":"433987997","full_name":"qbarthelemy/stats-simple-cpp","owner":"qbarthelemy","description":"Library for statistics in simple C++, for different sequence containers of different numeric data types.","archived":false,"fork":false,"pushed_at":"2024-07-17T21:07:56.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T14:12:29.031Z","etag":null,"topics":["c-plus-plus","cplusplus","machine-learning","scientific-computing","statistics"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbarthelemy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-01T21:17:33.000Z","updated_at":"2024-07-17T21:07:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"6885af91-9284-4bc2-bc7e-9e6acb021b7d","html_url":"https://github.com/qbarthelemy/stats-simple-cpp","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"75465908aa0254e7e2edda6955e64234b243056b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbarthelemy%2Fstats-simple-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbarthelemy%2Fstats-simple-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbarthelemy%2Fstats-simple-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbarthelemy%2Fstats-simple-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbarthelemy","download_url":"https://codeload.github.com/qbarthelemy/stats-simple-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991585,"owners_count":20706129,"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":["c-plus-plus","cplusplus","machine-learning","scientific-computing","statistics"],"created_at":"2024-10-01T19:40:22.019Z","updated_at":"2025-03-28T08:13:30.567Z","avatar_url":"https://github.com/qbarthelemy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stats-simple-cpp\n\n[![Code CppVersion](https://img.shields.io/badge/C++-11+-blue)](https://img.shields.io/badge/C++-11+-blue)\n[![License](https://img.shields.io/badge/licence-BSD--3--Clause-green)](https://img.shields.io/badge/license-BSD--3--Clause-green)\n\nLibrary of statistical functions and classes in simple C++,\ncompatible for different sequence containers of different numeric data types.\n\n## Description\n\nThe goal of this header-only library is to mimic some functions of \n[NumPy](https://github.com/numpy/numpy) and\n[SciPy](https://github.com/scipy/scipy), and some classes of\n[scikit-learn](https://github.com/scikit-learn/scikit-learn) with:\n- simple Python-like syntax;\n- simple C++ code (compatible from C++11);\n- simple dependencies (use only [C++ Standard Library](https://en.cppreference.com/w/cpp/header),\nno advanced dependencies like [boost](https://github.com/boostorg/boost),\n[mlpack](https://github.com/mlpack/mlpack)\nor [Eigen](https://gitlab.com/libeigen/eigen));\n- generic templated functions, compatible for different\n[sequence containers](https://en.cppreference.com/w/cpp/named_req/SequenceContainer)\n(`std::list`, `std::vector`, `std::deque`) \nof different numeric data types (`unsigned int`, `int`, `float`, `double`).\n\n## Content\n\n#### Maths.hpp\n\nInteger input functions: `gcd`, `factorial`\n\nChecking functions: `is_positive`\n\nAggregation functions: `prod`\n\nElement-wise functions: `linear`, `absolute`, `reciprocal`,\n`power`, `log`, `exp`, `sigmoid`\n\nOthers: `set`\n\n#### Stats.hpp\n\nSummary statistics: `mean`, `hmean`, `gmean`, `pmean`,\n`var`, `std`, `hstd`, `gstd`,\n`skewness`, `kurtosis`,\n`median`, `median_abs_deviation`\n\nTransformations: `center`, `zscore`, `gzscore`\n\nCorrelation functions: `pearsonr`, `spearmanr`\n\nMetrics: `accuracy_score`\n\nOthers: `rankdata`\n\n#### CSimpleLinearRegression.hpp\n\nClass `SimpleLinearRegression`,\nwith `fit`, `predict`, and `score` (coefficient of determination R²).\n\n#### CSimpleLogisticRegression.hpp\n\nClass `SimpleLogisticRegression` for binary classification,\nwith `fit`, `predict`, and `score` (accuracy).\n\n## Example\n\n```\n#include \"CSimpleLinearRegression.hpp\"\n#include \u003clist\u003e\n\nint main()\n{\n\tstd::list\u003cdouble\u003e x = { 5.1, 13, -5, 17.5, 8 }, y = { -2, 3, 7.2, 10, -1 };\n\tSimpleLinearRegression slr = SimpleLinearRegression();\n\tslr.fit(x, y);\n\tx = { 42 };\n\ty = slr.predict(x);\n}\n```\n\n## Contributing\n\nCode must be compliant with all features listed in Description.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbarthelemy%2Fstats-simple-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbarthelemy%2Fstats-simple-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbarthelemy%2Fstats-simple-cpp/lists"}