Gradient Descent
NonArchimedeanMachineLearning.gradient_descent — Method
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 structureparam::ValuationPolydisc{S,T,N}: Current parameter valuesnext_branch::Int: Index of the next branch to descend in strict modesettings::Tuple{Bool,Int}:(strict, degree)wherestrictenables single-coordinate descent
Returns
Tuple{ValuationPolydisc{S,T,N}, Int, Bool}: New parameters, next branch index, and convergence status
NonArchimedeanMachineLearning.gradient_descent_init — Method
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 valuesloss::Loss: The loss function structurenext_branch::Int: Starting branch index for strict modesettings::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.
NonArchimedeanMachineLearning.gradient_param — Method
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 functionval::ValuationPolydisc: Data variable valuesv::ValuationTangent: Tangent vector in parameter space
Returns
Gradient vector with respect to parameters
NonArchimedeanMachineLearning.gradient_param — Method
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 modelval::ValuationPolydisc{S,T,N1}: Data variable valuesv::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.