observation_impute: Generate permutations of training data using test...

Description Usage Arguments Value Author(s)

View source: R/observations.R

Description

Generate permutations of training data using test observations

Usage

1
2
3
4
5
6
7
8
observation_impute(
  W_kernel,
  S,
  x_train,
  x_test,
  w_threshold = 0.7,
  n_samples = 1000
)

Arguments

W_kernel

Numeric matrix. Contains all nonscaled weights between training and test observations for all feature combinations. The dimension equals n_train x m.

S

Integer matrix of dimension n_combinations x m, where n_combinations and m equals the total number of sampled/non-sampled feature combinations and the total number of unique features, respectively. Note that m = ncol(x_train).

x_train

Numeric matrix

x_test

Numeric matrix

w_threshold

Numeric vector of length 1, where w_threshold > 0 and w_threshold <= 1. If w_threshold = .8 we will choose the K samples with the largest weight so that the sum of the weights accounts for 80% of the total weight.

Value

data.table

Author(s)

Nikolai Sellereite


shapr documentation built on Jan. 28, 2021, 5:06 p.m.