README.md

mlokFunctions

A useful way to accelerate the process for exploratory analysis, data cleansing, and performance analysis.

mlokFunctions was created with intentions to accelerate common calculations made for predictive modeling performance, as well as for cleansing data (for a variety of purposes).

Functions

mlokCorMat

Creates a correlation matrix visualization for all numeric variables in a matrix or dataframe. Example

Name <- c('Otis', 'Michael', 'Sharon', 'Robin' )
Height <- c(207, 178, 164, 180)
Weight <- c(250, 156, 132, 149)
Profile <- data.frame(Name, Height, Weight)

mlokCorMat(Profile)

mlokNumericize

Parses strings and converts into numeric data type. Useful when cleansing standardized fields that are manually inputted (eg. salaries/wages, zipcodes) Example

## vector with nonstandard "salary" field. Be wary of the output and how to interpret it, though.
salaries <- c('$45,000','5,000 per month','$95,438/yr')
str(salaries)
mlokNumericize(salaries)
str(salaries)

mlokNormalize

Takes a list or vector and applies min/max normalization.

mlokPerform

With inputs of two vectors or lists, the actual classifications and predicted classifications, mlokPerform will allow you to calculate the confusion matrix, accuracy, RMSE, MAE, and sensitivity/specificity.



michael-lok/mlokFunctions documentation built on April 8, 2020, 9:34 p.m.