Learn R Programming

SBCK (version 1.0.0)

SchaakeShuffleRef: ShaakeShuffleRef class

Description

Match the rank structure of X with them of Y by reordering X.

Arguments

Super class

SBCK::SchaakeShuffle -> SchaakeShuffleRef

Public fields

ref

[integer] Reference

Methods


Method new()

Create a new ShaakeShuffleRef object.

Usage

SchaakeShuffleRef$new(ref, Y0 = NULL)

Arguments

ref

[integer] Reference

Y0

[vector] The reference vector

Returns

A new `ShaaleShuffleRef` object.


Method fit()

Fit the model

Usage

SchaakeShuffleRef$fit(Y0)

Arguments

Y0

[vector] The reference vector

Returns

NULL


Method predict()

Fit the model

Usage

SchaakeShuffleRef$predict(X0)

Arguments

X0

[vector] The vector to apply shuffle

Returns

Z0 [vector] data shuffled


Method clone()

The objects of this class are cloneable with this method.

Usage

SchaakeShuffleRef$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Fix one features to keep the structure of X.

Examples

Run this code
X0 = matrix( stats::runif(20) , ncol = 2 )
Y0 = matrix( stats::runif(20) , ncol = 2 )
ss = SchaakeShuffleRef$new( ref = 1 )
ss$fit(Y0)
Z0 = ss$predict(X0)

Run the code above in your browser using DataLab