Learn R Programming

CVXR (version 1.9.1)

geo_mean: (Weighted) geometric mean of a vector

Description

(Weighted) geometric mean of a vector

Usage

geo_mean(x, p = NULL, max_denom = 1024L, approx = TRUE)

Value

A GeoMean or GeoMeanApprox atom

Arguments

x

An Expression (vector)

p

Numeric weight vector (default: uniform)

max_denom

Maximum denominator for rational approximation

approx

If TRUE (default), use SOC approximation. If FALSE, use exact power cone.