Skip to content

Commit

Permalink
Update AddTruthTableStr.R with LROC support
Browse files Browse the repository at this point in the history
- Add support for generating a truth table for LROC type in  AddTruthTableStr function
- Replicates the ROC truth table approach for now
  • Loading branch information
pwep authored Jul 26, 2024
1 parent d39efee commit 070f036
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/AddTruthTableStr.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ AddTruthTableStr <- function(dataset, type, perCase) {
truthTableStr <- array(dim = c(I, J, K, 2))
truthTableStr[1:I, 1:J, 1:K1, 1] <- 1
truthTableStr[1:I, 1:J, (K1+1):K, 2] <- 1
} else stop("data type must be ROC or FROC")
} else if (type == "LROC") {
# added truthTableStr 7/26/2024
truthTableStr <- array(dim = c(I, J, K, 2))
truthTableStr[1:I, 1:J, 1:K1, 1] <- 1
truthTableStr[1:I, 1:J, (K1+1):K, 2] <- 1
} else stop("data type must be ROC or FROC or LROC")

return(truthTableStr)
}
}

0 comments on commit 070f036

Please sign in to comment.