Added tests for learn_partition_modified

This commit is contained in:
Waldir Leoncio 2019-12-16 16:56:41 +01:00
parent b5d99903d2
commit c630537516
2 changed files with 21 additions and 4 deletions

View file

@ -8,10 +8,9 @@
#' further combined.
learn_partition_modified <- function(ordered) {
part <- learn_simple_partition(ordered, 0.05)
# TODO: find learn_simple_partition
nclust <- length(unique(part))
if (nclust == 3) {
mini_1 <- min(ordered(which(part == 1))) # ASK: what is ordered()?
mini_1 <- min(ordered(which(part == 1)))
mini_2 <- min(ordered(which(part == 2)))
mini_3 <- min(ordered(which(part == 3)))
if (mini_1 > 0.9 & mini_2 > 0.9) {