R/reducers.R
reduce_first_component.Rd
Reducers are functions that tell the partition algorithm how
to reduce the data. as_reducer()
is a helper function to create new
reducers to be used in partitioner
s. partitioner
s can be created with
as_partitioner()
.
reduce_first_component()
returns the first component from the
principal components analysis of the target variables. Because the PCA
calculates the components and the variance explained at the same time, if
the metric is measure_variance_explained()
, that function will store the
first component for use in reduce_first_component()
to avoid
recalculation. If the partitioner uses a different metric, the first
component will be calculated by reduce_first_component()
.
reduce_first_component(.partition_step)
a partition_step
object
Other reducers:
as_reducer()
,
reduce_kmeans()
,
reduce_scaled_mean()