nb_updated_grid_scores_cat_only: 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
nb_updated_grid_scores_cat_only(
  scores,
  cat_covariates_train,
  classes,
  prior_g,
  scores_test,
  cat_covariates_test,
  min.h = 0.01,
  max.h = 1.5,
  CV = 10,
  n_grid = 10,
  return_h = F,
  return_prob = F
)

Arguments

scores

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

cat_covariates_train

Covariates used in the classifier for the training set accounts

classes

Group labels vector of length N

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

cat_covariates_test

Covariates used in the classifier for the testing set accounts

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

Value

predictions from the grid search


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