data_split: Data split

View source: R/deepSelection.r

data_splitR Documentation

Data split

Description

Split data into two pieces, usually train and test pieces.

Usage

data_split(.data, ...)

## Default S3 method:
data_split(
  .data,
  test_size = 0.25,
  train_size = 0.75,
  random_state = NULL,
  shuffle = TRUE,
  axis = 1
)

## S3 method for class 'array'
data_split(
  .data,
  test_size = 0.25,
  train_size = 0.75,
  random_state = NULL,
  shuffle = TRUE,
  axis = 1
)

## S3 method for class 'data.frame'
data_split(
  .data,
  test_size = 0.25,
  train_size = 0.75,
  random_state = NULL,
  shuffle = TRUE
)

## S3 method for class 'factor'
data_split(
  .data,
  test_size = 0.25,
  train_size = 0.75,
  random_state = NULL,
  shuffle = TRUE
)

Arguments

.data

Data to be split.

test_size

An integer or float value between 0.0 and 1.0 representing the absolute number of test samples (integer) or the proportion of the data to include in the test split (float). If NULL (default), the value is set to the complement of the train size. If train_size is also NULL, it will be set to 0.25.

train_size

An integer or float value between 0.0 and 1.0 representing the absolute number of train samples (integer) or the proportion of the data to include in the train split (float). If NULL (default), the value is set to the complement of the test size.

random_state

Controls the shuffling applied to the data before applying the split. Pass an int for reproducible output across multiple function calls.

shuffle

Whether or not to shuffle the data before splitting.

axis

The axis along to split. Default is the first axis.

Value

List containing data pieces.


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.