From 0a9bce12dc7301c08edefb48ed9aacda467b3a34 Mon Sep 17 00:00:00 2001 From: Egill Fridgeirsson Date: Mon, 25 Jul 2022 18:16:25 +0200 Subject: [PATCH] fix numericalData edgecase and build pkgdown site --- R/Dataset.R | 6 +- _pkgdown.yml | 2 +- docs/404.html | 4 +- docs/articles/BuildingDeepModels.html | 4 +- .../header-attrs-2.11/header-attrs.js | 12 - docs/articles/index.html | 4 +- docs/authors.html | 4 +- docs/index.html | 4 +- docs/pkgdown.yml | 2 +- docs/reference/Dataset.html | 4 +- .../reference/DeepPatientLevelPrediction.html | 4 +- docs/reference/EarlyStopping.html | 4 +- docs/reference/Estimator.html | 4 +- docs/reference/Rplot001.png | Bin 1011 -> 0 bytes docs/reference/doubleLayerNN.html | 4 +- docs/reference/fitDeepNNTorch.html | 4 +- docs/reference/fitEstimator.html | 4 +- docs/reference/fitResNet_plp5.html | 191 ------- docs/reference/gridCvDeep.html | 4 +- docs/reference/index.html | 4 +- docs/reference/predictAndromeda.html | 205 -------- docs/reference/predictDeepEstimator.html | 4 +- docs/reference/predictDeepNN.html | 4 +- docs/reference/predictPlp.html | 190 ------- docs/reference/predictProbabilities.html | 187 ------- docs/reference/setCIReNN.html | 298 ----------- docs/reference/setCNNTorch.html | 201 -------- docs/reference/setCovNN.html | 223 -------- docs/reference/setCovNN2.html | 223 -------- docs/reference/setDeepNN.html | 213 -------- docs/reference/setDeepNNTorch.html | 4 +- docs/reference/setRNNTorch.html | 200 ------- docs/reference/setResNet.html | 4 +- docs/reference/setResNet_plp5.html | 251 --------- docs/reference/setTransformer.html | 4 +- docs/reference/singleLayerNN.html | 4 +- docs/reference/toSparseMDeep.html | 214 -------- docs/reference/toSparseRTorch.html | 202 -------- docs/reference/transferLearning.html | 231 --------- docs/reference/tripleLayerNN.html | 4 +- docs/sitemap.xml | 42 -- vignettes/BuildingDeepModels.log | 487 ------------------ 42 files changed, 45 insertions(+), 3619 deletions(-) delete mode 100644 docs/articles/BuildingDeepModels_files/header-attrs-2.11/header-attrs.js delete mode 100644 docs/reference/Rplot001.png delete mode 100644 docs/reference/fitResNet_plp5.html delete mode 100644 docs/reference/predictAndromeda.html delete mode 100644 docs/reference/predictPlp.html delete mode 100644 docs/reference/predictProbabilities.html delete mode 100644 docs/reference/setCIReNN.html delete mode 100644 docs/reference/setCNNTorch.html delete mode 100644 docs/reference/setCovNN.html delete mode 100644 docs/reference/setCovNN2.html delete mode 100644 docs/reference/setDeepNN.html delete mode 100644 docs/reference/setRNNTorch.html delete mode 100644 docs/reference/setResNet_plp5.html delete mode 100644 docs/reference/toSparseMDeep.html delete mode 100644 docs/reference/toSparseRTorch.html delete mode 100644 docs/reference/transferLearning.html delete mode 100644 vignettes/BuildingDeepModels.log diff --git a/R/Dataset.R b/R/Dataset.R index e5a04ea..eef9703 100644 --- a/R/Dataset.R +++ b/R/Dataset.R @@ -66,13 +66,9 @@ 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()}, - error= function(e) { - browser() - }) + size=c(self$target$shape,sum(numericalIndex)))$to_dense() } }, diff --git a/_pkgdown.yml b/_pkgdown.yml index 18d2870..a552c95 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -27,7 +27,7 @@ navbar: href: articles/Installing.html github: icon: fa-github fa-lg - href: https://github.com/OHDSI/PatientLevelPrediction + href: https://github.com/OHDSI/DeepPatientLevelPrediction hades: text: hadesLogo href: https://ohdsi.github.io/Hades diff --git a/docs/404.html b/docs/404.html index 88c335b..cb0fddc 100644 --- a/docs/404.html +++ b/docs/404.html @@ -68,10 +68,10 @@