{"id":24238571,"url":"https://github.com/argmaxml/recsplain","last_synced_at":"2025-09-23T07:31:49.982Z","repository":{"id":37408341,"uuid":"471295302","full_name":"argmaxml/recsplain","owner":"argmaxml","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-24T14:57:55.000Z","size":5385,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T23:53:12.571Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/argmaxml.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}},"created_at":"2022-03-18T08:48:08.000Z","updated_at":"2023-04-26T08:28:14.000Z","dependencies_parsed_at":"2023-01-20T21:19:17.734Z","dependency_job_id":null,"html_url":"https://github.com/argmaxml/recsplain","commit_stats":null,"previous_names":["argmaxml/matcha"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/argmaxml/recsplain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxml%2Frecsplain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxml%2Frecsplain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxml%2Frecsplain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxml%2Frecsplain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/argmaxml","download_url":"https://codeload.github.com/argmaxml/recsplain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxml%2Frecsplain/sbom","scorecard":{"id":206313,"data":{"date":"2025-08-11","repo":{"name":"github.com/argmaxml/recsplain","commit":"e97b83956f2fb3630fb4e26efc864e5fd37c7d57"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/20 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/actions.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/actions.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/argmaxml/recsplain/actions.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/actions.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/argmaxml/recsplain/actions.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/actions.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/actions.yml:23","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T23:52:35.507Z","repository_id":37408341,"created_at":"2025-08-16T23:52:35.507Z","updated_at":"2025-08-16T23:52:35.507Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276537896,"owners_count":25659929,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-01-14T20:28:37.888Z","updated_at":"2025-09-23T07:31:49.973Z","avatar_url":"https://github.com/argmaxml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recsplain = Explainable Recommendation Service\n## Installation\nThe Recsplain package is available via [PyPi](https://pypi.org/project/recsplain/), just \n\n    pip install recsplain\n    \nAnd you're ready to go\n\n## Creating a Schema\n\nFirst, we'll need to specify the column definition of each item property, this description is called a schema.\nA schema specifies the list of features, their encoding (embedding, one-hot, ordinal, numeric, hierarchical, etc) and their weight.\n\nA field can be either a *filter field*, used for exact matches only, or an *encoder field* for fuzzy matching.\n\nFor example, assume we run a grocery chain with 2 branches - one in the US and one in Eurpoe. we do not want to recommend European items to American customers and vice versa.\n\nOn the other hand, we might want to match \"low price\" items in the similar products page of a \"mid price\" item, if all of the other properties are similar.\n\nThis schema demonstrates these constraints:\n\n```\n  {\n      \"filters\": [\n          {\"field\": \"country\", \"values\": [\"US\", \"EU\"]}\n      ],\n      \"encoders\": [\n          {\"field\": \"price\", \"values\":[\"low\", \"mid\", \"high\"], \"type\": \"oridnal\", \"weight\":1},\n          {\"field\": \"category\", \"values\":[\"dairy\",\"meat\"], \"type\": \"onehot\", \"weight\":2}\n      ],\n      \"metric\": \"l2\"\n  }\n```\n  \n \n## Query a recommendation\n\n```\n  import recsplain as rx\n\n  item_query_data = {\n    \"k\": 2,\n    \"data\": {\n      \"price\": \"low\",\n      \"category\": \"meat\",\n      \"country\": \"US\"\n    },\n    \"explain\": true\n  }\n\n  rx.query(item_query_data)\n``` \n \nThe response is a list of items, with component-wise distance - to explain how what the similarity was calculates\n\n```\n  {\n    \"status\": \"OK\",\n    \"ids\": [\"1\", \"2\"],\n    \"distances\": [0, 2],\n    \"explanation\": [\n      {\n        \"price\": 0,\n        \"category\": 0\n      },\n      {\n        \"price\": 2,\n        \"category\": 0\n      }\n    ]\n  }\n```\n\n## Interested in learning more ?\nSee our [Getting Started Guide](https://recsplain.readthedocs.io/en/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaxml%2Frecsplain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargmaxml%2Frecsplain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaxml%2Frecsplain/lists"}