Function log_transform

Source
pub fn log_transform<S>(
    array: &ArrayBase<S, Ix2>,
    epsilon: f64,
) -> Result<Array2<f64>>
where S: Data, S::Elem: Float + NumCast,
Expand description

Creates log-transformed features

§Arguments

  • array - The input array to transform
  • epsilon - A small positive value added to all elements before log to avoid taking the log of zero or negative values

§Returns

  • Result<Array2<f64>> - The log-transformed array