{"id":15634501,"url":"https://github.com/craigacp/mitoolbox","last_synced_at":"2025-10-06T16:06:47.249Z","repository":{"id":54914846,"uuid":"2088193","full_name":"Craigacp/MIToolbox","owner":"Craigacp","description":"Mutual Information functions for C and MATLAB","archived":false,"fork":false,"pushed_at":"2018-04-22T14:54:51.000Z","size":151,"stargazers_count":142,"open_issues_count":4,"forks_count":60,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-15T01:41:09.217Z","etag":null,"topics":["c","entropy","matlab","mutual-information"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Craigacp.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}},"created_at":"2011-07-22T11:01:31.000Z","updated_at":"2025-03-31T14:56:45.000Z","dependencies_parsed_at":"2022-08-14T06:30:59.724Z","dependency_job_id":null,"html_url":"https://github.com/Craigacp/MIToolbox","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Craigacp/MIToolbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Craigacp%2FMIToolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Craigacp%2FMIToolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Craigacp%2FMIToolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Craigacp%2FMIToolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Craigacp","download_url":"https://codeload.github.com/Craigacp/MIToolbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Craigacp%2FMIToolbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271306829,"owners_count":24736770,"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-08-20T02:00:09.606Z","response_time":69,"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":["c","entropy","matlab","mutual-information"],"created_at":"2024-10-03T10:53:49.815Z","updated_at":"2025-10-06T16:06:47.193Z","avatar_url":"https://github.com/Craigacp.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"MIToolbox\n=========\nv3.0.1 for C/C++ and MATLAB/Octave\n\nMIToolbox contains a set of functions to calculate information theoretic\nquantities from data, such as the entropy and mutual information.  The toolbox\ncontains implementations of the most popular Shannon entropies, and also the\nlesser known Renyi entropy. The toolbox also provides implementations of \nthe weighted entropy and weighted mutual information from \"Information Theory\nwith Application\", S. Guiasu (1977). The toolbox only supports discrete distributions,\nas opposed to continuous. All real-valued numbers will be processed by x = floor(x).\n\nThese functions are targeted for use with feature selection algorithms rather \nthan communication channels and so expect all the data to be available before \nexecution and sample their own probability distributions from the data.\n\nAll functions expect the inputs to be vectors or matrices of doubles.\n\nFunctions contained:\n - Entropy\n - Conditional Entropy\n - Mutual Information\n - Conditional Mutual Information\n - generating a joint variable\n - generating a probability distribution from a discrete random variable\n - Renyi's Entropy\n - Renyi's Mutual Information\n - Weighted Entropy\n - Weighted Mutual Information\n - Weighted Conditional Mutual Information\n\nNote: all functions are calculated in log base 2, so return units of \"bits\".\n\nMIToolbox works on discrete inputs, and all continuous values **must** be\ndiscretised before use with MIToolbox. Real-valued inputs will be discretised\nwith x = floor(x) to ensure compatibility. MIToolbox produces unreliable\nresults when used with continuous inputs, runs slowly and uses much more memory\nthan usual. The discrete inputs should have small cardinality, MIToolbox will\ntreat values {1,10,100} the same way it treats {1,2,3} and the latter will be\nboth faster and use less memory. This limitation is due to the difficulties in\nestimating information theoretic functions of continuous variables.\n\n======\n\nExamples:\n\n```\n\u003e\u003e y = [1 1 1 0 0]';\n\u003e\u003e x = [1 0 1 1 0]';\n```\n```\n\u003e\u003e mi(x,y)       %% mutual information I(X;Y)\nans =\n    0.0200\n```\n```\n\u003e\u003e h(x)          %% entropy H(X)\nans =\n    0.9710\n```\n```\n\u003e\u003e condh(x,y)    %% conditional entropy H(X|Y)\nans =\n    0.9510\n```\n```\n\u003e\u003e h( [x,y] )    %% joint entropy H(X,Y)\nans =\n    1.9219\n```\n```\n\u003e\u003e joint([x,y])  %% joint random variable XY\nans =\n     1\n     2\n     1\n     3\n     4\n```\n======\n\nAll code is licensed under the 3-clause BSD license.\n\nCompilation instructions:\n - MATLAB/OCTAVE \n    - run `CompileMIToolbox.m` from the `matlab` directory.\n - Linux C shared library \n    - run `make x86` or `make x64` for 32-bit or 64-bit versions respectively.\n    - run `sudo make install` to install MIToolbox into `/usr/local/lib` and `/usr/local/include`\n - Windows C dll\n\t- install MinGW from https://sourceforge.net/projects/mingw-w64/\n\t- add MinGW binaries folders to PATH, e.g. `mingw/bin`, `mingw/msys/bin`\n\t- run `make x64_win` to compile a 64-bit Windows dll.\n\nUpdate History\n - 08/02/2017 - v3.0.1 - Bug fix to ensure ANSI C compatibility.\n - 07/01/2017 - v3.0.0 - Refactored internals to expose integer information theoretic calculations.\n - 10/01/2016 - v2.1.2 - Relicense from LGPL to BSD. Added checks to ensure input MATLAB types are doubles.\n - 02/02/2015 - v2.1.1 - Fixed up the Makefile so it installs the headers too.\n - 22/02/2014 - v2.1  - Fixed a couple of bugs related to memory handling.\n                     Added a make install for compatibility with PyFeast.\n - 30/07/2011 - v2.00 - Added implementations of the weighted entropy and weighted\n                     mutual information. More cleanup of Mex entry point\n                     to further check the inputs.\n - 08/11/2011 - v1.03 - Minor documentation changes to accompany the JMLR publication.\n - 15/10/2010 - v1.02 - Fixed bug where MIToolbox would cause a segmentation fault\n                     if a x by 0 empty matrix was passed in. Now prints an \n                     error message and returns gracefully.\n - 02/09/2010 - v1.01 - Fixed a bug in CMIM.m where the last feature would not be \n                     selected first if it had the highest MI.\n - 07/07/2010 - v1.00 - Initial Release.\n                    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigacp%2Fmitoolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigacp%2Fmitoolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigacp%2Fmitoolbox/lists"}