Fixes, upgrade, and stuff

This commit is contained in:
2021-10-27 09:23:23 +02:00
parent 57b423df8a
commit 79a76b316b
9 changed files with 43 additions and 34 deletions

View File

@@ -154,7 +154,7 @@ impl BinaryModel {
fn process_items(&self, items: &[&str], sign: f64) -> Vec<(usize, f64)> {
items
.iter()
.map(|key| (self.storage.get_id(&key), sign))
.map(|key| (self.storage.get_id(key), sign))
.collect()
}
}

View File

@@ -94,7 +94,7 @@ impl DifferenceModel {
fn process_items(&self, items: &[&str], sign: f64) -> Vec<(usize, f64)> {
items
.iter()
.map(|key| (self.storage.get_id(&key), sign))
.map(|key| (self.storage.get_id(key), sign))
.collect()
}
}

View File

@@ -187,7 +187,7 @@ impl TernaryModel {
fn process_items(&self, items: &[&str], sign: f64) -> Vec<(usize, f64)> {
items
.iter()
.map(|key| (self.storage.get_id(&key), sign))
.map(|key| (self.storage.get_id(key), sign))
.collect()
}
}

View File

@@ -149,7 +149,7 @@ impl ProbitWinObservation {
}
pub fn probability(storage: &Storage, elems: &[(usize, f64)], t: f64, margin: f64) -> f64 {
let (m, v) = f_params(&elems, t, &storage);
let (m, v) = f_params(elems, t, storage);
let (logpart, _, _) = mm_probit_win(m - margin, v);
logpart.exp()
@@ -188,7 +188,7 @@ impl ProbitTieObservation {
}
pub fn probability(storage: &Storage, elems: &[(usize, f64)], t: f64, margin: f64) -> f64 {
let (m, v) = f_params(&elems, t, &storage);
let (m, v) = f_params(elems, t, storage);
let (logpart, _, _) = mm_probit_tie(m, v, margin);
logpart.exp()