https://github.com/scottroot/shannon-entropy
R script to calculate entropy and info gain
https://github.com/scottroot/shannon-entropy
Last synced: 9 months ago
JSON representation
R script to calculate entropy and info gain
- Host: GitHub
- URL: https://github.com/scottroot/shannon-entropy
- Owner: scottroot
- Created: 2020-03-23T17:20:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T16:07:05.000Z (about 6 years ago)
- Last Synced: 2025-09-13T00:08:56.034Z (9 months ago)
- Language: R
- Size: 47.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shannon-Entropy
R script to calculate entropy and info gain
Uses the standard Shannon Entropy formula.

Allows you to specify which variable in a dataset is to be the parent node, and then calculates the entropy of all other variables WRT that parent node.
## Installation
* library(devtools)
* devtools::install_github('scottroot/shannon-entropy')
## Usage
* library(shannon-entropy)
* ig(root, df, ignore)
## Arguments
* **root** The parent root variable.
* **df** Your dataset or dataframe.
* **ignore** The variables or columns in your dataset that you don't want to include
## Output
A dataframe with all the variables' entropy and information gain.