R/tabu_search.R
partial_pb_exact.RdFinds the grouped balance with maximum variance among all assignments whose
number of active groups is between min_parts and max_parts.
partial_pb_exact(
X,
lI = NULL,
min_parts = 2,
max_parts = NULL,
method = "restricted"
)A numeric matrix with strictly positive finite entries. Rows are observations and columns are compositional parts.
A list defining a partition of a subset of the columns of
X. If NULL, each column of X is used as a singleton
group.
Integer. Minimum number of active groups.
Integer or NULL. Maximum number of active groups.
If NULL, all groups may be active.
Exhaustive search method. Currently only "restricted"
is implemented; it enumerates only supports whose sizes are inside the
requested range and assigns signs in binary Gray-code order.
A list with the following elements:
dimDimension of the grouped problem, equal to
length(lI) - 1.
lIThe input grouping structure.
varianceVariance criterion of the best grouped balance.
balance_rawInteger vector in \(\{-1,0,1\}\) describing the best grouped split.
balanceThe corresponding one-column balance basis.
min_partsMinimum number of active groups.
max_partsMaximum number of active groups.
The search enumerates only supports whose size is between
min_parts and max_parts. For each support, signs are generated
in binary Gray-code order, fixing the first active group on the left side to
avoid evaluating both a balance and its sign reversal.