.. index:: pair: struct; gpr::neb::ActiveLearningSession::ImageModel .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model: struct gpr::neb::ActiveLearningSession::ImageModel ================================================== .. toctree:: :hidden: Overview ~~~~~~~~ Per-image local model slot. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct ImageModel { // methods void :target:`setGP`(std::unique_ptr<:ref:`gpr::GaussianProcessRegression`> next_gp); :ref:`gpr::GaussianProcessRegression`* :target:`gp`(); const :ref:`gpr::GaussianProcessRegression`* :target:`gp`() const; const :ref:`gpr::Observation`& :target:`observations`() const; void :target:`updateConfiguration`(const :ref:`gpr::AtomsConfiguration`& configuration); void :target:`setInternalCoordinateChart`(std::shared_ptr`> chart, double length_scale); void :target:`clearInternalCoordinateChart`(); const std::shared_ptr`>& :target:`internalCoordinateChart`() const; double :target:`internalCoordinateLengthScale`() const; void :target:`setGeodesicReferencePath`(:ref:`gpr::Coord` reference_path); void :target:`clearGeodesicReferencePath`(); bool :target:`hasGeodesicReferencePath`() const; const :ref:`gpr::Coord`& :target:`geodesicReferencePath`() const; std::uint64_t :ref:`observationRevision`() const; std::uint64_t :ref:`surrogateRevision`() const; std::uint64_t :target:`synchronizeSurrogateRevision`(const Eigen::VectorXd& theta_global, double likelihood_noise_floor_sigma2, const :ref:`SharedParameterState`& shared_state = {}) const; const std::vector& :ref:`selectedIndices`() const; const std::vector& :ref:`directIndices`() const; bool :target:`hasEnoughRows`(int n_min) const; int :target:`directObservationCount`() const; bool :ref:`hasEnoughDirectRows`(int n_min) const; void :target:`appendObservation`(const Eigen::VectorXd& positions, double energy, const Eigen::VectorXd& gradient, int global_row_index); void :ref:`refreshSelectedObservation`(int global_row, const :ref:`gpr::Observation`& global); void :ref:`compactAfterRowRemoval`(int removed_row); void :ref:`remapGlobalRows`(const std::vector& old_to_new, const :ref:`gpr::Observation`& global); int :ref:`pruneAdaptiveAtPoint`(const Eigen::VectorXd& band_point); void :target:`replaceNeighborhood`(:ref:`gpr::Observation` observations, std::vector selected_indices, std::vector archived_keys = {}); const std::vector& :ref:`archivedKeys`() const; bool :target:`materializedFor`(const Eigen::VectorXd& theta_global, double likelihood_noise_floor_sigma2, const :ref:`SharedParameterState`& shared_state = {}) const; void :target:`recordMaterialized`(const Eigen::VectorXd& theta_global, double likelihood_noise_floor_sigma2, const :ref:`SharedParameterState`& shared_state = {}); }; .. _details-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Per-image local model slot. The slot owns both its observations and the factor materialization state, so every mutation invalidates through the same object that hands out model leases. Methods ------- .. index:: pair: function; observationRevision .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a6a0a23db79391f3d3ddbfe5ff70c70ab: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::uint64_t observationRevision() const Monotonic version of the local conditioning data. It advances only when the observations available to this image change, so callers can distinguish a genuinely refreshed local model from unrelated growth of the global training set. .. index:: pair: function; surrogateRevision .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a56a3eeb1bf443a21a0b392690bc56443: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::uint64_t surrogateRevision() const Monotonic version of every input that defines this image's GP. Local observations, inherited global hyperparameters, and the live likelihood-noise floor all affect predictions consumed by MMF, even when the local row set itself is unchanged. .. index:: pair: function; selectedIndices .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a63e0f418fe6ae27be28405e938a7e484: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::vector& selectedIndices() const Rows of the global ~training_obs~ currently selected into ~observations~ the EMD k-nearest neighbourhood of this image's position. Ascending-sorted so a caller can compare it against a freshly computed selection to decide whether the neighbourhood membership turned over. .. index:: pair: function; directIndices .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1af297e52ea34cda34fb45b37557b3940c: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::vector& directIndices() const Global ~training_obs~ rows this image was oracled at directly its own search / climb trajectory. Append-only; unlike ~selected_indices\_~ it survives ~replaceNeighborhood~ so the trajectory-aware neighbourhood union can always re-include it. .. index:: pair: function; hasEnoughDirectRows .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a153ad00480adba583cf9a2855ce0dec5: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool hasEnoughDirectRows(int n_min) const Number of distinct direct-image rows retained after position deduplication. Repeated oracle calls at the same geometry do not make the local GP eligible because they do not add independent conditioning information. .. index:: pair: function; refreshSelectedObservation .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1adb48987e97aa36b86151d7d0987d9df0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void refreshSelectedObservation(int global_row, const :ref:`gpr::Observation`& global) A selected global row retains its identity when repeated oracle draws update its targets. Invalidate this image's posterior only when the selected observation changes. .. index:: pair: function; compactAfterRowRemoval .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1add4ba4c70c764f335d99aab3e0d7223f: .. ref-code-block:: cpp :class: doxyrest-title-code-block void compactAfterRowRemoval(int removed_row) A global training row was removed: drop references to it and shift every index above it down by one, in the same order the removals happened. Removing a selected row changes the local conditioning data; shifting unrelated global indices does not. .. index:: pair: function; remapGlobalRows .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a0304241a92bb55df9cf5a0ac2197c80e: .. ref-code-block:: cpp :class: doxyrest-title-code-block void remapGlobalRows(const std::vector& old_to_new, const :ref:`gpr::Observation`& global) Rewrite global-row indices after a policy prune. ~old_to_new~ maps a previous training row to its row in ~global~, or -1 when that row was dropped. The local observations and, when this image already has a posterior, its factor follow the new order. .. index:: pair: function; pruneAdaptiveAtPoint .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a20dd211fa331a38b7bbce66cab695e37: .. ref-code-block:: cpp :class: doxyrest-title-code-block int pruneAdaptiveAtPoint(const Eigen::VectorXd& band_point) Per-image adaptive pruning at this image's own band point. After the global-to-single handover each image GP conditions on its own selected rows, so the influence question is local: can this row move THIS image's posterior energy by one likelihood sigma. One removal per event, the same exactness argument as the session-level pruner. The removal is local only the global training row survives so selected/direct index maps drop the entry without shifting, and the handover eligibility counter is untouched: pruning an information-free row must not retract a model that already earned activation. .. index:: pair: function; archivedKeys .. _doxid-structgpr_1_1neb_1_1_active_learning_session_1_1_image_model_1a57f86f2110158827d255fb9cd9eb5b9b: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::vector& archivedKeys() const Archive-pool row indices folded into the neighborhood beyond the active training rows (empty without an archive).