The transformation_report() report the information of transform numerical variables for object inheriting from data.frame.

transformation_report(
  .data,
  target = NULL,
  output_format = c("pdf", "html"),
  output_file = NULL,
  output_dir = tempdir(),
  font_family = NULL,
  browse = TRUE
)

Arguments

.data

a data.frame or a tbl_df.

target

target variable. If the target variable is not specified, the method of using the target variable information is not performed when the missing value is imputed. and Optimal binning is not performed if the target variable is not a binary class.

output_format

report output type. Choose either "pdf" and "html". "pdf" create pdf file by knitr::knit(). "html" create html file by rmarkdown::render().

output_file

name of generated file. default is NULL.

output_dir

name of directory to generate report file. default is tempdir().

font_family

character. font family name for figure in pdf.

browse

logical. choose whether to output the report results to the browser.

Value

No return value. This function only generates a report.

Details

Generate transformation reports automatically. You can choose to output to pdf and html files. This is useful for Binning a data frame with a large number of variables than data with a small number of variables. For pdf output, Korean Gothic font must be installed in Korean operating system.

Reported information

The transformation process will report the following information:

  • Imputation

    • Missing Values

      • * Variable names including missing value

    • Outliers

      • * Variable names including outliers

  • Resolving Skewness

    • Skewed variables information

      • * Variable names with an absolute value of skewness greater than or equal to 0.5

  • Binning

    • Numerical Variables for Binning

    • Binning

      • Numeric variable names

    • Optimal Binning

      • Numeric variable names

See vignette("transformation") for an introduction to these concepts.

Examples

if (FALSE) {
# reporting the Binning information -------------------------
# create pdf file. file name is Transformation_Report.pdf & No target variable
transformation_report(heartfailure)

# create pdf file. file name is Transformation_Report.pdf
transformation_report(heartfailure, death_event)

# create pdf file. file name is Transformation_heartfailure.pdf
transformation_report(heartfailure, "death_event", 
                      output_file = "Transformation_heartfailure.pdf")

# create html file. file name is Transformation_Report.html
transformation_report(heartfailure, "death_event", output_format = "html")

# create html file. file name is Transformation_heartfailure.html
transformation_report(heartfailure, death_event, output_format = "html", 
                      output_file = "Transformation_heartfailure.html")
}