Session Report - Feature Importance

knitr::opts_chunk$set(warning = FALSE, message = FALSE)
htmltools::img(
  src = "tRigon_logo.png",
  alt = "logo",
  style = "position:absolute; top:0px; right:135px; height: 80px"
)

params$session_info

features:

params$feature_vars

dependent variable:

params$dependent_var

groups / levels of dependent variable:

if (params$fi_method == "Classification") {
  print(params$groups)
  if (params$na_omit == TRUE) {
    print(paste0("Warning: dependent variable contains NAs. ", params$na_n, " values excluded."))
  }
} else if (params$fi_method == "Regression") {
  print(paste0("numeric variable for regression: ", params$dependent_var))
  if (params$na_omit == TRUE) {
    print(paste0("Warning: dependent variable contains NAs. ", params$na_n, " values excluded."))
  }
}

feature importance method:

if (params$fi_method == "Classification") { # classification
  if (params$fi_model == "recursive feature elimination") {
    print(paste0("recursive feature elimination (RFE) with ", params$folds_n, "-fold cross-validation and ", params$repeats_n, " repeats for classification of groups of the dependent variable. Data is distributed in a random 80/20 split for training and testing."))
  } else if (params$fi_model == "random forest") {
    print("random forest model for classification of the dependent variable.")
  }
} else if (params$fi_method == "Regression") { # Regression
  if (params$fi_model == "recursive feature elimination") {
    print(paste0("recursive feature elimination (RFE) with ", params$folds_n, "-fold cross-validation and ", params$repeats_n, " repeats for regression of the dependent variable. Data is distributed in a random 80/20 split for training and testing."))
  } else if (params$fi_model == "random forest") {
    print("random forest model for regression of the dependent variable.")
  }
}

feature imbalance:

if (params$warning_data) {
  print(paste0("Warning: input vectors of unequal length - only complete rows can be analysed for feature importance. ", params$warning_data_n, " rows with missing data excluded."))
} else {
  print("no imbalance in feature vector data reported.")
}

feature importance output:

params$fi_output

feature importance plot:

plot(params$fi_plot)


Try the tRigon package in your browser

Any scripts or data that you put into this service are public.

tRigon documentation built on Sept. 11, 2024, 5:17 p.m.