{"id":15288162,"url":"https://github.com/cblearn/cblearn","last_synced_at":"2025-07-27T07:39:41.172Z","repository":{"id":40259515,"uuid":"287242362","full_name":"cblearn/cblearn","owner":"cblearn","description":"Comparison-based Machine Learning in Python","archived":false,"fork":false,"pushed_at":"2024-06-16T18:43:36.000Z","size":2532,"stargazers_count":18,"open_issues_count":15,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T11:42:09.211Z","etag":null,"topics":["embedding","machine-learning","machinelearning","multidimensional","multidimensional-scaling","non-metric","ordinal","scaling","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Python","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/cblearn.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":"2020-08-13T09:54:22.000Z","updated_at":"2024-06-18T10:24:01.000Z","dependencies_parsed_at":"2023-09-28T11:05:11.820Z","dependency_job_id":"90dd6745-7f5e-4265-8958-68f16115df01","html_url":"https://github.com/cblearn/cblearn","commit_stats":null,"previous_names":["dekuenstle/cblearn"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblearn%2Fcblearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblearn%2Fcblearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblearn%2Fcblearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblearn%2Fcblearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cblearn","download_url":"https://codeload.github.com/cblearn/cblearn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248411473,"owners_count":21098927,"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":["embedding","machine-learning","machinelearning","multidimensional","multidimensional-scaling","non-metric","ordinal","scaling","scikit-learn"],"created_at":"2024-09-30T15:44:30.396Z","updated_at":"2025-04-13T06:27:43.689Z","avatar_url":"https://github.com/cblearn.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/cblearn/cblearn/main/docs/logo-light.png\" width=\"300\"\u003e\n\u003c/h1\u003e\u003cbr\u003e\n\n## Comparison-based Machine Learning in Python\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.06139/status.svg)](https://doi.org/10.21105/joss.06139)\n[![PyPI version](https://img.shields.io/pypi/v/cblearn.svg)](https://pypi.python.org/pypi/cblearn)\n[![Documentation](https://readthedocs.org/projects/cblearn/badge/?version=stable)](https://cblearn.readthedocs.io/en/stable/?badge=stable)\n[![Test status](https://github.com/cblearn/cblearn/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/cblearn/cblearn/actions/workflows/test.yml)\n[![Test Coverage](https://codecov.io/gh/cblearn/cblearn/branch/master/graph/badge.svg?token=P9JRT6OK6O)](https://codecov.io/gh/cblearn/cblearn)\n\nComparison-based learning methods are machine learning algorithms using similarity comparisons (\"A and B are more similar than C and D\") instead of featurized data. \n\n\n```python\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import cross_val_score\n\nfrom cblearn.datasets import make_random_triplets\nfrom cblearn.embedding import SOE\n\nX = load_iris().data\ntriplets = make_random_triplets(X, result_format=\"list-order\", size=2000)\n\nestimator = SOE(n_components=2)\n# Measure the fit with scikit-learn's cross-validation\nscores = cross_val_score(estimator, triplets, cv=5)\nprint(f\"The 5-fold CV triplet error is {sum(scores) / len(scores)}.\")\n\n# Estimate the scale on all triplets\nembedding = estimator.fit_transform(triplets)\nprint(f\"The embedding has shape {embedding.shape}.\")\n```\n\n## Getting Started\n\n* [Installation \u0026 Quickstart](https://cblearn.readthedocs.io/en/stable/getting_started/index.html)\n* [Examples](https://cblearn.readthedocs.io/en/stable/generated_examples/index.html).\n* [User Guide](https://cblearn.readthedocs.io/en/stable/user_guide/index.html).\n\n\n## Contribute\n\nWe are happy about your bug reports, questions or suggestions as Github Issues and code or documentation contributions as Github Pull Requests. \nPlease see our [Contributor Guide](https://cblearn.readthedocs.io/en/stable/contributor_guide/index.html). \n\n## Related packages\n\nThere are more Python packages for comparison-based learning:\n\n- [metric-learn](http://contrib.scikit-learn.org/metric-learn) is a collection of algorithms for metric learning. The *weakly supervised* algorithms learn from triplets and quadruplets.\n- [salmon](https://docs.stsievert.com/salmon/) is a package for efficiently collecting triplets in crowd-sourced experiments. The package implements ordinal embedding algorithms and sampling strategies to query the most informative comparisons actively.\n\n## Authors and Acknowledgement\n*cblearn* was initiated by current and former members of the [Theory of Machine Learning group](http://www.tml.cs.uni-tuebingen.de/index.php) of Prof. Dr. Ulrike von Luxburg at the University of Tübingen.\nThe leading developer is [David-Elias Künstle](http://www.tml.cs.uni-tuebingen.de/team/kuenstle/index.php).\n\nWe want to thank all the contributors here on GitHub.\nThis work has been supported by the Machine Learning Cluster of Excellence, funded by EXC number 2064/1 – Project number 390727645. The authors would like to thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting David-Elias Künstle. \n\n## License\n\nThis library is free to use, share, and adapt under the [MIT License](https://github.com/cblearn/cblearn/blob/master/LICENSE) conditions.\n\n## Citation\n\nPlease cite our [JOSS paper](https://joss.theoj.org/papers/10.21105/joss.06139#) if you publish work using `cblearn`:\n\n**Künstle et al., (2024). cblearn: Comparison-based Machine Learning in Python. Journal of Open Source Software, 9(98), 6139, https://doi.org/10.21105/joss.06139**\n\n```\n@article{Künstle2024, \n    doi = {10.21105/joss.06139}, \n    url = {https://doi.org/10.21105/joss.06139}, \n    year = {2024}, \n    publisher = {The Open Journal}, \n    volume = {9}, number = {98}, pages = {6139}, \n    author = {David-Elias Künstle and Ulrike von Luxburg}, \n    title = {cblearn: Comparison-based Machine Learning in Python}, \n    journal = {Journal of Open Source Software} \n} \n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcblearn%2Fcblearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcblearn%2Fcblearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcblearn%2Fcblearn/lists"}