.. index:: pair: class; gpr::policy::TrainingPolicy .. _doxid-classgpr_1_1policy_1_1_training_policy: class gpr::policy::TrainingPolicy ================================= .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class TrainingPolicy { public: // construction virtual :target:`~TrainingPolicy`(); // methods virtual bool :ref:`should_call_oracle`(const :ref:`SearchState`& state) const; virtual std::vector :ref:`select_training_points`(const std::vector<:ref:`CandidatePoint`>& candidates, const std::vector& current_set) const; virtual bool :ref:`should_retrain_hyperparameters`(const :ref:`SearchState`& state) const; virtual bool :ref:`should_rebuild_factor`(const :ref:`SearchState`& state) const; virtual std::vector :ref:`retain_training_rows`(const std::vector& rows) const; }; .. _details-classgpr_1_1policy_1_1_training_policy: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; should_call_oracle .. _doxid-classgpr_1_1policy_1_1_training_policy_1a032459376e5be1966e879ab07097a258: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool should_call_oracle(const :ref:`SearchState`& state) const True asks the engine to make the call it was about to make. .. index:: pair: function; select_training_points .. _doxid-classgpr_1_1policy_1_1_training_policy_1ac5b037349eb6632cf9d1b8be77b8c39b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual std::vector select_training_points(const std::vector<:ref:`CandidatePoint`>& candidates, const std::vector& current_set) const Indices of ``candidates`` to append, in ascending order. The default keeps every candidate. .. index:: pair: function; should_retrain_hyperparameters .. _doxid-classgpr_1_1policy_1_1_training_policy_1a39c7056f9bca6d400aae30ba1da8252b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool should_retrain_hyperparameters(const :ref:`SearchState`& state) const True runs hyperparameter optimisation. False keeps the current hyperparameters and still updates the factor. .. index:: pair: function; should_rebuild_factor .. _doxid-classgpr_1_1policy_1_1_training_policy_1acf87e9ed9996bb0af817453182f71991: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool should_rebuild_factor(const :ref:`SearchState`& state) const Consulted when hyperparameters are not refit. True rebuilds the factor. False appends when the stored factor is a prefix of the new rows, and rebuilds when it is not. .. index:: pair: function; retain_training_rows .. _doxid-classgpr_1_1policy_1_1_training_policy_1a66838fae3749af74a614d00e452a7685: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual std::vector retain_training_rows(const std::vector& rows) const Indices of ``rows`` to keep after admission, in ascending order. The default keeps every row. A list that is not 0..n-1 replaces the stored rows.