pub struct DocumentKernelApproximation {
pub n_components: usize,
pub use_topic_features: bool,
pub use_readability_features: bool,
pub use_stylometric_features: bool,
pub n_topics: usize,
}Expand description
Document kernel approximation for document-level features DocumentKernelApproximation
Fields§
§n_components: usizen_components
use_topic_features: booluse_topic_features
use_readability_features: booluse_readability_features
use_stylometric_features: booluse_stylometric_features
n_topics: usizen_topics
Implementations§
Source§impl DocumentKernelApproximation
impl DocumentKernelApproximation
pub fn new(n_components: usize) -> Self
pub fn use_topic_features(self, use_topics: bool) -> Self
pub fn use_readability_features(self, use_readability: bool) -> Self
pub fn use_stylometric_features(self, use_stylometric: bool) -> Self
pub fn n_topics(self, n_topics: usize) -> Self
Trait Implementations§
Source§impl Clone for DocumentKernelApproximation
impl Clone for DocumentKernelApproximation
Source§fn clone(&self) -> DocumentKernelApproximation
fn clone(&self) -> DocumentKernelApproximation
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 moreSource§impl Debug for DocumentKernelApproximation
impl Debug for DocumentKernelApproximation
Source§impl<'de> Deserialize<'de> for DocumentKernelApproximation
impl<'de> Deserialize<'de> for DocumentKernelApproximation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Fit<Vec<String>, ()> for DocumentKernelApproximation
impl Fit<Vec<String>, ()> for DocumentKernelApproximation
Source§type Fitted = FittedDocumentKernelApproximation
type Fitted = FittedDocumentKernelApproximation
The fitted model type
Source§fn fit(self, documents: &Vec<String>, _y: &()) -> Result<Self::Fitted>
fn fit(self, documents: &Vec<String>, _y: &()) -> Result<Self::Fitted>
Fit the model to the provided data with validation
Source§fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
Fit with custom validation and early stopping
Auto Trait Implementations§
impl Freeze for DocumentKernelApproximation
impl RefUnwindSafe for DocumentKernelApproximation
impl Send for DocumentKernelApproximation
impl Sync for DocumentKernelApproximation
impl Unpin for DocumentKernelApproximation
impl UnwindSafe for DocumentKernelApproximation
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