1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#[cfg(feature = "serde")]
use serde_crate::{Deserialize, Serialize};
use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[cfg_attr(
feature = "serde",
derive(Serialize, Deserialize),
serde(crate = "serde_crate")
)]
#[derive(Debug, Clone, Error)]
pub enum Error {
#[error("not enough samples as they have to be larger than number of features")]
NotEnoughSamples,
#[error("the data is ill-conditioned")]
IllConditioned,
#[error(transparent)]
BaseCrate(#[from] linfa::Error),
}