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

View source: R/observations.R

observation_imputeR Documentation

Generate permutations of training data using test observations

Description

Generate permutations of training data using test observations

Usage

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 May 4, 2023, 5:10 p.m.