{"id":15501654,"url":"https://github.com/trr318/scikit-psl","last_synced_at":"2025-04-13T21:35:50.479Z","repository":{"id":186927594,"uuid":"676012930","full_name":"TRR318/scikit-psl","owner":"TRR318","description":"Scoring Lists – a probabilistic \u0026 incremental extension to Scoring Systems","archived":false,"fork":false,"pushed_at":"2025-03-20T10:54:40.000Z","size":2889,"stargazers_count":16,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:25:45.747Z","etag":null,"topics":["classifier","decision-making","decision-support-system","probabilistic-classifiers","scoring-system","sklearn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/TRR318.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":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-08T08:30:29.000Z","updated_at":"2025-04-09T10:26:18.000Z","dependencies_parsed_at":"2023-10-26T14:00:29.845Z","dependency_job_id":"4e012401-4fb4-4f63-ae23-2ff6f38a5b12","html_url":"https://github.com/TRR318/scikit-psl","commit_stats":{"total_commits":72,"total_committers":4,"mean_commits":18.0,"dds":0.5555555555555556,"last_synced_commit":"1b4470df15189872b1b2a89b0c31bf9be5cccb12"},"previous_names":["stheid/scikit-psl","stheid/sklearn-psl"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TRR318%2Fscikit-psl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TRR318%2Fscikit-psl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TRR318%2Fscikit-psl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TRR318%2Fscikit-psl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TRR318","download_url":"https://codeload.github.com/TRR318/scikit-psl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248614950,"owners_count":21133799,"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":["classifier","decision-making","decision-support-system","probabilistic-classifiers","scoring-system","sklearn"],"created_at":"2024-10-02T09:05:13.100Z","updated_at":"2025-04-13T21:35:50.448Z","avatar_url":"https://github.com/TRR318.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/trr318/scikit-psl)](https://github.com/trr318/scikit-psl/blob/master/LICENSE)\n[![Pip](https://img.shields.io/pypi/v/scikit-psl)](https://pypi.org/project/scikit-psl)\n[![Paper](https://img.shields.io/badge/doi-10.1007%2F978--3--031--45275--8__13-green)](https://doi.org/10.1007/978-3-031-45275-8_13)\n\n\n# Probabilistic Scoring Lists\n\nProbabilistic scoring lists are incremental models that evaluate one feature of the dataset at a time.\nPSLs can be seen as a extension to *scoring systems* in two ways:\n- they can be evaluated at any stage allowing to trade of model complexity and prediction speed.\n- they provide probablistic predictions instead of deterministic decisions for each possible score.\n\nScoring systems are used as decision support systems for human experts e.g. in medical or judical decision making.\n\nThis implementation adheres to the [sklearn-api](https://scikit-learn.org/stable/glossary.html#glossary-estimator-types).\n\n# Install\n```bash\npip install scikit-psl\n```\n\n# Usage\n\nFor examples have a look at the `examples` folder, but here is a simple example\n\n\n```python\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\n\nfrom skpsl import ProbabilisticScoringList\n\n# Generating synthetic data with continuous features and a binary target variable\nX, y = make_classification(n_informative=10, random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.2, random_state=42)\n\npsl = ProbabilisticScoringList({-1, 1, 2})\npsl.fit(X_train, y_train)\nprint(f\"Brier score: {psl.score(X_test, y_test, -1):.4f}\")\n\"\"\"\nBrier score: 0.2438  (lower is better)\n\"\"\"\n\ndf = psl.inspect(5)\nprint(df.to_string(index=False, na_rep=\"-\", justify=\"center\", float_format=lambda x: f\"{x:.2f}\"))\n\"\"\"\n Stage Threshold  Score  T = -2  T = -1  T = 0  T = 1  T = 2  T = 3  T = 4  T = 5\n  0            -     -       -       -   0.51      -      -      -      -      - \n  1     \u003e-2.4245  2.00       -       -   0.00      -   0.63      -      -      - \n  2     \u003e-0.9625 -1.00       -    0.00   0.00   0.48   1.00      -      -      - \n  3      \u003e0.4368 -1.00    0.00    0.00   0.12   0.79   1.00      -      -      - \n  4     \u003e-0.9133  1.00    0.00    0.00   0.12   0.12   0.93   1.00      -      - \n  5      \u003e2.4648  2.00    0.00    0.00   0.07   0.07   0.92   1.00   1.00   1.00 \n\"\"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrr318%2Fscikit-psl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrr318%2Fscikit-psl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrr318%2Fscikit-psl/lists"}