Skip to content

Commit

Permalink
add exploreAOA function (#3)
Browse files Browse the repository at this point in the history
* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation
  • Loading branch information
fab-scm authored Oct 4, 2023
1 parent 663ffdd commit 5a08a9e
Show file tree
Hide file tree
Showing 2 changed files with 518 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/aoa.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ aoa <- function(newdata,
# if not provided, compute train DI
if(!inherits(trainDI, "trainDI")) {
message("No trainDI provided. Computing DI of training data...")
if(calc_LPD == TRUE) {
message("Computing LPD of training data...")
}
trainDI <- trainDI(model, train, variables, weight, CVtest, CVtrain, method, useWeight, LPD, maxLPD)
}

Expand Down Expand Up @@ -317,6 +320,8 @@ aoa <- function(newdata,
}

if (calc_LPD == TRUE) {
message("Computing LPD of newdata...")

knndist <- matrix(NA, nrow(newdata), maxLPD)
knndist[okrows,] <- .knndistfun(newdataCC, train_scaled, method, S_inv, maxLPD = maxLPD)

Expand Down
Loading

0 comments on commit 5a08a9e

Please sign in to comment.