#include <gpr/potentials/ActiveGP.h>
Public Types | |
| enum class | AcquireReason { Variance , Certify , Batch , Reject } |
| Fired when a point is delegated, before the oracle runs. More... | |
| using | OracleFn |
| using | AcquireHook = std::function<void(AcquireReason)> |
| using | ModelUpdateHook = std::function<void(std::uint64_t epoch)> |
| Fired after an incorporation changed the surface. | |
| using | Config = ActiveGPConfig |
Public Member Functions | |
| ActiveGP (std::shared_ptr< gpr::neb::ActiveLearningSession > session, OracleFn oracle, Config config=Config()) | |
| std::uint64_t | modelState () const noexcept |
| long | trainingSize () const noexcept |
| Training rows currently held. | |
| long | oracleCalls () const noexcept |
| Oracle calls made through this surrogate. | |
| void | setAcquireHook (AcquireHook hook) |
| void | setModelUpdateHook (ModelUpdateHook hook) |
| int | force (long n_atoms, const double *positions, const int *atomic_nrs, double *forces, double *energy, double *variance, const double *box) |
| int | forceBatch (long n_systems, long n_atoms, const double *positions, const int *atomic_nrs, double *forces, double *energies, double *variances, const double *boxes) |
| void | incorporate () |
| Host-requested incorporation boundary (the ABI hint channel). | |
Definition at line 55 of file ActiveGP.h.
| using pot::ActiveGP::AcquireHook = std::function<void(AcquireReason)> |
Definition at line 65 of file ActiveGP.h.
| using pot::ActiveGP::Config = ActiveGPConfig |
Definition at line 69 of file ActiveGP.h.
| using pot::ActiveGP::ModelUpdateHook = std::function<void(std::uint64_t epoch)> |
Fired after an incorporation changed the surface.
Definition at line 67 of file ActiveGP.h.
| using pot::ActiveGP::OracleFn |
Ground truth. Returns 0 on success, positive recoverable, negative fatal, matching the engine ABI convention.
Definition at line 59 of file ActiveGP.h.
|
strong |
Fired when a point is delegated, before the oracle runs.
| Enumerator | |
|---|---|
| Variance | |
| Certify | |
| Batch | |
| Reject | |
Definition at line 64 of file ActiveGP.h.
| pot::ActiveGP::ActiveGP | ( | std::shared_ptr< gpr::neb::ActiveLearningSession > | session, |
| OracleFn | oracle, | ||
| Config | config = Config() ) |
Definition at line 13 of file ActiveGP.cpp.
| int pot::ActiveGP::force | ( | long | n_atoms, |
| const double * | positions, | ||
| const int * | atomic_nrs, | ||
| double * | forces, | ||
| double * | energy, | ||
| double * | variance, | ||
| const double * | box ) |
LOTF force. Returns 0 on success; a nonzero oracle return is propagated unchanged.
Definition at line 107 of file ActiveGP.cpp.
| int pot::ActiveGP::forceBatch | ( | long | n_systems, |
| long | n_atoms, | ||
| const double * | positions, | ||
| const int * | atomic_nrs, | ||
| double * | forces, | ||
| double * | energies, | ||
| double * | variances, | ||
| const double * | boxes ) |
Batched channel and incorporation boundary. Every system is predicted; the least resolved one above the gate is delegated to the oracle and learned, which is OIE-class argmax-variance acquisition from inside a passive potential. Systems share one composition.
Definition at line 181 of file ActiveGP.cpp.
| void pot::ActiveGP::incorporate | ( | ) |
Host-requested incorporation boundary (the ABI hint channel).
Definition at line 94 of file ActiveGP.cpp.
|
nodiscardnoexcept |
Monotone surface epoch: changes only when an incorporation changes the posterior. Host caches key on this.
Definition at line 22 of file ActiveGP.cpp.
|
inlinenodiscardnoexcept |
Oracle calls made through this surrogate.
Definition at line 82 of file ActiveGP.h.
|
inline |
Definition at line 87 of file ActiveGP.h.
|
inline |
Definition at line 91 of file ActiveGP.h.
|
nodiscardnoexcept |
Training rows currently held.
Definition at line 27 of file ActiveGP.cpp.