indicator_opt_both_ways: Helper Function to Optimize Indicator Matrix with Best Sum

View source: R/multiscaleSVDxpts.R

indicator_opt_both_waysR Documentation

Helper Function to Optimize Indicator Matrix with Best Sum

Description

This function runs the optimization on both the input matrix 'm' and its negative counterpart 'm * (-1)', returning the result that maximizes the sum 'sum(m * I)'.

Usage

indicator_opt_both_ways(m, verbose = FALSE)

Arguments

m

A numeric matrix for which the optimization will be performed.

verbose

Logical. If TRUE, reports the objective value and convergence progress at each iteration.

Value

m*I

Examples

set.seed(123)
m <- matrix(rnorm(500), nrow = 5)
indicator_opt_both_ways(m)

stnava/ANTsR documentation built on April 13, 2025, 4:10 a.m.