pub struct LandmarkGraphConstruction {
pub n_landmarks: usize,
pub k_neighbors: usize,
pub selection_strategy: String,
pub construction_method: String,
pub bandwidth: f64,
pub max_iter: usize,
pub random_state: Option<u64>,
}Expand description
Landmark-based graph construction for scalable semi-supervised learning
Fields§
§n_landmarks: usizeNumber of landmarks to select
k_neighbors: usizeNumber of neighbors to connect to each landmark
selection_strategy: StringLandmark selection strategy: “random”, “kmeans”, “farthest_first”, “density_based”
construction_method: StringGraph construction method: “knn_to_landmarks”, “rbf_to_landmarks”, “interpolation”
bandwidth: f64Bandwidth parameter for RBF connections
max_iter: usizeMaximum iterations for k-means landmark selection
random_state: Option<u64>Random state for reproducibility
Implementations§
Source§impl LandmarkGraphConstruction
impl LandmarkGraphConstruction
Sourcepub fn n_landmarks(self, n: usize) -> Self
pub fn n_landmarks(self, n: usize) -> Self
Set the number of landmarks
Sourcepub fn k_neighbors(self, k: usize) -> Self
pub fn k_neighbors(self, k: usize) -> Self
Set the number of neighbors per landmark
Sourcepub fn selection_strategy(self, strategy: String) -> Self
pub fn selection_strategy(self, strategy: String) -> Self
Set the landmark selection strategy
Sourcepub fn construction_method(self, method: String) -> Self
pub fn construction_method(self, method: String) -> Self
Set the graph construction method
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Set the random state
Sourcepub fn fit(
&self,
X: &ArrayView2<'_, f64>,
) -> Result<LandmarkGraphResult, SklearsError>
pub fn fit( &self, X: &ArrayView2<'_, f64>, ) -> Result<LandmarkGraphResult, SklearsError>
Construct landmark-based graph
Trait Implementations§
Source§impl Clone for LandmarkGraphConstruction
impl Clone for LandmarkGraphConstruction
Source§fn clone(&self) -> LandmarkGraphConstruction
fn clone(&self) -> LandmarkGraphConstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LandmarkGraphConstruction
impl RefUnwindSafe for LandmarkGraphConstruction
impl Send for LandmarkGraphConstruction
impl Sync for LandmarkGraphConstruction
impl Unpin for LandmarkGraphConstruction
impl UnwindSafe for LandmarkGraphConstruction
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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