#[non_exhaustive]pub struct RankingMetrics {
pub mean_average_precision: Option<DoubleValue>,
pub mean_squared_error: Option<DoubleValue>,
pub normalized_discounted_cumulative_gain: Option<DoubleValue>,
pub average_rank: Option<DoubleValue>,
/* private fields */
}Expand description
Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mean_average_precision: Option<DoubleValue>Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
mean_squared_error: Option<DoubleValue>Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
normalized_discounted_cumulative_gain: Option<DoubleValue>A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
average_rank: Option<DoubleValue>Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
Implementations§
Source§impl RankingMetrics
impl RankingMetrics
Sourcepub fn set_mean_average_precision<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_mean_average_precision<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
Sets the value of mean_average_precision.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_mean_average_precision(DoubleValue::default()/* use setters */);Sourcepub fn set_or_clear_mean_average_precision<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_or_clear_mean_average_precision<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
Sets or clears the value of mean_average_precision.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_or_clear_mean_average_precision(Some(DoubleValue::default()/* use setters */));
let x = RankingMetrics::new().set_or_clear_mean_average_precision(None::<DoubleValue>);Sourcepub fn set_mean_squared_error<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_mean_squared_error<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
Sets the value of mean_squared_error.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_mean_squared_error(DoubleValue::default()/* use setters */);Sourcepub fn set_or_clear_mean_squared_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_or_clear_mean_squared_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
Sets or clears the value of mean_squared_error.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_or_clear_mean_squared_error(Some(DoubleValue::default()/* use setters */));
let x = RankingMetrics::new().set_or_clear_mean_squared_error(None::<DoubleValue>);Sourcepub fn set_normalized_discounted_cumulative_gain<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_normalized_discounted_cumulative_gain<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
Sets the value of normalized_discounted_cumulative_gain.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_normalized_discounted_cumulative_gain(DoubleValue::default()/* use setters */);Sourcepub fn set_or_clear_normalized_discounted_cumulative_gain<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_or_clear_normalized_discounted_cumulative_gain<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<DoubleValue>,
Sets or clears the value of normalized_discounted_cumulative_gain.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_or_clear_normalized_discounted_cumulative_gain(Some(DoubleValue::default()/* use setters */));
let x = RankingMetrics::new().set_or_clear_normalized_discounted_cumulative_gain(None::<DoubleValue>);Sourcepub fn set_average_rank<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_average_rank<T>(self, v: T) -> Selfwhere
T: Into<DoubleValue>,
Sets the value of average_rank.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_average_rank(DoubleValue::default()/* use setters */);Sourcepub fn set_or_clear_average_rank<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
pub fn set_or_clear_average_rank<T>(self, v: Option<T>) -> Selfwhere
T: Into<DoubleValue>,
Sets or clears the value of average_rank.
§Example
use wkt::DoubleValue;
let x = RankingMetrics::new().set_or_clear_average_rank(Some(DoubleValue::default()/* use setters */));
let x = RankingMetrics::new().set_or_clear_average_rank(None::<DoubleValue>);Trait Implementations§
Source§impl Clone for RankingMetrics
impl Clone for RankingMetrics
Source§fn clone(&self) -> RankingMetrics
fn clone(&self) -> RankingMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RankingMetrics
impl Debug for RankingMetrics
Source§impl Default for RankingMetrics
impl Default for RankingMetrics
Source§fn default() -> RankingMetrics
fn default() -> RankingMetrics
Source§impl Message for RankingMetrics
impl Message for RankingMetrics
Source§impl PartialEq for RankingMetrics
impl PartialEq for RankingMetrics
impl StructuralPartialEq for RankingMetrics
Auto Trait Implementations§
impl Freeze for RankingMetrics
impl RefUnwindSafe for RankingMetrics
impl Send for RankingMetrics
impl Sync for RankingMetrics
impl Unpin for RankingMetrics
impl UnsafeUnpin for RankingMetrics
impl UnwindSafe for RankingMetrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request