Struct reductionml_core::workspace::Workspace
source · pub struct Workspace { /* private fields */ }
Implementations§
source§impl Workspace
impl Workspace
pub fn create_from_json(json: &str) -> Result<Workspace>
pub fn create_from_yaml(yaml: &str) -> Result<Workspace>
pub fn create_from_model(json: &[u8]) -> Result<Workspace>
pub fn serialize_model(&self) -> Result<Vec<u8>>
pub fn serialize_to_json(&self) -> Result<Value>
pub fn deserialize_from_json(json: &Value) -> Result<Workspace>
pub fn predict(&self, features: &Features<'_>) -> Prediction
pub fn predict_then_learn( &mut self, features: &Features<'_>, label: &Label ) -> Prediction
pub fn learn(&mut self, features: &Features<'_>, label: &Label)
pub fn get_entry_reduction(&self) -> &ReductionWrapper
pub fn global_config(&self) -> &GlobalConfig
pub fn features_pool(&self) -> &Arc<Pool<SparseFeatures>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Workspace
impl<'de> Deserialize<'de> for Workspace
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Workspace
impl !Send for Workspace
impl !Sync for Workspace
impl Unpin for Workspace
impl !UnwindSafe for Workspace
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