{
  "_id": "6ace9b28f6f39cd7e29a1b35",
  "Package": "nlmixr2nn",
  "Version": "0.0.0.9000",
  "Title": "Neural-Network ODEs for 'rxode2' and 'nlmixr2'",
  "Description": "Embed neural networks inside ordinary differential\nequation right-hand sides for 'rxode2' and 'nlmixr2'. Networks\nare exposed as compiled 'rxode2' custom functions that supply\nthe network value and its analytic input derivatives, allowing\nlarger networks than the per-weight code-generation approach of\n'pmxNODE'.",
  "Authors@R": "person(\"Matthew\", \"Fidler\", role = c(\"aut\", \"cre\"),\nemail = \"matthew.fidler@gmail.com\")",
  "License": "GPL (>= 3)",
  "URL": "https://nlmixr2.github.io/nlmixr2nn/,\nhttps://github.com/nlmixr2/nlmixr2nn",
  "BugReports": "https://github.com/nlmixr2/nlmixr2nn/issues",
  "Encoding": "UTF-8",
  "SystemRequirements": "C++17. Optionally libtorch, via the 'torch' R\npackage: when the 'torch' package and its libtorch binaries\n(torch::install_torch()) are present at build time, they are\nlinked as the training backend. When they are not, a\nself-contained Adam/SGD optimizer is built instead, so the\npackage installs and trains with no external library.",
  "VignetteBuilder": "knitr",
  "NeedsCompilation": "yes",
  "Config/testthat/edition": "3",
  "Config/roxygen2/version": "8.1.0",
  "Config/pak/sysreqs": "cmake libgmp3-dev make libicu-dev",
  "Repository": "https://nlmixr2.r-universe.dev",
  "Date/Publication": "2026-09-20 21:07:42 UTC",
  "RemoteUrl": "https://github.com/nlmixr2/nlmixr2nn",
  "RemoteRef": "HEAD",
  "RemoteSha": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
  "Packaged": {
    "Date": "2026-10-13 20:39:37 UTC",
    "User": "root"
  },
  "Author": "Matthew Fidler [aut, cre]",
  "Maintainer": "Matthew Fidler <matthew.fidler@gmail.com>",
  "_user": "nlmixr2",
  "_type": "src",
  "_file": "nlmixr2nn_0.0.0.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/f5116f1b40c8a17130b34c4a4f2eac37d19e32f25807215b8bfc87ac4289c367",
  "_filesize": 503599,
  "_sha256": "f5116f1b40c8a17130b34c4a4f2eac37d19e32f25807215b8bfc87ac4289c367",
  "_expires": "2027-01-21T20:57:10.000Z",
  "_created": "2026-10-13T20:39:37.000Z",
  "_published": "2026-10-13T20:57:12.682Z",
  "_buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 115525772579,
      "time": 329,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11848536351"
    },
    {
      "job": 115528278419,
      "time": 174,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11848681459"
    }
  ],
  "_upstream": "https://github.com/nlmixr2/nlmixr2nn",
  "_commit": {
    "id": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
    "author": "mattfidler <matthew.fidler@gmail.com>",
    "committer": "mattfidler <matthew.fidler@gmail.com>",
    "message": "feat: make libtorch optional, with a self-contained optimizer fallback\n\nBuilding nlmixr2nn required libtorch: ./configure hard-failed without it and\nnnTorch.cpp linked -ltorch -ltorch_cpu -lc10.  That blocked two things at once.\nWindows, because torch ships an MSVC-built libtorch while Rtools compiles with\nMinGW -- the two mangle C++ symbols differently and there are no import\nlibraries, so the link fails even though torch.dll is plainly present.  And\nCRAN, which will not fetch a ~2GB library at build time, on any platform.\n\nA fit never asks the backend to differentiate anything: it injects the analytic\ndLoss/dw computed from the ODE forward sensitivity and asks for an optimizer\nstep.  What libtorch actually supplies there is Adam/SGD plus a float64\nparameter store, so src/nnBuiltin.cpp supplies exactly that behind the same\nextern \"C\" entry points.  It reuses the solve's own forward and weight-gradient\nmath through the new nnForwardWC/nnWeightGradWC rather than growing a second\ncopy of the activation switch that could drift.\n\nconfigure/configure.win pick a backend, substitute OBJECTS, and delete the other\nbackend's stale object -- without that, re-configuring an already-built tree\nsilently relinks the backend you just switched away from (measured).\nNLMIXR2NN_BACKEND forces a choice; torch moves to Suggests.\n\nVerified both ways: the builtin links with no -ltorch, matches finite\ndifferences to 1e-9, trains, and round-trips save/load; libtorch still builds,\nand its gradient cross-check still runs there while skipping under the builtin\nbackend, where it would otherwise compare a routine against itself.  Invalid\ndimensions now raise an R error on both backends -- K=-1 previously aborted R\nfrom inside libtorch.\n\nCI: only the ubuntu-release row builds libtorch; every other row, Windows\nincluded, builds the fallback and is a real gate rather than continue-on-error.\nTORCH_HOME is gone -- torch rejects any value that is not an R library path, and\nit failed every job that ran ",
    "time": 1789938462
  },
  "_maintainer": {
    "name": "Matthew Fidler",
    "email": "matthew.fidler@gmail.com",
    "login": "mattfidler",
    "description": "Also a Novartis employee;  Can reach me at my Novartis email: matt.fidler@novartis.com",
    "uuid": 514778
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "rxode2",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "nlmixr2est",
      "role": "LinkingTo"
    },
    {
      "package": "rxode2",
      "role": "Imports"
    },
    {
      "package": "checkmate",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "symengine",
      "role": "Imports"
    },
    {
      "package": "torch",
      "role": "Suggests"
    },
    {
      "package": "nlmixr2",
      "role": "Suggests"
    },
    {
      "package": "nlmixr2est",
      "role": "Suggests"
    },
    {
      "package": "numDeriv",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "minqa",
      "role": "Suggests"
    },
    {
      "package": "lbfgsb3c",
      "role": "Suggests"
    },
    {
      "package": "n1qn1",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "callr",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "nlmixr2",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-28",
      "n": 22
    },
    {
      "week": "2026-29",
      "n": 31
    },
    {
      "week": "2026-30",
      "n": 1
    },
    {
      "week": "2026-33",
      "n": 4
    },
    {
      "week": "2026-34",
      "n": 15
    },
    {
      "week": "2026-36",
      "n": 6
    },
    {
      "week": "2026-38",
      "n": 6
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "mattfidler",
      "count": 104,
      "uuid": 514778
    }
  ],
  "_userbio": {
    "uuid": 94710774,
    "type": "organization",
    "name": "nlmixr2",
    "followers": 64
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/nlmixr2nn"
  },
  "_devurl": "https://github.com/nlmixr2/nlmixr2nn",
  "_searchresults": 0,
  "_topics": [
    "cpp"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/nlmixr2nn.html",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_cranurl": false,
  "_exports": [
    "nn",
    "nn1",
    "nn1_d1",
    "nn1_d1_d1",
    "nn2",
    "nn2_d1",
    "nn2_d1_d1",
    "nn2_d1_d2",
    "nn2_d2",
    "nn2_d2_d2",
    "nn3",
    "nn3_d1",
    "nn3_d1_d1",
    "nn3_d1_d2",
    "nn3_d1_d3",
    "nn3_d2",
    "nn3_d2_d2",
    "nn3_d2_d3",
    "nn3_d3",
    "nn3_d3_d3",
    "nn4",
    "nn4_d1",
    "nn4_d1_d1",
    "nn4_d1_d2",
    "nn4_d1_d3",
    "nn4_d1_d4",
    "nn4_d2",
    "nn4_d2_d2",
    "nn4_d2_d3",
    "nn4_d2_d4",
    "nn4_d3",
    "nn4_d3_d3",
    "nn4_d3_d4",
    "nn4_d4",
    "nn4_d4_d4",
    "nnControl",
    "nnEval",
    "nnnpars",
    "nnprobe",
    "nnWeights"
  ],
  "_help": [
    {
      "page": "nn",
      "title": "Neural-network term for an rxode2/nlmixr2 model",
      "topics": [
        "nn"
      ]
    },
    {
      "page": "nnControl",
      "title": "Neural-network training schedule for `nlmixr2nn`",
      "topics": [
        "nnControl"
      ]
    },
    {
      "page": "nnEval",
      "title": "Evaluate a model's neural network at chosen inputs",
      "topics": [
        "nnEval"
      ]
    },
    {
      "page": "nnWeights",
      "title": "Network weights carried by a model or fit",
      "topics": [
        "nnWeights"
      ]
    },
    {
      "page": "plot.nlmixr2nnEval",
      "title": "Plot a network's learned function",
      "topics": [
        "plot.nlmixr2nnEval"
      ]
    }
  ],
  "_pkglogo": "https://github.com/nlmixr2/nlmixr2nn/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/nlmixr2/nlmixr2nn/raw/HEAD/README.md",
  "_rundeps": [
    "armadillo4r",
    "backports",
    "BH",
    "cachem",
    "checkmate",
    "cli",
    "cpp11",
    "cpp4r",
    "crayon",
    "data.table",
    "digest",
    "dparser",
    "evaluate",
    "farver",
    "fastmap",
    "ggplot2",
    "glue",
    "gtable",
    "highr",
    "inline",
    "isoband",
    "knitr",
    "L0Learn",
    "labeling",
    "lattice",
    "lbfgsb3c",
    "lifecycle",
    "lotri",
    "magrittr",
    "MASS",
    "Matrix",
    "memoise",
    "minqa",
    "mirai",
    "n1qn1",
    "nanonext",
    "nlme",
    "nlmixr2data",
    "nlmixr2est",
    "numDeriv",
    "plyr",
    "PreciseSums",
    "qs2",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "RcppParallel",
    "RcppTrust",
    "reshape2",
    "rex",
    "rlang",
    "rxode2",
    "rxode2lincmt",
    "rxode2ll",
    "S7",
    "scales",
    "sitmo",
    "StanHeaders",
    "stringfish",
    "stringi",
    "stringr",
    "symengine",
    "sys",
    "vctrs",
    "viridisLite",
    "withr",
    "xfun",
    "yaml"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "nlmixr2nn-internals.Rmd",
      "filename": "nlmixr2nn-internals.html",
      "title": "Inside nlmixr2nn",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The shape of it",
        "Parse time: where the weights come from",
        "Getting a value out of a UDF",
        "The weight-block offset: the sharpest edge here",
        "Cotangent capture",
        "Which score is used, and why",
        "Model augmentation",
        "The training backend",
        "Persistence",
        "Things that look safe and are not",
        "The weight penalty",
        "Lambda is a fraction, not an amount",
        "Extending",
        "Where to look when something is wrong"
      ],
      "created": "2026-08-17 23:52:30",
      "modified": "2026-09-20 21:07:42",
      "commits": 5
    },
    {
      "source": "nlmixr2nn.Rmd",
      "filename": "nlmixr2nn.html",
      "title": "Neural networks in nlmixr2 models",
      "engine": "knitr::rmarkdown",
      "headings": [
        "What nn() is",
        "Simulating a model you have not fitted",
        "Learning a term you do not know (UDE)",
        "Letting the network find a covariate relationship",
        "A model with no between-subject variability",
        "Saving, reloading and refitting",
        "When you want to steer the training",
        "Regularization, when a network learns too much",
        "What is supported"
      ],
      "created": "2026-07-11 14:11:38",
      "modified": "2026-09-20 21:07:42",
      "commits": 23
    },
    {
      "source": "nlmixr2nn-node.Rmd",
      "filename": "nlmixr2nn-node.html",
      "title": "Neural ODEs and nlmixr2nn: what carries over",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The problem is not the same one",
        "Sensitivities: forward, not adjoint",
        "What that costs, and what follows from it",
        "Regularization",
        "The kinetic term",
        "Augmentation, and a limit worth knowing",
        "What is deliberately absent",
        "References"
      ],
      "created": "2026-09-03 01:57:18",
      "modified": "2026-09-15 23:35:14",
      "commits": 4
    }
  ],
  "_score": 4.021189299069938,
  "_indexed": true,
  "_nocasepkg": "nlmixr2nn",
  "_universes": [
    "nlmixr2",
    "mattfidler"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:43:03.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/70c9d612162c68c787a58c798fb833b434bf5606a1fa1b8e6c47b4912274db6b",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:43:07.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/31df50e20df1e98e8fd71bfafe745f2e83976e85dc783cb391b462eed6d694c2",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:42:24.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/9490794432f4919281535e13049354b33c7e35a83cb58637aa8469d8c05182a1",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:42:49.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/23b857ce7c8e039b368c55a6667ba4139712d2e18b024df63b9fc209feba229c",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:52:42.000Z",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/8bd0e3a9c66d27b40d2c92c681e5fc802e8f5973514ded8000363c988caef2ac",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:53:51.000Z",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/44d8183b859df8a83036f9e0f12e9f66a2bcac49d659e871f8dc904010428700",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:52:47.000Z",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/bd60a53214cd767818577d79b0b2f15130ceeac9c82f7bd0ed52dc24abe978ef",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:53:03.000Z",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/a03e033b56b05a23533bd6b459dab263f22ad626d6ba18f54a287539fc00fb86",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:42:46.000Z",
      "arch": "emscripten",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/87b0e7c6c86280359901d0d8e90c9e11b0d90dbc895ad18fb0477395cb2322bd",
      "status": "success",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:44:39.000Z",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/9eb55490501b32b072a174990a7d97187c02a26aeee372a5d98e0a101cc6e171",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:41:54.000Z",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/08a7ab8b72cb277c5c8664622c38149b45541d8f45dcc2dbbecf34baaba5b0fb",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:41:32.000Z",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/de8c8b64a05be7a804e4a5bd01b130dbbf23be9b4d9713830d8e51b53ba03e84",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:43:12.000Z",
      "arch": "aarch64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/1a14a19fce8156804a7b421995da7393e977aa144ca1c1449df9335ff0ca64a9",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-13T20:41:28.000Z",
      "arch": "x86_64",
      "commit": "d2b9e8bbfe5528fa25d2eebd8aad7a624e997ade",
      "fileid": "https://r2.ropensci.org/5384d0635e43945b437369538c15193adb88be8bab9e831aca631a06602eda6a",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/nlmixr2/actions/runs/38463843780"
    }
  ]
}