pub struct TSNE { /* private fields */ }
Expand description
t-SNE (t-distributed Stochastic Neighbor Embedding) for dimensionality reduction
t-SNE is a nonlinear dimensionality reduction technique well-suited for embedding high-dimensional data for visualization in a low-dimensional space (typically 2D or 3D). It models each high-dimensional object by a two- or three-dimensional point in such a way that similar objects are modeled by nearby points and dissimilar objects are modeled by distant points with high probability.
Implementations§
Source§impl TSNE
impl TSNE
Sourcepub fn with_n_components(self, n_components: usize) -> Self
pub fn with_n_components(self, n_components: usize) -> Self
Sets the number of components in the embedded space
Sourcepub fn with_perplexity(self, perplexity: f64) -> Self
pub fn with_perplexity(self, perplexity: f64) -> Self
Sets the perplexity parameter
Sourcepub fn with_early_exaggeration(self, early_exaggeration: f64) -> Self
pub fn with_early_exaggeration(self, early_exaggeration: f64) -> Self
Sets the early exaggeration factor
Sourcepub fn with_learning_rate(self, learning_rate: f64) -> Self
pub fn with_learning_rate(self, learning_rate: f64) -> Self
Sets the learning rate for gradient descent
Sourcepub fn with_max_iter(self, max_iter: usize) -> Self
pub fn with_max_iter(self, max_iter: usize) -> Self
Sets the maximum number of iterations
Sourcepub fn with_n_iter_without_progress(
self,
n_iter_without_progress: usize,
) -> Self
pub fn with_n_iter_without_progress( self, n_iter_without_progress: usize, ) -> Self
Sets the number of iterations without progress before early stopping
Sourcepub fn with_min_grad_norm(self, min_grad_norm: f64) -> Self
pub fn with_min_grad_norm(self, min_grad_norm: f64) -> Self
Sets the minimum gradient norm for convergence
Sourcepub fn with_metric(self, metric: &str) -> Self
pub fn with_metric(self, metric: &str) -> Self
Sets the metric for pairwise distance computation
Sourcepub fn with_method(self, method: &str) -> Self
pub fn with_method(self, method: &str) -> Self
Sets the method for dimensionality reduction
Sourcepub fn with_angle(self, angle: f64) -> Self
pub fn with_angle(self, angle: f64) -> Self
Sets the angle for Barnes-Hut approximation
Sourcepub fn with_n_jobs(self, n_jobs: i32) -> Self
pub fn with_n_jobs(self, n_jobs: i32) -> Self
Sets the number of parallel jobs to run
- n_jobs = -1: Use all available cores
- n_jobs = 1: Use single-core (disable multicore)
- n_jobs > 1: Use specific number of cores
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Sets the verbosity level
Sourcepub fn with_random_state(self, random_state: u64) -> Self
pub fn with_random_state(self, random_state: u64) -> Self
Sets the random state for reproducibility
Sourcepub fn kl_divergence(&self) -> Option<f64>
pub fn kl_divergence(&self) -> Option<f64>
Returns the KL divergence after optimization
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TSNE
impl RefUnwindSafe for TSNE
impl Send for TSNE
impl Sync for TSNE
impl Unpin for TSNE
impl UnwindSafe for TSNE
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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