partition (version 0.1.0)

as_partition_step: Create a partition object from a data frame

Description

as_partition_step() creates a partition_step object. partition_steps are used while iterating through the partition algorithm: it stores necessary information about how to proceed in the partitioning, such as the information threshold. as_partition_step() is primarily called internally by partition() but can be helpful while developing partitioners.

Usage

as_partition_step(.x, threshold = NA, reduced_data = NA, target = NA,
  metric = NA, tolerance = 0.01, var_prefix = NA, partitioner = NA,
  ...)

Arguments

.x

a data.frame or partition_step object

threshold

The minimum information loss allowable

reduced_data

A data set with reduced variables

target

A character or integer vector: the variables to reduce

metric

A measure of information

tolerance

A tolerance around the threshold to accept a reduction

var_prefix

Variable name for reduced variables

partitioner

A partitioner, a part_*() function or one created with as_partitioner().

...

Other objects to store during the partition step

Value

a partition_step object

Examples

Run this code
# NOT RUN {
.df <- data.frame(x = rnorm(100), y = rnorm(100))
as_partition_step(.df, threshold = .6)
# }

Run the code above in your browser using DataLab