Gradient Descent

NonArchimedeanMachineLearning.gradient_descentMethod
gradient_descent(loss::Loss, param::ValuationPolydisc{S,T,N}, next_branch::Int, settings::Tuple{Bool,Int}) where {S,T,N}

Perform one step of gradient descent optimization.

Computes children of the current parameter point and selects the child that maximizes the gradient norm (steepest descent direction).

Arguments

  • loss::Loss: The loss function structure
  • param::ValuationPolydisc{S,T,N}: Current parameter values
  • next_branch::Int: Index of the next branch to descend in strict mode
  • settings::Tuple{Bool,Int}: (strict, degree) where strict enables single-coordinate descent

Returns

Tuple{ValuationPolydisc{S,T,N}, Int, Bool}: New parameters, next branch index, and convergence status

source
NonArchimedeanMachineLearning.gradient_descent_initMethod
gradient_descent_init(param::ValuationPolydisc{S,T,N}, loss::Loss, next_branch::Int, settings::Tuple{Bool,Int}) where {S,T,N}

Initialize an optimization setup for gradient descent.

Arguments

  • param::ValuationPolydisc{S,T,N}: Initial parameter values
  • loss::Loss: The loss function structure
  • next_branch::Int: Starting branch index for strict mode
  • settings::Tuple{Bool,Int}: (strict, degree) controlling descent behavior

Returns

OptimSetup: Configured optimization setup for gradient descent

Notes

The next_branch state is used only when strict mode is enabled.

source
NonArchimedeanMachineLearning.gradient_paramMethod
gradient_param(m::AbstractModel, fun_eval::PolydiscFunctionEvaluator, val::ValuationPolydisc, v::ValuationTangent)

Compute the gradient of a model with respect to its parameters using a typed evaluator.

Arguments

  • m::AbstractModel: The abstract model (used for dimension info)
  • fun_eval::PolydiscFunctionEvaluator: Typed evaluator for the model function
  • val::ValuationPolydisc: Data variable values
  • v::ValuationTangent: Tangent vector in parameter space

Returns

Gradient vector with respect to parameters

source
NonArchimedeanMachineLearning.gradient_paramMethod
gradient_param(m::AbstractModel{S}, val::ValuationPolydisc{S,T,N1}, v::ValuationTangent{S,T,N2}) where {S,T,N1,N2}

Compute the gradient of a model with respect to its parameters using the symbolic path.

Arguments

  • m::AbstractModel{S}: The abstract model
  • val::ValuationPolydisc{S,T,N1}: Data variable values
  • v::ValuationTangent{S,T,N2}: Tangent vector in parameter space

Returns

Gradient vector with respect to parameters

Notes

Currently assumes parameters are the last variables. More general shapes may be needed.

source