pub struct VariationalLogisticRegression {
pub bound: f64,
/* private fields */
}
Expand description
Represents a logistic regression model trained via variational inference
Fields§
§bound: f64
Variational lower bound
Implementations§
Source§impl VariationalLogisticRegression
impl VariationalLogisticRegression
Sourcepub fn train(
features: impl Features,
labels: impl BinaryLabels,
config: &LogisticTrainConfig,
) -> Result<VariationalLogisticRegression, RegressionError>
pub fn train( features: impl Features, labels: impl BinaryLabels, config: &LogisticTrainConfig, ) -> Result<VariationalLogisticRegression, RegressionError>
Trains the model on the provided data
§Arguments
features
- The feature values (in row-major orientation)
labels
- The vector of corresponding labels
config
- The training configuration
Trait Implementations§
Source§impl Clone for VariationalLogisticRegression
impl Clone for VariationalLogisticRegression
Source§fn clone(&self) -> VariationalLogisticRegression
fn clone(&self) -> VariationalLogisticRegression
Returns a copy 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 moreSource§impl<'de> Deserialize<'de> for VariationalLogisticRegression
impl<'de> Deserialize<'de> for VariationalLogisticRegression
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
Source§impl VariationalRegression<BernoulliDistribution> for VariationalLogisticRegression
impl VariationalRegression<BernoulliDistribution> for VariationalLogisticRegression
Source§fn predict(
&self,
features: &[f64],
) -> Result<BernoulliDistribution, RegressionError>
fn predict( &self, features: &[f64], ) -> Result<BernoulliDistribution, RegressionError>
Computes the predictive distribution for the provided features Read more
Auto Trait Implementations§
impl Freeze for VariationalLogisticRegression
impl RefUnwindSafe for VariationalLogisticRegression
impl Send for VariationalLogisticRegression
impl Sync for VariationalLogisticRegression
impl Unpin for VariationalLogisticRegression
impl UnwindSafe for VariationalLogisticRegression
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.