Make API a bit prettier

This commit is contained in:
2022-04-27 09:06:29 +02:00
parent aa8580970a
commit a8cef3806a
8 changed files with 42 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ use kickscore as ks;
#[test]
fn binary_1() {
let mut model = ks::model::Binary::new(ks::model::binary::Observation::Probit);
let mut model = ks::model::Binary::probit();
let k_audrey = ks::kernel::Matern52::new(1.0, 2.0);
let k_benjamin = ks::kernel::Matern52::new(1.0, 2.0);

View File

@@ -5,7 +5,7 @@ use kickscore as ks;
#[test]
fn kickscore_basic() {
let mut model = ks::model::Binary::new(ks::model::binary::Observation::Probit);
let mut model = ks::model::Binary::probit();
let k_spike = ks::kernel::Constant::new(0.5);
let k_tom = ks::kernel::Exponential::new(1.0, 1.0);

View File

@@ -58,7 +58,7 @@ fn nba_history() {
let seconds_in_year = 365.25 * 24.0 * 60.0 * 60.0;
let mut model = ks::model::Binary::new(ks::model::binary::Observation::Probit);
let mut model = ks::model::Binary::probit();
for team in teams {
let kernel = (