{"id":19446086,"url":"https://github.com/stitchfix/diamond","last_synced_at":"2025-06-26T20:10:45.293Z","repository":{"id":57466056,"uuid":"99610720","full_name":"stitchfix/diamond","owner":"stitchfix","description":"Python solver for mixed-effects models","archived":false,"fork":false,"pushed_at":"2025-06-03T22:29:34.000Z","size":24409,"stargazers_count":97,"open_issues_count":5,"forks_count":14,"subscribers_count":88,"default_branch":"master","last_synced_at":"2025-06-04T06:42:32.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stitchfix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-07T19:06:10.000Z","updated_at":"2025-06-03T22:29:32.000Z","dependencies_parsed_at":"2022-08-31T02:11:17.771Z","dependency_job_id":null,"html_url":"https://github.com/stitchfix/diamond","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stitchfix/diamond","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stitchfix%2Fdiamond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stitchfix%2Fdiamond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stitchfix%2Fdiamond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stitchfix%2Fdiamond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stitchfix","download_url":"https://codeload.github.com/stitchfix/diamond/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stitchfix%2Fdiamond/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262137149,"owners_count":23264675,"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":[],"created_at":"2024-11-10T16:12:50.604Z","updated_at":"2025-06-26T20:10:45.258Z","avatar_url":"https://github.com/stitchfix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diamond\n[![CircleCI](https://circleci.com/gh/stitchfix/diamond.svg?style=svg)](https://circleci.com/gh/stitchfix/diamond)\n\n### O Diamond, Diamond, thou little knowest the mischief thou hast done.\n\n![Damn You Diamond](diamond_fire.jpg?raw=true \"Damn You Diamond!\")\n\n[(Diamond was Newton's mischievous dog)](https://en.wikipedia.org/wiki/Diamond_(dog))\n\n\n## What is Diamond?\nDiamond utilizes iterative, quasi-Newton 2nd-order solvers for certain kinds of generalized linear  models (GLMs) with arbitrary but known L2-regularization. A common use is fitting mixed-effects models, with their covariance already being known by another means (e.g. lme4). These 2nd-order iterative solvers are considerably faster than a full-blown solution. \n\n## Limitations\n* The random-effects covariances must be input a-priori. Unlike [R's lme4](https://cran.r-project.org/web/packages/lme4/lme4.pdf) or [Julia's MixedModels](https://github.com/dmbates/MixedModels.jl), Diamond does not estimate the covariance of random effects terms. \n* Diamond only supports the following models\n\t* logistic regression\n\t* ordinal logistic regression using proportional odds, as defined in Section 7.2.1 of Categorical Data Analysis, 2nd Ed., by Alan Agresti\n* Currently, only formulae with crossed, independent random effects are supported. Using the mtcars dataset as an example, these look like `mpg ~ 1 + hp + (1 + hp | cyl) + (1 | gear)`. I.e. no hierarchical terms\n\n## Installation\nYou must have [docker](https://docs.docker.com/engine/installation/) installed. Then, run\n`docker run -ti --rm -p 8888:8888 tsweetser/diamond`\n\nCopy-paste the URL, including the token, into your browser. Then, check out the Jupyter notebook examples!\n\nYou can also install from PyPI via `pip install sf-diamond`\n\n## Troubleshooting installation\n* You may need to restart docker if you've been running jupyter notebooks locally on port 8888.\n\n## Documentation\nSee [documentation](http://stitchfix.github.io/diamond/) for more details on the details of Diamond and how to use it\n\n## Contributing to Diamond\n\nWe always welcome contributions. See [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Running Tests\nYou will need R to run the integration tests. From the root directory, run `pip install nose` then `nosetests`.\n\n## Development Status\nDiamond is an evolving project. Please file issues if you would like to use Diamond in new ways.\n\n## License\nSee [LICENSE.txt](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstitchfix%2Fdiamond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstitchfix%2Fdiamond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstitchfix%2Fdiamond/lists"}