{"id":19309674,"url":"https://github.com/jolars/libslope","last_synced_at":"2025-04-12T10:37:36.702Z","repository":{"id":208961758,"uuid":"721627092","full_name":"jolars/libslope","owner":"jolars","description":"C++ library for Sorted L-One Penalized Estimation (SLOPE)","archived":false,"fork":false,"pushed_at":"2025-04-09T11:26:44.000Z","size":6378,"stargazers_count":1,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T11:30:43.452Z","etag":null,"topics":["cpp","machine-learning","regularization","slope","statistics"],"latest_commit_sha":null,"homepage":"https://jolars.github.io/libslope/","language":"C++","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/jolars.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-11-21T12:56:39.000Z","updated_at":"2025-04-09T11:07:43.000Z","dependencies_parsed_at":"2023-12-26T22:28:59.904Z","dependency_job_id":"cd376540-2ca2-46e2-aff8-dd66e816ebb8","html_url":"https://github.com/jolars/libslope","commit_stats":null,"previous_names":["jolars/libslope"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Flibslope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Flibslope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Flibslope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Flibslope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jolars","download_url":"https://codeload.github.com/jolars/libslope/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248555122,"owners_count":21123832,"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":["cpp","machine-learning","regularization","slope","statistics"],"created_at":"2024-11-10T00:20:14.472Z","updated_at":"2025-04-12T10:37:36.686Z","avatar_url":"https://github.com/jolars.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SLOPE \u003cimg src='https://raw.githubusercontent.com/jolars/libslope/refs/heads/main/assets/slope-logo.png' align=\"right\" height=\"139\" /\u003e\n\n[![CI](https://github.com/jolars/libslope/actions/workflows/ci.yaml/badge.svg)](https://github.com/jolars/libslope/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/jolars/libslope/graph/badge.svg?token=y0mJN9eqYr)](https://codecov.io/gh/jolars/libslope)\n\nLibslope is a C++ library for Sorted L-One Penalized Estimation (SLOPE). Its main\npurpose is to serve as a backend for R and Python packages, but it can also be\nused as a standalone library in the off-chance that you want to fit your models\nentirely through C++.\n\n## Getting Started\n\nFirst, we define our model. Let's use logistic regression, by setting the\nloss to `\"logistic\"`.\n\n```cpp\n#include \"slope.h\"\n\nSlope::Model model;\n\nmodel.setLoss(\"logistic\");\n```\n\nNext, we set the data matrix `x` and the response vector `y`. Here we use some\ntoy data.\n\n```cpp\nEigen::MatrixXd x(3, 2);\nEigen::VectorXd y(3);\n\nx \u003c\u003c 1.1, 2.3, 0.2, 1.5, 0.5, 0.2;\ny \u003c\u003c 0, 1, 0;\n```\n\nFinally, we call the `path()` method to fit the full SLOPE path.\n\n```cpp\nauto res = model.path(x, y);\n```\n\nNow we can retrieve the coefficients by calling `res.getCoefs()`.\n\n## Dependencies\n\n### Building\n\n- A C++17 compiler\n- CMake 3.15 or later\n- Eigen 3.4 or later\n\n### Documentation\n\n- Doxygen\n\n### Testing\n\n- Catch2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjolars%2Flibslope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjolars%2Flibslope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjolars%2Flibslope/lists"}