Skip to content

Commit

Permalink
chore: add limitations section of Gaussian::fit (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
tasshi-me authored Dec 29, 2022
1 parent d75362a commit b556725
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gaussian/gaussian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ impl<F: Float> Gaussian<F> {
/// assert_abs_diff_eq!(gaussian, estimated, epsilon = 1e-9);
/// ```
///
/// # Limitations
///
/// - `x_vec` must have at least one element
/// - All elements of `y_vec` must be positive numbers
/// - If the distribution is "long-tailed", it affects the fitting accuracy.
/// - A detailed description can be found in Reference 1.
/// - Also, you can see the reproduction and workaround in [GitHub](https://github.com/mshrtsr/fitting-rs/issues/6#issuecomment-1367095969).
///
/// # References
/// \[1\] [E. Pastuchov ́a and M. Z ́akopˇcan, ”Comparison of Algorithms for Fitting a Gaussian Function used in Testing Smart Sensors”, Journal of Electrical Engineering, vol. 66, no. 3, pp. 178-181, 2015.](https://www.researchgate.net/publication/281907940_Comparison_of_Algorithms_For_Fitting_a_Gaussian_Function_Used_in_Testing_Smart_Sensors)
pub fn fit(x_vec: Array1<F>, y_vec: Array1<F>) -> Result<Gaussian<F>, Error> {
Expand Down

0 comments on commit b556725

Please # to comment.