Evaluate_Predictor: Evaluate_Predictor

Description Usage Arguments Details Value See Also Examples

View source: R/Evaluate_Predictor.R

Description

The algorithm updates the prediction model according to the current database and then does a n-fold cross validation with the same settings.

Usage

1
Evaluate_Predictor(db, nFold = 5)

Arguments

db

chr the database used / file name and path of database

nFold

int (=5) for n-fold cross validation

Details

  1. Hyperparameters for the predictor are read from the storage table (Params). Then, Update_Predictor is run with these parameters.

  2. Table transactions is read according to hyperparameters and INNER JOINed with accounts.

  3. Table personalAccounts is read and INNER JOINed with accounts.

  4. A FeatureExtraction is done with the tables.

  5. A CV (cross validation) is done to calculate an error estimate.

  6. sda::sda.ranking is run if there are more features than the maximum number of features specified in the Hyperparameters. This is a ranking based on correlation-adjusted t scores. With this ranking features are selected during the Training of the predictor.

  7. Table Storage is updated with the resulting Err and Ranking.

If there are to few transactions used for training (per corss validation round), the predcitor might not work. It depends on how well the different types (labels) are represented, but as a rule of thumb there should be a minimum of 20 transactions. So, with a 5-fold cross validation that is at least 100 transactions.

Value

TRUE if sucessful, otherwise a chr message where the algorithm stopped.

See Also

Other procedures: Duplicated.Transactions, Duplicated, Enter.Transactions, Enter, Predict.Transactions, Predict, Read.Transactions, Read_csv, Read, Update_Predictor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
db <- "test.db"
Create_testDB(db)

params <- list(
  nFeats = 200, 
  DDL = FALSE, 
  time = list(start = as.Date("2010-1-1"), end = as.Date("2011-1-1"))
)
InsertBLOB("Params", params, db)
Evaluate_Predictor(db)
err <- SelectBLOB("Err", db)
ranks <- SelectBLOB("Ranking", db)

mRcSchwering/abacus documentation built on May 21, 2019, 9:18 a.m.