Update_Predictor: Update_Predictor

Description Usage Arguments Details Value See Also Examples

View source: R/Update_Predictor.R

Description

The algorithm updates the prediction model according to the current database.

Usage

1

Arguments

db

chr the database used / file name and path of database

Details

  1. Hyperparameters for the predictor are read from the storage table (Params). They contain the maximum number of features to use (nFeats), whether to only do a diagonal discriminant analysis (DDL), and a time intervall defining start and end date of transactions to be included in the training data.

  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 Training is done with the resulting analytics base table.

  6. Table Storage is updated with the resulting Model and FeatureList.

If there are to few transactions used for training, 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.

Value

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

See Also

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

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)
Update_Predictor(db)
feats <- SelectBLOB("FeatureList", db)
model <- SelectBLOB("Model", db)

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