diff --git a/.Rbuildignore b/.Rbuildignore
index 3912071..ac00a31 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,3 +1,6 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
+^_pkgdown\.yml$
+^docs$
+^pkgdown$
diff --git a/.gitignore b/.gitignore
index 99772d0..8e1b575 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
extras/**
results
config.yml
+docs
diff --git a/R/Dataset.R b/R/Dataset.R
index 3a674c9..e5a04ea 100644
--- a/R/Dataset.R
+++ b/R/Dataset.R
@@ -66,9 +66,13 @@ Dataset <- torch::dataset(
numericalData <-numericalData %>% group_by(columnId) %>% mutate(newId = dplyr::cur_group_id())
indices <- torch::torch_tensor(cbind(numericalData$rowId, numericalData$newId), dtype=torch::torch_long())$t_()
values <- torch::torch_tensor(numericalData$covariateValue,dtype=torch::torch_float32())
+ tryCatch({
self$num <- torch::torch_sparse_coo_tensor(indices=indices,
values=values,
- size=c(max(dataCat$rowId),sum(numericalIndex)))$to_dense()
+ size=c(max(dataCat$rowId),sum(numericalIndex)))$to_dense()},
+ error= function(e) {
+ browser()
+ })
}
},
diff --git a/_pkgdown.yml b/_pkgdown.yml
new file mode 100644
index 0000000..18d2870
--- /dev/null
+++ b/_pkgdown.yml
@@ -0,0 +1,33 @@
+template:
+ params:
+ bootswatch: cosmo
+
+home:
+ links:
+ - text: Ask a question
+ href: http://forums.ohdsi.org
+
+navbar:
+ structure:
+ left:
+ - home
+ - intro
+ - reference
+ - articles
+ right: [hades, github]
+ components:
+ home:
+ icon: fa-home fa-lg
+ href: index.html
+ reference:
+ text: Reference
+ href: reference/index.html
+ intro:
+ text: Get started
+ href: articles/Installing.html
+ github:
+ icon: fa-github fa-lg
+ href: https://github.com/OHDSI/PatientLevelPrediction
+ hades:
+ text: hadesLogo
+ href: https://ohdsi.github.io/Hades
diff --git a/docs/404.html b/docs/404.html
index 3ec4440..88c335b 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -6,7 +6,7 @@
Page not found (404) • DeepPatientLevelPrediction
-
+
@@ -38,6 +38,15 @@
-
-
+
+
+
+
+
diff --git a/docs/articles/BuildingDeepModels.html b/docs/articles/BuildingDeepModels.html
index aa817f7..c127eb4 100644
--- a/docs/articles/BuildingDeepModels.html
+++ b/docs/articles/BuildingDeepModels.html
@@ -6,7 +6,7 @@
Building Deep Learning Models • DeepPatientLevelPrediction
-
+
@@ -39,6 +39,15 @@
-
-
+
+
+
+
+
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 4164766..6b0ffe5 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -1,5 +1,5 @@
-Articles • DeepPatientLevelPrediction Articles • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
diff --git a/docs/authors.html b/docs/authors.html
index 17341ad..b95df95 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -1,5 +1,5 @@
-Authors and Citation • DeepPatientLevelPrediction Authors and Citation • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/index.html b/docs/index.html
index 13a6ff4..f10907e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -6,7 +6,7 @@
Deep learning function for patient level prediction using data in the OMOP Common Data Model • DeepPatientLevelPrediction
-
+
@@ -39,6 +39,15 @@
-
-
+
+
+
+
+
@@ -155,6 +170,7 @@ Links
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 7987001..fdc0243 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -3,5 +3,6 @@ pkgdown: 2.0.6
pkgdown_sha: ~
articles:
BuildingDeepModels: BuildingDeepModels.html
-last_built: 2022-07-25T09:40Z
+ Installing: Installing.html
+last_built: 2022-07-25T13:39Z
diff --git a/docs/reference/Dataset.html b/docs/reference/Dataset.html
index f546ff2..66b7cb9 100644
--- a/docs/reference/Dataset.html
+++ b/docs/reference/Dataset.html
@@ -1,5 +1,5 @@
-A torch dataset — Dataset • DeepPatientLevelPrediction A torch dataset — Dataset • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/DeepPatientLevelPrediction.html b/docs/reference/DeepPatientLevelPrediction.html
index 47687ac..88c9c9c 100644
--- a/docs/reference/DeepPatientLevelPrediction.html
+++ b/docs/reference/DeepPatientLevelPrediction.html
@@ -1,5 +1,5 @@
-DeepPatientLevelPrediction — DeepPatientLevelPrediction • DeepPatientLevelPrediction DeepPatientLevelPrediction — DeepPatientLevelPrediction • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/EarlyStopping.html b/docs/reference/EarlyStopping.html
index 2b523e5..73e2811 100644
--- a/docs/reference/EarlyStopping.html
+++ b/docs/reference/EarlyStopping.html
@@ -1,5 +1,5 @@
-Earlystopping class — EarlyStopping • DeepPatientLevelPrediction Earlystopping class — EarlyStopping • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/Estimator.html b/docs/reference/Estimator.html
index 0fcb265..810ef7a 100644
--- a/docs/reference/Estimator.html
+++ b/docs/reference/Estimator.html
@@ -1,5 +1,5 @@
-Estimator — Estimator • DeepPatientLevelPrediction Estimator — Estimator • DeepPatientLevelPrediction Double layer neural network — doubleLayerNN • DeepPatientLevelPrediction Double layer neural network — doubleLayerNN • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/fitDeepNNTorch.html b/docs/reference/fitDeepNNTorch.html
index df504dd..7d3cf55 100644
--- a/docs/reference/fitDeepNNTorch.html
+++ b/docs/reference/fitDeepNNTorch.html
@@ -1,5 +1,5 @@
-Fits a deep neural network — fitDeepNNTorch • DeepPatientLevelPrediction Fits a deep neural network — fitDeepNNTorch • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/fitEstimator.html b/docs/reference/fitEstimator.html
index 0891694..c26d5d4 100644
--- a/docs/reference/fitEstimator.html
+++ b/docs/reference/fitEstimator.html
@@ -1,5 +1,5 @@
-fitEstimator — fitEstimator • DeepPatientLevelPrediction fitEstimator — fitEstimator • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/gridCvDeep.html b/docs/reference/gridCvDeep.html
index ff931e9..689ec82 100644
--- a/docs/reference/gridCvDeep.html
+++ b/docs/reference/gridCvDeep.html
@@ -1,5 +1,5 @@
-gridCvDeep — gridCvDeep • DeepPatientLevelPrediction gridCvDeep — gridCvDeep • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 34ad2eb..3f9d852 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -1,5 +1,5 @@
-Function reference • DeepPatientLevelPrediction Function reference • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/predictDeepEstimator.html b/docs/reference/predictDeepEstimator.html
index 636cd4d..87f8324 100644
--- a/docs/reference/predictDeepEstimator.html
+++ b/docs/reference/predictDeepEstimator.html
@@ -1,5 +1,5 @@
-predictDeepEstimator — predictDeepEstimator • DeepPatientLevelPrediction predictDeepEstimator — predictDeepEstimator • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/predictDeepNN.html b/docs/reference/predictDeepNN.html
index d527098..ff56957 100644
--- a/docs/reference/predictDeepNN.html
+++ b/docs/reference/predictDeepNN.html
@@ -1,5 +1,5 @@
-Create predictions for a deep neural network — predictDeepNN • DeepPatientLevelPrediction Create predictions for a deep neural network — predictDeepNN • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/setDeepNNTorch.html b/docs/reference/setDeepNNTorch.html
index 268419d..950da32 100644
--- a/docs/reference/setDeepNNTorch.html
+++ b/docs/reference/setDeepNNTorch.html
@@ -1,5 +1,5 @@
-settings for a Deep neural network — setDeepNNTorch • DeepPatientLevelPrediction settings for a Deep neural network — setDeepNNTorch • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/setResNet.html b/docs/reference/setResNet.html
index e030a95..dfee075 100644
--- a/docs/reference/setResNet.html
+++ b/docs/reference/setResNet.html
@@ -1,5 +1,5 @@
-setResNet — setResNet • DeepPatientLevelPrediction setResNet — setResNet • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/setTransformer.html b/docs/reference/setTransformer.html
index 7234e5a..5738af4 100644
--- a/docs/reference/setTransformer.html
+++ b/docs/reference/setTransformer.html
@@ -1,5 +1,5 @@
-create settings for training a non-temporal transformer — setTransformer • DeepPatientLevelPrediction create settings for training a non-temporal transformer — setTransformer • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/singleLayerNN.html b/docs/reference/singleLayerNN.html
index 362cb2b..8e65b42 100644
--- a/docs/reference/singleLayerNN.html
+++ b/docs/reference/singleLayerNN.html
@@ -1,5 +1,5 @@
-A single layer neural network — singleLayerNN • DeepPatientLevelPrediction A single layer neural network — singleLayerNN • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/reference/tripleLayerNN.html b/docs/reference/tripleLayerNN.html
index d9e9aa3..d832580 100644
--- a/docs/reference/tripleLayerNN.html
+++ b/docs/reference/tripleLayerNN.html
@@ -1,5 +1,5 @@
-Triple layer neural network — tripleLayerNN • DeepPatientLevelPrediction Triple layer neural network — tripleLayerNN • DeepPatientLevelPrediction
@@ -23,6 +23,15 @@
-
-
+
+
+
+
+
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 0dd9092..0198676 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -6,6 +6,9 @@
/articles/BuildingDeepModels.html
+
+ /articles/Installing.html
+
/articles/index.html
diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R
index 6982e96..44ebe5a 100644
--- a/tests/testthat/setup.R
+++ b/tests/testthat/setup.R
@@ -79,6 +79,7 @@ trainData <- PatientLevelPrediction::splitData(
population = population,
splitSettings = PatientLevelPrediction::createDefaultSplitSetting()
)
+
mappedData <- PatientLevelPrediction:::MapIds(
covariateData = trainData$Train$covariateData,
cohort = trainData$Train$labels