nb_updated_grid_cat: Function: Grid search to estimate predicted values and...

Description Usage Arguments Value

View source: R/functions.R

Description

Function: Grid search to estimate predicted values and estimate the values of h

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
nb_updated_grid_cat(
  scores,
  s_mat_hat_train,
  classes,
  cat_covariates_train,
  cat_covariates_test,
  prior_g,
  scores_test,
  s_mat_hat_test,
  alpha_js = NA,
  min.h = 0.4,
  max.h = 1.6,
  CV = 5,
  n_grid = 5,
  return_h = F,
  return_prob = F,
  P_max = 3,
  static_train = NA,
  static_test = NA
)

Arguments

scores

N x K matrix of 1st level scores in the training set

s_mat_hat_train

Matrix of estimated S data for training

classes

Group labels vector of length N

cat_covariates_train

dataframe of categorical variables in the training set

cat_covariates_test

dataframe of categorical variables in the testing set

prior_g

vector of prior probability of being in each group, sums up to 1

scores_test

N_test x K matrix of scores in the testing set

s_mat_hat_test

Matrix of estimated S data for testing

alpha_js

Estimated probability of latent states across the realizations

min.h

min possible value for the multiplier

max.h

maximum possible value for the multiplier

CV

Number of folds for cross validation

n_grid

number of values between min.h and max.h to search over

return_h

T/F to return the value of the multiplier

return_prob

T/F to return group Bayes classifier probability for each individual in testing set

P_max

number of lags in the gAR model

static_train

Covariates for the classifier in the training set accounts

static_test

Covariates for the classifier in the testing set accounts

Value

predictions from the grid search


acweisha/gFPCAClassif documentation built on Dec. 18, 2021, 10:23 p.m.