pub struct AucScore {
pub fp: FixedPrecisionConfig,
}
Expand description
A structure that defines the custom operation AucMetric Area Under the Receiver Operating Characteristic Curve (ROC AUC).
This is the most commonly used metric for binary classification problems. See also https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html.
§Custom operation arguments
- Node containing a signed 1-dimensional 64-bit array with labels (0 or 1, possibly in the fixed precision format);
- Node containing a 1-dimensional 64-bit array with predictions (can be integers or fixed precision, only relative order matters).
§Custom operation returns
New AucScore node
§Example
let c = create_context().unwrap();
let g = c.create_graph().unwrap();
let t = array_type(vec![5], INT64);
let y_true = g.input(t.clone()).unwrap();
let y_pred = g.input(t.clone()).unwrap();
let fp = FixedPrecisionConfig::default();
let auc = g.custom_op(CustomOperation::new(AucScore {fp}), vec![y_true, y_pred]).unwrap();
Fields§
§fp: FixedPrecisionConfig
Fixed precision config for labels.
Trait Implementations§
Source§impl CustomOperationBody for AucScore
impl CustomOperationBody for AucScore
Source§impl<'de> Deserialize<'de> for AucScore
impl<'de> Deserialize<'de> for AucScore
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
impl Eq for AucScore
impl StructuralPartialEq for AucScore
Auto Trait Implementations§
impl Freeze for AucScore
impl RefUnwindSafe for AucScore
impl Send for AucScore
impl Sync for AucScore
impl Unpin for AucScore
impl UnwindSafe for AucScore
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.