{"id":16735113,"url":"https://github.com/mamba413/fastmit","last_synced_at":"2025-03-15T20:45:09.421Z","repository":{"id":103329222,"uuid":"225857834","full_name":"Mamba413/fastmit","owner":"Mamba413","description":"Fast Mutual Information Based Independence Test","archived":false,"fork":false,"pushed_at":"2019-12-31T04:01:23.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T09:52:22.494Z","etag":null,"topics":["independence-test","metric-spaces","multivariate-testing","mutual-information"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/Mamba413.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"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":"2019-12-04T12:05:41.000Z","updated_at":"2023-08-10T06:48:37.000Z","dependencies_parsed_at":"2023-06-02T12:16:23.331Z","dependency_job_id":null,"html_url":"https://github.com/Mamba413/fastmit","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"40b15f9e7e7103bfbdbc52a2393835f28da1249d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mamba413%2Ffastmit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mamba413%2Ffastmit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mamba413%2Ffastmit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mamba413%2Ffastmit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mamba413","download_url":"https://codeload.github.com/Mamba413/fastmit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790944,"owners_count":20348378,"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":["independence-test","metric-spaces","multivariate-testing","mutual-information"],"created_at":"2024-10-13T00:04:59.179Z","updated_at":"2025-03-15T20:45:09.339Z","avatar_url":"https://github.com/Mamba413.png","language":"C++","readme":"\n# Fast Mutual Information based independence Test (fastmit)\n\n### Introduction\nThe fundamental problem for data mining and statistical analysis is:\n\n- Whether two random variables are dependent?\n\n**fastmit** package provides solutions for this issue. It implements the kNN method described by Kraskov, et. al (2004) to estimate the empirical mutual information and furthermore uses permutation test to detect whether two random variables are independent. The core functions in **fastmit** package are **mi** and **mi.test**.\n\nThese functions based on mutual information have two main advantages:\n\n- It's applicable to complex data in metric spaces.\n\n- It is faster than other statistics (e.g., distance covariance and ball covariance), which makes it advantageous in large sample situations.\n\n## Installation\n#### CRAN version\nYou can install the released version of fastmit from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"fastmit\")\n```\n\n#### Github version\nYou can install the released version of fastmit from GitHub with:\n\n``` r\nlibrary(devtools)\ninstall_github(\"Mamba413/fastmit\")\n```\n*Windows* user will need to install [Rtools](https://cran.r-project.org/bin/windows/Rtools/) first.    \n\n\n\n## Example\n- **mi** function\n``` r\n## simulate data\nset.seed(1)\nx \u003c- rnorm(100)\ny \u003c- x + rnorm(100)\n## estimate the empirical mutual information\nmi(x, y)\n```\nIn this example, the result is:\n```\n# [1] 0.3320034\n```\n\n- **mi.test** function\n\n``` r\n## simulate data\nset.seed(1)\nerror \u003c- runif(50, min = -0.3, max = 0.3)\nx \u003c- runif(50, 0, 4*pi)\ny \u003c- cos(x) + error\n\n## perform independence test via mutual information\nmi.test(x, y)\n```\nIn this example, the result is:\n```\n\tMutual Information test of independence\n\ndata:  x and y\nnumber of observations = 50\nreplicates = 99\np-value = 0.01\nalternative hypothesis: random variables are dependent\nsample estimates:\n       MI \n0.6953105 \n```\n\nIf you find any bugs, or if you experience any crashes, please report to us. Also, if you have any questions, feel free to ask.\n\n### License\nGPL-3\n\n### Reference\n- Alexander Kraskov; Harald Stögbauer; Peter Grassberger\nPhys. [Estimating Mutual Information](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.69.066138) Rev. E 69, 066138\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamba413%2Ffastmit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamba413%2Ffastmit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamba413%2Ffastmit/lists"}