Fixes, upgrade, and stuff
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user