var_rank_info: Importance variable ranking based on information theory

Description Usage Arguments Value Examples

View source: R/information_theory.R

Description

Retrieves a data frame containing several metrics related to information theory. Metrics are: entropy (en), mutual information (mi), information gain (ig) and gain ratio (gr).

Usage

1

Arguments

data

input data frame, all the variables will be evaluated against the variable defined in 'target' parameter

target

string variable name containing the output variable.

Value

data frame ordered by gain ratio metric

Examples

1
2
3
4
## Not run: 
var_rank_info(data_golf, "play_golf")

## End(Not run)

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

sh: 1: cannot create /dev/null: Permission denied
funModeling v.1.7 :)
Examples and tutorials at livebook.datascienceheroes.com

          var    en    mi         ig         gr
1     outlook 2.271 0.247 0.24674982 0.15642756
2    humidity 1.788 0.152 0.15183550 0.15183550
3       windy 1.877 0.048 0.04812703 0.04884862
4 temperature 2.468 0.029 0.02922257 0.01877265

funModeling documentation built on July 1, 2020, 5:40 p.m.