Fixed calculation og ninds (#24)
This commit is contained in:
parent
5c35b9ad1e
commit
6c3e2aff04
1 changed files with 1 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ greedyMix <- function(
|
||||||
}
|
}
|
||||||
|
|
||||||
# Comparing partitions =======================================================
|
# Comparing partitions =======================================================
|
||||||
|
ninds <- length(unique(c[["data"]][, ncol(c[["data"]])]))
|
||||||
if (!is.null(partitionCompare)) {
|
if (!is.null(partitionCompare)) {
|
||||||
logmls <- comparePartitions(
|
logmls <- comparePartitions(
|
||||||
c[["data"]], nrow(c[["data"]]), partitionCompare[["partitions"]], ninds,
|
c[["data"]], nrow(c[["data"]]), partitionCompare[["partitions"]], ninds,
|
||||||
|
|
@ -61,7 +62,6 @@ greedyMix <- function(
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generating partition summary ===============================================
|
# Generating partition summary ===============================================
|
||||||
ninds <- length(unique(data$data[, ncol(data$data)]))
|
|
||||||
ekat <- seq(1L, ninds * c[["rowsFromInd"]], c[["rowsFromInd"]])
|
ekat <- seq(1L, ninds * c[["rowsFromInd"]], c[["rowsFromInd"]])
|
||||||
c[["rows"]] <- cbind(ekat, ekat + c[["rowsFromInd"]] - 1L)
|
c[["rows"]] <- cbind(ekat, ekat + c[["rowsFromInd"]] - 1L)
|
||||||
logml_npops_partitionSummary <- indMixWrapper(c, npops, counts, sumcounts, max_iter, fixedK, verbose)
|
logml_npops_partitionSummary <- indMixWrapper(c, npops, counts, sumcounts, max_iter, fixedK, verbose)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue