Skip to content

Commit

Permalink
Merge branch 'serialize'
Browse files Browse the repository at this point in the history
  • Loading branch information
Siel committed Feb 5, 2025
2 parents 2705e7b + 4459a1f commit 274a3a5
Show file tree
Hide file tree
Showing 31 changed files with 3,791 additions and 216 deletions.
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pmcore"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
authors = [
"Julián D. Otálvaro <juliandavid347@gmail.com>",
Expand Down Expand Up @@ -36,7 +36,9 @@ chrono = "0.4"
config = { version = "0.14", features = ["preserve_order"] }
faer = "0.19.3"
faer-ext = { version = "0.2.0", features = ["nalgebra", "ndarray"] }
pharmsol = "0.7.1"
pharmsol = "0.7.2"
# pharmsol = {path="../pharmsol"}
# pharmsol = { git = "https://github.com/LAPKB/pharmsol.git", branch = "dev"}
toml = "0.8.14" #REMOVE
rand = "0.8.5"
anyhow = "1.0.86"
Expand Down
82 changes: 0 additions & 82 deletions compare.sh

This file was deleted.

19 changes: 0 additions & 19 deletions examples/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,58 +30,39 @@ fn main() {
},
(1, 1),
);
let net = equation::ODENet::new(
vec![dmatrix![-1.0], dmatrix![0.0]],
vec![],
vec![],
vec![],
vec![],
vec![],
vec![OutEq::new(0, Op::Div(X(0), P(1)))],
(1, 1),
);

let settings = settings::read("examples/bimodal_ke/config.toml").unwrap();
setup_log(&settings).unwrap();
let data = data::read_pmetrics("examples/bimodal_ke/bimodal_ke.csv").unwrap();
let mut alg_ode = NPAG::new(settings.clone(), ode, data.clone()).unwrap();
let mut alg_an = NPAG::new(settings.clone(), an, data.clone()).unwrap();
let mut alg_net = NPAG::new(settings.clone(), net, data.clone()).unwrap();

// Initialize algorithms
alg_ode.initialize().unwrap();
alg_an.initialize().unwrap();
alg_net.initialize().unwrap();

// evaluate algorithms
alg_ode.evaluation().unwrap();
alg_an.evaluation().unwrap();
alg_net.evaluation().unwrap();

println!("ODE: \n\t-2ll: {:?}", alg_ode.n2ll());
println!("Analytical: \n\t-2ll: {:?}", alg_an.n2ll());
println!("Net: \n\t-2ll: {:?}", alg_net.n2ll());
println!("=====================================");

alg_ode.write_psi("examples/bimodal_ke/psi_ode.csv");
alg_an.write_psi("examples/bimodal_ke/psi_an.csv");
alg_net.write_psi("examples/bimodal_ke/psi_net.csv");

alg_ode.write_theta("examples/bimodal_ke/theta_ode.csv");
alg_an.write_theta("examples/bimodal_ke/theta_an.csv");
alg_net.write_theta("examples/bimodal_ke/theta_net.csv");

let psi_ode = alg_ode.psi().clone();
let psi_an = alg_an.psi().clone();
let psi_net = alg_net.psi().clone();

let ll_ode = burke(&psi_ode).unwrap();
let ll_an = burke(&psi_an).unwrap();
let ll_net = burke(&psi_net).unwrap();

println!("ODE: \n\t-2ll: {:?}", -2. * ll_ode.1);
println!("Analytical: \n\t-2ll: {:?}", -2. * ll_an.1);
println!("Net: \n\t-2ll: {:?}", -2. * ll_net.1);

dbg!(&data.get_subjects().get(46));
}
40 changes: 0 additions & 40 deletions examples/iov/main.rs

This file was deleted.

Loading

0 comments on commit 274a3a5

Please sign in to comment.