.. index:: pair: class; gpr::ScaleFreeTrustRegion .. _doxid-classgpr_1_1_scale_free_trust_region: class gpr::ScaleFreeTrustRegion =============================== .. toctree:: :hidden: Overview ~~~~~~~~ Self-tuning scale-free trust region (state = the current radius). :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ScaleFreeTrustRegion { public: // construction :target:`ScaleFreeTrustRegion`(); :target:`ScaleFreeTrustRegion`(const :ref:`ScaleFreeTrustConfig`& cfg); // methods void :ref:`initFromTrainingSpread`(double median_pairwise_spread); void :ref:`raiseCeiling`(double ceiling); double :target:`radius`() const; double :target:`spread`() const; double :target:`tau`() const; const :ref:`ScaleFreeTrustConfig`& :target:`config`() const; double :ref:`updateRadiusFromRho`(double actual_change, double predicted_change); double :ref:`updateRadiusFromRhoValue`(double rho); bool :ref:`stepWithinVarianceFloor`(double predicted_sigma, double max_grad_component) const; }; .. _details-classgpr_1_1_scale_free_trust_region: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Self-tuning scale-free trust region (state = the current radius). Methods ------- .. index:: pair: function; initFromTrainingSpread .. _doxid-classgpr_1_1_scale_free_trust_region_1ac7c03fa4801a6a9d51a5a92f61c63492: .. ref-code-block:: cpp :class: doxyrest-title-code-block void initFromTrainingSpread(double median_pairwise_spread) Anchor the radius to tau \* spread, clamped to [floor, ceiling]. .. index:: pair: function; raiseCeiling .. _doxid-classgpr_1_1_scale_free_trust_region_1a19823145ccecd310c598ccf018ab4c7e: .. ref-code-block:: cpp :class: doxyrest-title-code-block void raiseCeiling(double ceiling) Raise the ceiling. A later spread initialization can then reach it. .. index:: pair: function; updateRadiusFromRho .. _doxid-classgpr_1_1_scale_free_trust_region_1a5d1dc2fef3d99a732adf5d4f5db4954f: .. ref-code-block:: cpp :class: doxyrest-title-code-block double updateRadiusFromRho(double actual_change, double predicted_change) TREGO rho = actual_change / predicted_change. Predicted changes of magnitude <= floor are untrustworthy (rho := 0 -> shrink). Returns the updated radius. .. index:: pair: function; updateRadiusFromRhoValue .. _doxid-classgpr_1_1_scale_free_trust_region_1a02131448e792cf9aa4094f3738cb2bcf: .. ref-code-block:: cpp :class: doxyrest-title-code-block double updateRadiusFromRhoValue(double rho) Direct form: update from a precomputed rho. Deterministic: rho > rho_grow -> radius \*= grow_factor (clamped to ceiling) rho < rho_shrink -> radius \*= shrink_factor (clamped to floor) otherwise -> unchanged .. index:: pair: function; stepWithinVarianceFloor .. _doxid-classgpr_1_1_scale_free_trust_region_1a4dd148bd2c759d2b691e3d991afa1939: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool stepWithinVarianceFloor(double predicted_sigma, double max_grad_component) const Restricted-variance floor. True (acceptable, still calibrated) iff predicted_sigma <= kappa \* max_grad_component.