pub struct CorefScores {
pub precision: f64,
pub recall: f64,
pub f1: f64,
}Expand description
Coreference evaluation scores (precision, recall, F1).
Fields§
§precision: f64Precision.
recall: f64Recall.
f1: f64F1.
Implementations§
Source§impl CorefScores
impl CorefScores
Sourcepub fn new(precision: f64, recall: f64) -> CorefScores
pub fn new(precision: f64, recall: f64) -> CorefScores
Create a new score triple (F1 computed automatically).
use anno::metrics::coref_metrics::CorefScores;
let s = CorefScores::new(0.8, 0.6);
assert!((s.f1 - 2.0 * 0.8 * 0.6 / (0.8 + 0.6)).abs() < 1e-9);Sourcepub fn from_tuple(_: (f64, f64, f64)) -> CorefScores
pub fn from_tuple(_: (f64, f64, f64)) -> CorefScores
Create from an existing (precision, recall, f1) triple.
Trait Implementations§
Source§impl Clone for CorefScores
impl Clone for CorefScores
Source§fn clone(&self) -> CorefScores
fn clone(&self) -> CorefScores
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CorefScores
Source§impl Debug for CorefScores
impl Debug for CorefScores
Source§impl Default for CorefScores
impl Default for CorefScores
Source§fn default() -> CorefScores
fn default() -> CorefScores
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CorefScores
impl<'de> Deserialize<'de> for CorefScores
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CorefScores, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CorefScores, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CorefScores
impl Serialize for CorefScores
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CorefScores
impl RefUnwindSafe for CorefScores
impl Send for CorefScores
impl Sync for CorefScores
impl Unpin for CorefScores
impl UnsafeUnpin for CorefScores
impl UnwindSafe for CorefScores
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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