Skip to main content

MethodsErrors

Enum MethodsErrors 

Source
pub enum MethodsErrors {
Show 32 variants AnnSearchRsError(AnnSearchErrors), Core(CoreErrors), GraphDirectedError, GraphIndexOutOfRange { name: &'static str, index: usize, n_nodes: usize, }, GraphLengthMismatch { name: &'static str, expected: usize, got: usize, }, KnnGraphNeedsDistances, MissingNodeTypeWeight(String), CommunityAssignmentMismatch, PartitionLabelOutOfRange { label: usize, n_partitions: usize, }, TooManyPartitions { n_partitions: usize, max: usize, }, NmfRankTooLarge { requested: usize, available: usize, }, NmfNonFinite, NmfNonNegativeViolated, NmfConsensusInvalidK { k: usize, }, NmfConsensusTooFewRuns { n_runs: usize, }, NmfConsensusTooFewComponents { k: usize, n_surviving: usize, }, NmfConsensusEmptyCluster { cluster: usize, k: usize, }, NmfKSweepEmptyRange, NmfConsensusKMismatch { requested: usize, restarts: usize, }, NmfDimensionMismatch { expected: usize, found: usize, }, LdaInvalidTopicCount { requested: usize, max_available: usize, }, LdaInvalidHyperparameter { name: String, value: f64, }, LdaEmptyMatrix, LdaNonFinite, LdaTopNTooLarge { requested: usize, vocab_size: usize, }, LdaDimensionMismatch { expected: usize, got: usize, }, FeatureSetIndexOutOfRange { set: usize, index: usize, n_features: usize, }, FeatureSetInvalid { set: usize, reason: &'static str, }, LmActivityShapeMismatch { expected: usize, got: usize, }, LmActivityDegreesOfFreedom { n_features: usize, n_params: usize, }, LmActivityRankDeficient { ratio: f64, }, LmActivityNonFinite { observation: usize, },
}
Expand description

Error variants raised by bixverse-methods.

Grouped by subsystem.

Variants§

§

AnnSearchRsError(AnnSearchErrors)

Propagates an error from ann-search-rs.

§

Core(CoreErrors)

Propagates an error from bixverse-core.

§

GraphDirectedError

Error for algorithms that expect undirected graphs

For methods that expect an undirected graph, but received a directed one.

§

GraphIndexOutOfRange

A node index in an edge list points outside the graph

Fields

§name: &'static str

Which input carried the index

§index: usize

The offending index

§n_nodes: usize

Number of nodes in the graph

§

GraphLengthMismatch

A per-node or per-edge input does not line up with the graph

Fields

§name: &'static str

Which input is the wrong length

§expected: usize

Length the graph implies

§got: usize

Length that was supplied

§

KnnGraphNeedsDistances

The UMAP kNN graph was asked for without kNN distances

§

MissingNodeTypeWeight(String)

A node type present in the graph has no type weight

§

CommunityAssignmentMismatch

Error for community membership/graph node number mismatch

In cases where the graph and the community membership do not agree.

§

PartitionLabelOutOfRange

Error if a partition label sits outside the declared partition count

Fields

§label: usize

The offending label

§n_partitions: usize

Number of declared partitions

§

TooManyPartitions

Error if the partition count exceeds what the dense coarsening accepts

Fields

§n_partitions: usize

Provided number of partitions

§max: usize

The supported maximum

§

NmfRankTooLarge

NMF Rank is too large for the NNDSVD initialisation

Fields

§requested: usize

Requested rank

§available: usize

Maximum available rank

§

NmfNonFinite

Error if NMF values are not finite

§

NmfNonNegativeViolated

Error if NMF values are negative

§

NmfConsensusInvalidK

Consensus NMF received a rank that cannot support a silhouette.

Fields

§k: usize

Requested rank

§

NmfConsensusTooFewRuns

Consensus NMF received too few restarts to pool over.

Fields

§n_runs: usize

Requested number of restarts

§

NmfConsensusTooFewComponents

The outlier filter removed so many components that k-means cannot run.

Fields

§k: usize

Requested rank

§n_surviving: usize

Components left after filtering

§

NmfConsensusEmptyCluster

k-means returned an empty cluster, so the consensus factor would carry a zero row and the refit would be degenerate.

Fields

§cluster: usize

Index of the empty cluster

§k: usize

Requested rank

§

NmfKSweepEmptyRange

The k sweep was handed nothing to sweep over.

§

NmfConsensusKMismatch

A consensus step was applied to restarts run at a different rank.

Fields

§requested: usize

Rank requested for the consensus

§restarts: usize

Rank the restarts actually hold

§

NmfDimensionMismatch

A frozen factor handed to a refit does not line up with V.

Fields

§expected: usize

Dimension V expects

§found: usize

Dimension the frozen factor provides

§

LdaInvalidTopicCount

The requested topic count cannot be supported by the corpus.

A topic needs somewhere to put its mass, so k above the vocabulary size leaves topics that no document can ever distinguish.

Fields

§requested: usize

Requested number of topics

§max_available: usize

Largest topic count the corpus supports

§

LdaInvalidHyperparameter

A Dirichlet hyperparameter is not strictly positive.

Fields

§name: String

Name of the offending hyperparameter

§value: f64

Value that was supplied

§

LdaEmptyMatrix

The document-term matrix carries no counts at all.

§

LdaNonFinite

A non-finite value reached the variational parameters.

§

LdaTopNTooLarge

Coherence was asked for more top terms than the vocabulary holds.

Fields

§requested: usize

Requested number of top terms per topic

§vocab_size: usize

Vocabulary size available

§

LdaDimensionMismatch

Metric inputs disagree on the number of documents or topics.

Fields

§expected: usize

Dimension the model implies

§got: usize

Dimension that was supplied

§

FeatureSetIndexOutOfRange

A feature set points at a feature outside the feature universe.

Fields

§set: usize

Index of the offending set

§index: usize

The offending feature index

§n_features: usize

Size of the feature universe

§

FeatureSetInvalid

A feature set is empty, repeats a feature, carries a non-finite weight or has a weight vector of the wrong length.

Fields

§set: usize

Index of the offending set

§reason: &'static str

What is wrong with it

§

LmActivityShapeMismatch

The data and the feature sets disagree on the number of features.

Fields

§expected: usize

Feature universe of the feature sets

§got: usize

Features in the data

§

LmActivityDegreesOfFreedom

The model leaves no residual degrees of freedom.

Fields

§n_features: usize

Number of features (the observations of each fit)

§n_params: usize

Number of fitted parameters, intercept included

§

LmActivityRankDeficient

The MLM design is (numerically) rank deficient.

Two sets with identical or proportional weights, or a set covering every feature with one weight (collinear with the intercept), make XᵀX singular.

Fields

§ratio: f64

Smallest over largest eigenvalue of XᵀX scaled to unit diagonal

§

LmActivityNonFinite

An observation holds a NaN or infinite value.

Fields

§observation: usize

Index of the observation within the scored batch

Trait Implementations§

Source§

impl Debug for MethodsErrors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MethodsErrors

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for MethodsErrors

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AnnSearchErrors> for MethodsErrors

Source§

fn from(source: AnnSearchErrors) -> Self

Converts to this type from the input type.
Source§

impl From<CoreErrors> for MethodsErrors

Source§

fn from(source: CoreErrors) -> Self

Converts to this type from the input type.
Source§

impl From<SparseErrors> for MethodsErrors

Sparse structure errors surface through the core variant, as before the sparse structures moved to bixverse-sparse.

Source§

fn from(err: SparseErrors) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Separable for T
where T: Display,

Source§

fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String

Adds separators according to the given SeparatorPolicy. Read more
Source§

fn separate_with_commas(&self) -> String

Inserts a comma every three digits from the right. Read more
Source§

fn separate_with_spaces(&self) -> String

Inserts a space every three digits from the right. Read more
Source§

fn separate_with_dots(&self) -> String

Inserts a period every three digits from the right. Read more
Source§

fn separate_with_underscores(&self) -> String

Inserts an underscore every three digits from the right. Read more
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V