diff --git a/README.md b/README.md index 08f9031..506062b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # MealModel -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://max-de-rooij.github.io/MealModel.jl/stable/) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://max-de-rooij.github.io/MealModel.jl/dev/) [![Build Status](https://github.com/max-de-rooij/MealModel.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/max-de-rooij/MealModel.jl/actions/workflows/CI.yml?query=branch%3Amain) [![codecov](https://codecov.io/gh/max-de-rooij/MealModel.jl/branch/main/graph/badge.svg?token=GDWQBJQBXD)](https://codecov.io/gh/max-de-rooij/MealModel.jl) diff --git a/docs/Project.toml b/docs/Project.toml deleted file mode 100644 index ade85fc..0000000 --- a/docs/Project.toml +++ /dev/null @@ -1,3 +0,0 @@ -[deps] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -MealModel = "669c76bc-767f-4084-a0ab-e2cae41b1e42" diff --git a/docs/make.jl b/docs/make.jl deleted file mode 100644 index 25bb9ee..0000000 --- a/docs/make.jl +++ /dev/null @@ -1,25 +0,0 @@ -using MealModel -using Documenter - -DocMeta.setdocmeta!(MealModel, :DocTestSetup, :(using MealModel); recursive=true) - -makedocs(; - modules=[MealModel], - authors="Max de Rooij", - repo="https://github.com/max-de-rooij/MealModel.jl/blob/{commit}{path}#{line}", - sitename="MealModel.jl", - format=Documenter.HTML(; - prettyurls=get(ENV, "CI", "false") == "true", - canonical="https://max-de-rooij.github.io/MealModel.jl", - edit_link="main", - assets=String[], - ), - pages=[ - "Home" => "index.md", - ], -) - -deploydocs(; - repo="github.com/max-de-rooij/MealModel.jl", - devbranch="main", -) diff --git a/docs/src/index.md b/docs/src/index.md deleted file mode 100644 index 5b8cae0..0000000 --- a/docs/src/index.md +++ /dev/null @@ -1,14 +0,0 @@ -```@meta -CurrentModule = MealModel -``` - -# MealModel - -Documentation for [MealModel](https://github.com/max-de-rooij/MealModel.jl). - -```@index -``` - -```@autodocs -Modules = [MealModel] -``` diff --git a/notebooks/MealModel.ipynb b/notebooks/MealModel.ipynb new file mode 100644 index 0000000..92849cb --- /dev/null +++ b/notebooks/MealModel.ipynb @@ -0,0 +1,47 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "using MealModel" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "MixedMealModel(SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, SciMLBase.ODEFunction{true, SciMLBase.FullSpecialize, MealModel.var\"#3#4\"{Float64, Float64, Float64, Float64, Float64, Float64, Float64}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, SciMLSensitivity.ForwardDiffSensitivity{0, nothing}, Tuple{Symbol}, NamedTuple{(:sensealg,), Tuple{SciMLSensitivity.ForwardDiffSensitivity{0, nothing}}}}, SciMLBase.StandardODEProblem}(SciMLBase.ODEFunction{true, SciMLBase.FullSpecialize, MealModel.var\"#3#4\"{Float64, Float64, Float64, Float64, Float64, Float64, Float64}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}(MealModel.var\"#3#4\"{Float64, Float64, Float64, Float64, Float64, Float64, Float64}(0.1, 9.0, 3.0, 31.0, 1.0, 0.00113, 0.005551), LinearAlgebra.UniformScaling{Bool}(true), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, SciMLBase.DEFAULT_OBSERVED, nothing, nothing), [0.0, 5.0, 0.0, 18.0, 0.0, 18.0, 18.0, 18.0, 0.33, 0.0, 0.0, 0.0, 1.3], (0.0, 480.0), [0.0105, 0.28, 0.00607, 0.000235, 0.0424, 2.2975, 1.15, 7.27, 0.0383, 0.284 … 0.0385, 0.0713, 208.88, 0.0088, 0.0163, 1.0e-5, 0.0119, 75000.0, 60000.0, 84.2], Base.Pairs(:sensealg => SciMLSensitivity.ForwardDiffSensitivity{0, nothing}()), SciMLBase.StandardODEProblem()), [1, 5, 6, 17, 20, 21, 23, 25])" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "model = MixedMealModel()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.9.3", + "language": "julia", + "name": "julia-1.9" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.9.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/src/MealModel.jl b/src/MealModel.jl index 2f901b1..c30d319 100644 --- a/src/MealModel.jl +++ b/src/MealModel.jl @@ -5,7 +5,6 @@ using Trapz include("model/Model.jl") include("simulation/Simulation.jl") -include("assimilation/Assimilation.jl") # model constructor export MixedMealModel diff --git a/src/assimilation/Assimilation.jl b/src/assimilation/Assimilation.jl deleted file mode 100644 index 30e9acb..0000000 --- a/src/assimilation/Assimilation.jl +++ /dev/null @@ -1 +0,0 @@ -include("Loss.jl") \ No newline at end of file diff --git a/src/assimilation/Loss.jl b/src/assimilation/Loss.jl index b46ec02..6182ba8 100644 --- a/src/assimilation/Loss.jl +++ b/src/assimilation/Loss.jl @@ -33,6 +33,9 @@ function make_loss(model::MixedMealModel, error::Function; save_timestep = 0.5) _loss end +make_loss(model::MixedMealModel, data...; save_timestep = 0.5) = make_loss(model, make_error( + model, data...; save_timestep = save_timestep); save_timestep = save_timestep) + function make_error(model::MixedMealModel, glucose_data, glucose_timepoints, insulin_data, insulin_timepoints, tg_data, tg_timepoints, nefa_data, nefa_timepoints; save_timestep = 0.5) # times