{"id":32617773,"url":"https://github.com/hoxo-m/densratio_py","last_synced_at":"2025-10-30T17:10:39.203Z","repository":{"id":46702214,"uuid":"71884680","full_name":"hoxo-m/densratio_py","owner":"hoxo-m","description":"Python Package for Density Ratio Estimation","archived":false,"fork":false,"pushed_at":"2023-08-27T22:05:38.000Z","size":437,"stargazers_count":132,"open_issues_count":14,"forks_count":29,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-20T09:14:08.379Z","etag":null,"topics":["anomalydetection","density-ratio-estimation","machine-learning","machine-learning-algorithms","machine-learning-library"],"latest_commit_sha":null,"homepage":"https://github.com/hoxo-m/densratio_py","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/hoxo-m.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2016-10-25T10:11:56.000Z","updated_at":"2025-10-14T07:40:45.000Z","dependencies_parsed_at":"2022-08-26T07:11:05.751Z","dependency_job_id":"ea8cc99f-29c8-4732-8eaa-9b5ad9ae9160","html_url":"https://github.com/hoxo-m/densratio_py","commit_stats":{"total_commits":84,"total_committers":4,"mean_commits":21.0,"dds":"0.27380952380952384","last_synced_commit":"5757f365e0c68666c50e2d3f2dc46e72a0e85b2a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hoxo-m/densratio_py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoxo-m%2Fdensratio_py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoxo-m%2Fdensratio_py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoxo-m%2Fdensratio_py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoxo-m%2Fdensratio_py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoxo-m","download_url":"https://codeload.github.com/hoxo-m/densratio_py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoxo-m%2Fdensratio_py/sbom","scorecard":{"id":470002,"data":{"date":"2025-08-11","repo":{"name":"github.com/hoxo-m/densratio_py","commit":"5757f365e0c68666c50e2d3f2dc46e72a0e85b2a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":1,"reason":"Found 2/14 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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 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-19T13:38:33.366Z","repository_id":46702214,"created_at":"2025-08-19T13:38:33.366Z","updated_at":"2025-08-19T13:38:33.366Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281845531,"owners_count":26571722,"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-10-30T02:00:06.501Z","response_time":61,"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":["anomalydetection","density-ratio-estimation","machine-learning","machine-learning-algorithms","machine-learning-library"],"created_at":"2025-10-30T17:10:37.454Z","updated_at":"2025-10-30T17:10:39.198Z","avatar_url":"https://github.com/hoxo-m.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Python Package for Density Ratio Estimation\n================\nKoji Makiyama (@hoxo-m), Ameya Daigavane (@ameya98), and Krzysztof\nMierzejewski (@mierzejk)\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\u003c!-- badges: start --\u003e\n\n[![Build\nStatus](https://travis-ci.org/hoxo-m/densratio_py.svg?branch=master)](https://travis-ci.org/hoxo-m/densratio_py)\n[![PyPI](https://img.shields.io/pypi/v/densratio.svg)](https://pypi.python.org/pypi/densratio)\n[![PyPI](https://img.shields.io/pypi/dm/densratio.svg)](https://pypi.python.org/pypi/densratio)\n[![Coverage\nStatus](https://coveralls.io/repos/github/hoxo-m/densratio_py/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/densratio_py?branch=master)\n\u003c!-- badges: end --\u003e\n\n## 1. Overview\n\n**Density ratio estimation** is described as follows: for given two data\nsamples `x1` and `x2` from unknown distributions `p(x)` and `q(x)`\nrespectively, estimate `w(x) = p(x) / q(x)`, where `x1` and `x2` are\nd-dimensional real numbers.\n\nThe estimated density ratio function `w(x)` can be used in many\napplications such as the inlier-based outlier detection \\[1\\] and\ncovariate shift adaptation \\[2\\]. Other useful applications for density\nratio estimation were summarized by Sugiyama et al. (2012) in \\[3\\].\n\nThe package **densratio** provides a function `densratio()` that returns\nan object with a method to estimate density ratio as\n`compute_density_ratio()`.\n\nFurther, the alpha-relative density ratio\n`p(x)/(alpha * p(x) + (1 - alpha) * q(x))` (where alpha is in the range\n\\[0, 1\\]) can also be estimated. When alpha is 0, this reduces to the\nordinary density ratio `w(x)`. The alpha-relative PE-divergence and\nKL-divergence between `p(x)` and `q(x)` are also computed.\n\n![](README_files/figure-gfm/compare-true-estimate-1.png)\u003c!-- --\u003e\n\nFor example,\n\n``` python\nimport numpy as np\nfrom scipy.stats import norm\nfrom densratio import densratio\n\nnp.random.seed(1)\nx = norm.rvs(size=500, loc=0, scale=1./8)\ny = norm.rvs(size=500, loc=0, scale=1./2)\nalpha = 0.1\ndensratio_obj = densratio(x, y, alpha=alpha)\nprint(densratio_obj)\n```\n\ngives the following output:\n\n    #\u003e Method: RuLSIF\n    #\u003e \n    #\u003e Alpha: 0.1\n    #\u003e \n    #\u003e Kernel Information:\n    #\u003e   Kernel type: Gaussian\n    #\u003e   Number of kernels: 100\n    #\u003e   Bandwidth(sigma): 0.1\n    #\u003e   Centers: array([[-0.09591373],..\n    #\u003e \n    #\u003e Kernel Weights (theta):\n    #\u003e   array([0.04990797, 0.0550548 , 0.04784736, 0.04951904, 0.04840418,..\n    #\u003e \n    #\u003e Regularization Parameter (lambda): 0.1\n    #\u003e \n    #\u003e Alpha-Relative PE-Divergence: 0.618794133598705\n    #\u003e \n    #\u003e Alpha-Relative KL-Divergence: 0.7037648129307483\n    #\u003e \n    #\u003e Function to Estimate Density Ratio:\n    #\u003e   compute_density_ratio(x)\n    #\u003e \n\nIn this case, the true density ratio `w(x)` is known, so we can compare\n`w(x)` with the estimated density ratio `w-hat(x)`. The code below gives\nthe plot shown above.\n\n``` python\nfrom matplotlib import pyplot as plt\nfrom numpy import linspace\n\ndef true_alpha_density_ratio(sample):\n    return norm.pdf(sample, 0, 1./8) / (alpha * norm.pdf(sample, 0, 1./8) + (1 - alpha) * norm.pdf(sample, 0, 1./2))\n\ndef estimated_alpha_density_ratio(sample):\n    return densratio_obj.compute_density_ratio(sample)\n\nsample_points = np.linspace(-1, 3, 400)\nplt.plot(sample_points, true_alpha_density_ratio(sample_points), 'b-', label='True Alpha-Relative Density Ratio')\nplt.plot(sample_points, estimated_alpha_density_ratio(sample_points), 'r-', label='Estimated Alpha-Relative Density Ratio')\nplt.title(\"Alpha-Relative Density Ratio - Normal Random Variables (alpha={:03.2f})\".format(alpha))\nplt.legend()\nplt.show()\n```\n\n## 2. Installation\n\nYou can install the package from\n[PyPI](https://pypi.org/project/densratio/).\n\n``` :sh\n$ pip install densratio\n```\n\nAlso, you can install the package from\n[GitHub](https://github.com/hoxo-m/densratio_py).\n\n``` :sh\n$ pip install git+https://github.com/hoxo-m/densratio_py.git\n```\n\nThe source code for **densratio** package is available on GitHub at\n\u003chttps://github.com/hoxo-m/densratio_py\u003e.\n\n## 3. Details\n\n### 3.1. Basics\n\nThe package provides `densratio()`. The function returns an object that\nhas a function to compute estimated density ratio.\n\nFor data samples `x` and `y`,\n\n``` python\nfrom scipy.stats import norm\nfrom densratio import densratio\n\nx = norm.rvs(size = 200, loc = 1, scale = 1./8)\ny = norm.rvs(size = 200, loc = 1, scale = 1./2)\nresult = densratio(x, y)\n```\n\nIn this case, `result.compute_density_ratio()` can compute estimated\ndensity ratio.\n\n``` python\nfrom matplotlib import pyplot as plt\n\ndensity_ratio = result.compute_density_ratio(y)\n\nplt.plot(y, density_ratio, \"o\")\nplt.xlabel(\"x\")\nplt.ylabel(\"Density Ratio\")\nplt.show()\n```\n\n![](README_files/figure-gfm/plot-estimated-density-ratio-3.png)\u003c!-- --\u003e\n\n### 3.2. The Method\n\nThe package estimates density ratio by the RuLSIF method.\n\n**RuLSIF** (Relative unconstrained Least-Squares Importance Fitting)\nestimates the alpha-relative density ratio by minimizing the squared\nloss between the true and estimated alpha-relative ratios. You can find\nmore information in Hido et al. (2011) \\[1\\] and Liu et al (2013) \\[4\\].\n\nThe method assumes that the alpha-relative density ratio is represented\nby a linear kernel model:\n\n`w(x) = theta1 * K(x, c1) + theta2 * K(x, c2) + ... + thetab * K(x, cb)`\nwhere `K(x, c) = exp(- ||x - c||^2 / (2 * sigma ^ 2))` is the Gaussian\nRBF kernel.\n\n`densratio()` performs the following: - Decides kernel parameter `sigma`\nby cross-validation. - Optimizes for kernel weights `theta`. - Computes\nthe alpha-relative PE-divergence and KL-divergence from the learned\nalpha-relative ratio.\n\nAs the result, you can obtain `compute_density_ratio()`, which will\ncompute the alpha-relative density ratio at the passed coordinates.\n\n### 3.3. Result and Parameter Settings\n\n`densratio()` outputs the result like as follows:\n\n    #\u003e Method: RuLSIF\n    #\u003e \n    #\u003e Alpha: 0\n    #\u003e \n    #\u003e Kernel Information:\n    #\u003e   Kernel type: Gaussian\n    #\u003e   Number of kernels: 100\n    #\u003e   Bandwidth(sigma): 0.1\n    #\u003e   Centers: array([[0.92113356],..\n    #\u003e \n    #\u003e Kernel Weights (theta):\n    #\u003e   array([0.08848922, 0.03377533, 0.0753727 , 0.06141277, 0.02543963,..\n    #\u003e \n    #\u003e Regularization Parameter (lambda): 1.0\n    #\u003e \n    #\u003e Alpha-Relative PE-Divergence: 0.9635169300831041\n    #\u003e \n    #\u003e Alpha-Relative KL-Divergence: 0.838826626547327\n    #\u003e \n    #\u003e Function to Estimate Density Ratio:\n    #\u003e   compute_density_ratio(x)\n    #\u003e \n\n-   **Method** is fixed as RuLSIF.\n-   **Kernel type** is fixed as Gaussian RBF.\n-   **Number of kernels** is the number of kernels in the linear model.\n    You can change by setting `kernel_num` parameter. In default,\n    `kernel_num = 100`.\n-   **Bandwidth(sigma)** is the Gaussian kernel bandwidth. In default,\n    `sigma = \"auto\"`, the algorithm automatically select an optimal\n    value by cross validation. If you set `sigma` a number, that will be\n    used. If you set `sigma` a numeric array, the algorithm select an\n    optimal value in them by cross validation.\n-   **Centers** are centers of Gaussian kernels in the linear model.\n    These are selected at random from the data sample `x` underlying a\n    numerator distribution `p(x)`. You can find the whole values in\n    `result.kernel_info.centers`.\n-   **Kernel weights(theta)** are theta parameters in the linear kernel\n    model. You can find these values in `result.theta`.\n-   **The function to estimate the alpha-relative density ratio** is\n    named `compute_density_ratio()`.\n\n## 4. Multi Dimensional Data Samples\n\nSo far, we have deal with one-dimensional data samples `x` and `y`.\n`densratio()` allows to input multidimensional data samples as\n`numpy.ndarray` or `numpy.matrix`, as long as their dimensions are the\nsame.\n\nFor example,\n\n``` python\nfrom scipy.stats import multivariate_normal\nfrom densratio import densratio\n\nnp.random.seed(1)\nx = multivariate_normal.rvs(size=3000, mean=[1, 1], cov=[[1. / 8, 0], [0, 1. / 8]])\ny = multivariate_normal.rvs(size=3000, mean=[1, 1], cov=[[1. / 2, 0], [0, 1. / 2]])\nalpha = 0\ndensratio_obj = densratio(x, y, alpha=alpha, sigma_range=[0.1, 0.3, 0.5, 0.7, 1], lambda_range=[0.01, 0.02, 0.03, 0.04, 0.05])\nprint(densratio_obj)\n```\n\ngives the following output:\n\n    #\u003e Method: RuLSIF\n    #\u003e \n    #\u003e Alpha: 0\n    #\u003e \n    #\u003e Kernel Information:\n    #\u003e   Kernel type: Gaussian\n    #\u003e   Number of kernels: 100\n    #\u003e   Bandwidth(sigma): 0.3\n    #\u003e   Centers: array([[1.01477443, 1.38864061],..\n    #\u003e \n    #\u003e Kernel Weights (theta):\n    #\u003e   array([0.06151164, 0.08012094, 0.10467369, 0.13868176, 0.14917063,..\n    #\u003e \n    #\u003e Regularization Parameter (lambda): 0.04\n    #\u003e \n    #\u003e Alpha-Relative PE-Divergence: 0.653615870855595\n    #\u003e \n    #\u003e Alpha-Relative KL-Divergence: 0.6214285743087565\n    #\u003e \n    #\u003e Function to Estimate Density Ratio:\n    #\u003e   compute_density_ratio(x)\n    #\u003e \n\nIn this case, as well, we can compare the true density ratio with the\nestimated density ratio.\n\n``` python\nfrom matplotlib import pyplot as plt\nfrom numpy import linspace, dstack, meshgrid, concatenate\n\ndef true_alpha_density_ratio(x):\n    return multivariate_normal.pdf(x, [1., 1.], [[1. / 8, 0], [0, 1. / 8]]) / \\\n           (alpha * multivariate_normal.pdf(x, [1., 1.], [[1. / 8, 0], [0, 1. / 8]]) + (1 - alpha) * multivariate_normal.pdf(x, [1., 1.], [[1. / 2, 0], [0, 1. / 2]]))\n\ndef estimated_alpha_density_ratio(x):\n    return densratio_obj.compute_density_ratio(x)\n\nrange_ = np.linspace(0, 2, 200)\ngrid = np.concatenate(np.dstack(np.meshgrid(range_, range_)))\nlevels = [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4.5]\n\nplt.figure(figsize=(10, 4))\nplt.subplot(1, 2, 1)\nplt.contourf(range_, range_, true_alpha_density_ratio(grid).reshape(200, 200), levels)\n#\u003e \u003cmatplotlib.contour.QuadContourSet object at 0x0000022E950202E0\u003e\nplt.colorbar()\n#\u003e \u003cmatplotlib.colorbar.Colorbar object at 0x0000022E9500DA80\u003e\nplt.title(\"True Alpha-Relative Density Ratio\")\nplt.subplot(1, 2, 2)\nplt.contourf(range_, range_, estimated_alpha_density_ratio(grid).reshape(200, 200), levels)\n#\u003e \u003cmatplotlib.contour.QuadContourSet object at 0x0000022E942C8EE0\u003e\nplt.colorbar()\n#\u003e \u003cmatplotlib.colorbar.Colorbar object at 0x0000022E95095150\u003e\nplt.title(\"Estimated Alpha-Relative Density Ratio\")\nplt.show()\n```\n\n![](README_files/figure-gfm/compare-2d-5.png)\u003c!-- --\u003e\n\n## 5. References\n\n\\[1\\] Hido, S., Tsuboi, Y., Kashima, H., Sugiyama, M., \u0026 Kanamori, T.\n**Statistical outlier detection using direct density ratio estimation.**\nKnowledge and Information Systems 2011.\n\n\\[2\\] Sugiyama, M., Nakajima, S., Kashima, H., von Bünau, P. \u0026 Kawanabe,\nM. **Direct importance estimation with model selection and its\napplication to covariate shift adaptation.** NIPS 2007.\n\n\\[3\\] Sugiyama, M., Suzuki, T. \u0026 Kanamori, T. **Density Ratio Estimation\nin Machine Learning.** Cambridge University Press 2012.\n\n\\[4\\] Liu, S., Yamada, M., Collier, N., \u0026 Sugiyama, M. **Change-Point\nDetection in Time-Series Data by Relative Density-Ratio Estimation**\nNeural Networks, 2013.\n\n## 6. Related Work\n\n-   densratio for R \u003chttps://github.com/hoxo-m/densratio\u003e\n-   pykliep \u003chttps://github.com/srome/pykliep\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoxo-m%2Fdensratio_py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoxo-m%2Fdensratio_py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoxo-m%2Fdensratio_py/lists"}