check_y_balance: Check whether the target column is unbalanced (for regression...

View source: R/check_data.R

check_y_balanceR Documentation

Check whether the target column is unbalanced (for regression it bins values via quantiles)

Description

Check whether the target column is unbalanced (for regression it bins values via quantiles)

Usage

check_y_balance(
  df,
  y = NULL,
  time = NULL,
  status = NULL,
  type = "auto",
  verbose = TRUE
)

Arguments

df

A data source, that is one of the major R formats: data.table, data.frame, matrix, and so on.

y

A string that indicates a target column name for regression or classification. Either y, or pair: time, status can be used. By default NULL.

time

A string that indicates a time column name for survival analysis task. Either y, or pair: time, status can be used. By default NULL.

status

A string that indicates a status column name for survival analysis task. Either y, or pair: time, status can be used. By default NULL.

type

A character, one of 'binary_clf'/'regression'/'survival'/'auto'/'multiclass' that sets the type of the task. If 'auto' (the default option) then the function will figure out 'type' based on the number of unique values in the 'y' variable, or the presence of time/status columns.

verbose

A logical value, if set to TRUE, provides all information about the process, if FALSE gives none.

Value

A list with every line of the sub-report.


ModelOriented/forester documentation built on June 6, 2024, 7:29 a.m.