Run: cargo clippy --fix -Z unstable-options and cargo fmt

This commit is contained in:
Luis Moreno
2020-11-08 19:39:11 -04:00
parent 8281a1620e
commit 860056c3ba
48 changed files with 367 additions and 395 deletions
+3 -3
View File
@@ -42,9 +42,9 @@ impl AUC {
for i in 0..n {
if y_true.get(i) == T::zero() {
neg = neg + T::one();
neg += T::one();
} else if y_true.get(i) == T::one() {
pos = pos + T::one();
pos += T::one();
} else {
panic!(
"AUC is only for binary classification. Invalid label: {}",
@@ -79,7 +79,7 @@ impl AUC {
let mut auc = T::zero();
for i in 0..n {
if y_true.get(label_idx[i]) == T::one() {
auc = auc + rank[i];
auc += rank[i];
}
}