pub struct LearningStore { /* private fields */ }Expand description
学習データの永続化マネージャ(Facade)
内部で FileSystemStorage を使用。高レベル API を提供。
Implementations§
Source§impl LearningStore
impl LearningStore
Sourcepub fn default_path() -> PathBuf
pub fn default_path() -> PathBuf
デフォルトのパスで作成
Sourcepub fn storage(&self) -> &FileSystemStorage
pub fn storage(&self) -> &FileSystemStorage
内部ストレージへの参照を取得
Sourcepub fn load_global(&self) -> Result<LearningSnapshot>
pub fn load_global(&self) -> Result<LearningSnapshot>
グローバル統計をロード
Sourcepub fn save_global(&self, snapshot: &LearningSnapshot) -> Result<()>
pub fn save_global(&self, snapshot: &LearningSnapshot) -> Result<()>
グローバル統計を保存
Sourcepub fn load_scenario(&self, scenario: &str) -> Result<LearningSnapshot>
pub fn load_scenario(&self, scenario: &str) -> Result<LearningSnapshot>
シナリオ別統計をロード
Sourcepub fn save_scenario(
&self,
scenario: &str,
snapshot: &LearningSnapshot,
) -> Result<()>
pub fn save_scenario( &self, scenario: &str, snapshot: &LearningSnapshot, ) -> Result<()>
シナリオ別統計を保存
Sourcepub fn save_session(
&self,
scenario: &str,
snapshot: &LearningSnapshot,
) -> Result<SessionId>
pub fn save_session( &self, scenario: &str, snapshot: &LearningSnapshot, ) -> Result<SessionId>
セッション統計を保存(自動マージ)
Sourcepub fn load_session(
&self,
scenario: &str,
session_id: &SessionId,
) -> Result<LearningSnapshot>
pub fn load_session( &self, scenario: &str, session_id: &SessionId, ) -> Result<LearningSnapshot>
特定セッションの統計をロード
Sourcepub fn query_range(
&self,
scenario: &str,
from: Timestamp,
to: Timestamp,
) -> Result<Vec<LearningSnapshot>>
pub fn query_range( &self, scenario: &str, from: Timestamp, to: Timestamp, ) -> Result<Vec<LearningSnapshot>>
時間範囲でセッションを取得
Sourcepub fn query_latest(
&self,
scenario: &str,
limit: usize,
) -> Result<Vec<LearningSnapshot>>
pub fn query_latest( &self, scenario: &str, limit: usize, ) -> Result<Vec<LearningSnapshot>>
最新 N 件のセッションを取得
Sourcepub fn merge(
&self,
snapshots: &[LearningSnapshot],
strategy: MergeStrategy,
) -> LearningSnapshot
pub fn merge( &self, snapshots: &[LearningSnapshot], strategy: MergeStrategy, ) -> LearningSnapshot
複数のスナップショットをマージ
Sourcepub fn load_offline_model(&self, scenario: &str) -> Result<OfflineModel>
pub fn load_offline_model(&self, scenario: &str) -> Result<OfflineModel>
Offline Model をロード
Sourcepub fn save_offline_model(
&self,
scenario: &str,
model: &OfflineModel,
) -> Result<()>
pub fn save_offline_model( &self, scenario: &str, model: &OfflineModel, ) -> Result<()>
Offline Model を保存
Sourcepub fn run_offline_learning(
&self,
scenario: &str,
session_limit: usize,
) -> Result<OfflineModel>
pub fn run_offline_learning( &self, scenario: &str, session_limit: usize, ) -> Result<OfflineModel>
Offline 学習を実行
Trait Implementations§
Source§impl Clone for LearningStore
impl Clone for LearningStore
Source§fn clone(&self) -> LearningStore
fn clone(&self) -> LearningStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LearningStore
impl RefUnwindSafe for LearningStore
impl Send for LearningStore
impl Sync for LearningStore
impl Unpin for LearningStore
impl UnwindSafe for LearningStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more