pub struct LogNormalComponent {
pub weight: f64,
pub mu: f64,
pub sigma: f64,
pub label: Option<String>,
}Expand description
Configuration for a single Log-Normal component in a mixture.
Fields§
§weight: f64Weight of this component (0.0-1.0, all weights should sum to 1.0)
mu: f64Mu parameter (location) of the log-normal distribution
sigma: f64Sigma parameter (scale) of the log-normal distribution
label: Option<String>Optional label for this component
Implementations§
Source§impl LogNormalComponent
impl LogNormalComponent
Sourcepub fn with_label(
weight: f64,
mu: f64,
sigma: f64,
label: impl Into<String>,
) -> Self
pub fn with_label( weight: f64, mu: f64, sigma: f64, label: impl Into<String>, ) -> Self
Create a labeled Log-Normal component.
Sourcepub fn expected_value(&self) -> f64
pub fn expected_value(&self) -> f64
Get the expected value (mean) of this component.
Trait Implementations§
Source§impl Clone for LogNormalComponent
impl Clone for LogNormalComponent
Source§fn clone(&self) -> LogNormalComponent
fn clone(&self) -> LogNormalComponent
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 moreSource§impl Debug for LogNormalComponent
impl Debug for LogNormalComponent
Source§impl<'de> Deserialize<'de> for LogNormalComponent
impl<'de> Deserialize<'de> for LogNormalComponent
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 Freeze for LogNormalComponent
impl RefUnwindSafe for LogNormalComponent
impl Send for LogNormalComponent
impl Sync for LogNormalComponent
impl Unpin for LogNormalComponent
impl UnwindSafe for LogNormalComponent
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