Skip to content

Commit

Permalink
Version 6.3.8 (#446)
Browse files Browse the repository at this point in the history
* new external validation function based on validationDesign

* fix imports of sklearn modules and classes (#442)

* remove version from is_installed (#444)

* fix NOTES about documentation

* preserve randomness in table generation in tests
  • Loading branch information
egillax authored Apr 26, 2024
1 parent 9e37b51 commit c5176a2
Show file tree
Hide file tree
Showing 118 changed files with 4,561 additions and 2,745 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ compare_versions
docs/*
_pkgdown.yml
^vignettes/articles$
^doc$
^Meta$
12 changes: 6 additions & 6 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
CDM5_SQL_SERVER_USER: ${{ secrets.CDM5_SQL_SERVER_USER }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -66,7 +66,7 @@ jobs:
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))')
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -81,7 +81,7 @@ jobs:

- name: Upload source package
if: success() && runner.os == 'macOS' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: package_tarball
path: check/*.tar.gz
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -136,7 +136,7 @@ jobs:
draft: false
prerelease: false

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
if: ${{ env.new_version != '' }}

- name: Install drat
Expand All @@ -152,7 +152,7 @@ jobs:
- name: Download package tarball
if: ${{ env.new_version != '' }}
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package_tarball

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/R_CMD_check_main_weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ standalone/build/*
/python_models/*
/mycache/*
/inst/shiny/DiagnosticsExplorer/rsconnect/*
/doc/
/Meta/
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: PatientLevelPrediction
Type: Package
Title: Developing patient level prediction using data in the OMOP Common Data
Model
Version: 6.3.7
Date: 2024-04-04
Version: 6.3.8
Date: 2024-04-26
Authors@R: c(
person("Jenna", "Reps", email = "[email protected]", role = c("aut", "cre")),
person("Martijn", "Schuemie", role = c("aut")),
Expand Down Expand Up @@ -71,7 +71,6 @@ Suggests:
lightgbm
Remotes:
ohdsi/BigKnn,
ohdsi/Eunomia,
ohdsi/FeatureExtraction,
ohdsi/ShinyAppBuilder,
ohdsi/ResultModelManager,
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export(createStudyPopulation)
export(createStudyPopulationSettings)
export(createTempModelLoc)
export(createUnivariateFeatureSelection)
export(createValidationDesign)
export(createValidationSettings)
export(diagnoseMultiplePlp)
export(diagnosePlp)
Expand Down Expand Up @@ -110,6 +111,7 @@ export(sklearnFromJson)
export(sklearnToJson)
export(splitData)
export(toSparseM)
export(validateExternal)
export(validateMultiplePlp)
export(viewDatabaseResultPlp)
export(viewMultiplePlp)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
PatientLevelPrediction 6.3.8
======================
- Add support for R4.4
- Fix notes around documentation (vignette engine and brackets in itemize)
- Use webp image format where possible (not in pdfs) for smaller size
- Make sure random table names are unique in tests
- Remove remote info for Eunomia since it's in CRAN

PatientLevelPrediction 6.3.7
======================
- Clean up dependencies, tibble removed and IHT and ParallelLogger from CRAN
Expand Down
4 changes: 3 additions & 1 deletion R/AdditionalCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#' @param aggregated whether the covariate should be aggregated
#' @param cohortIds cohort id for the target cohort
#' @param covariateSettings settings for the covariate cohorts and time periods
#' @param ... additional arguments from FeatureExtraction
#'
#' @return
#' The models will now be in the package
Expand All @@ -46,7 +47,8 @@ getCohortCovariateData <- function(
rowIdField = "row_id",
aggregated,
cohortIds,
covariateSettings
covariateSettings,
...
){

# Some SQL to construct the covariate:
Expand Down
24 changes: 12 additions & 12 deletions R/DataSplitting.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


#' Create the settings for defining how the plpData are split into test/validation/train sets using
#' default splitting functions (either random stratified by outcome, time or subject splitting).
#' default splitting functions (either random stratified by outcome, time or subject splitting)
#'
#' @details
#' Returns an object of class \code{splitSettings} that specifies the splitting function that will be called and the settings
Expand All @@ -28,9 +28,9 @@
#' @param nfold (numeric) An integer > 1 specifying the number of folds used in cross validation
#' @param splitSeed (numeric) A seed to use when splitting the data for reproducibility (if not set a random number will be generated)
#' @param type (character) Choice of: \itemize{
#' \item{'stratified'}{ Each data point is randomly assigned into the test or a train fold set but this is done stratified such that the outcome rate is consistent in each partition }
#' \item{'time')}{ Older data are assigned into the training set and newer data are assigned into the test set}
#' \item{'subject'}{ Data are partitioned by subject, if a subject is in the data more than once, all the data points for the subject are assigned either into the test data or into the train data (not both).}
#' \item'stratified' Each data point is randomly assigned into the test or a train fold set but this is done stratified such that the outcome rate is consistent in each partition
#' \item'time' Older data are assigned into the training set and newer data are assigned into the test set
#' \item'subject' Data are partitioned by subject, if a subject is in the data more than once, all the data points for the subject are assigned either into the test data or into the train data (not both).
#' }
#'
#' @return
Expand Down Expand Up @@ -87,17 +87,17 @@ createDefaultSplitSetting <- function(testFraction=0.25,
#'
#' @details
#' Returns a list containing the training data (Train) and optionally the test data (Test). Train is an Andromeda object containing
#' \itemize{\item{covariates}{ a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the train data }
#' \item{covariateRef}{ a table with the covariate information}
#' \item{labels)}{ a table (rowId, outcomeCount, ...) for each data point in the train data (outcomeCount is the class label) }
#' \item{folds}{ a table (rowId, index) specifying which training fold each data point is in.}
#' \itemize{\item covariates: a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the train data
#' \item covariateRef: a table with the covariate information
#' \item labels: a table (rowId, outcomeCount, ...) for each data point in the train data (outcomeCount is the class label)
#' \item folds: a table (rowId, index) specifying which training fold each data point is in.
#' }
#' Test is an Andromeda object containing
#' \itemize{\item{covariates}{ a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the test data }
#' \item{covariateRef}{ a table with the covariate information}
#' \item{labels)}{ a table (rowId, outcomeCount, ...) for each data point in the test data (outcomeCount is the class label) }
#' \itemize{\item covariates: a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the test data
#' \item covariateRef: a table with the covariate information
#' \item labels: a table (rowId, outcomeCount, ...) for each data point in the test data (outcomeCount is the class label)
#' }
#'
#'
#'
#'
#' @param plpData An object of type \code{plpData} - the patient level prediction
Expand Down
16 changes: 6 additions & 10 deletions R/DiagnosePlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,12 @@ diagnoseMultiplePlp <- function(
#' and whether to normalise the covariates before training
#' @param modelSettings An object of class \code{modelSettings} created using one of the function:
#' \itemize{
#' \item{setLassoLogisticRegression()}{ A lasso logistic regression model}
#' \item{setGradientBoostingMachine()}{ A gradient boosting machine}
#' \item{setAdaBoost()}{ An ada boost model}
#' \item{setRandomForest()}{ A random forest model}
#' \item{setDecisionTree()}{ A decision tree model}
#' \item{setCovNN())}{ A convolutional neural network model}
#' \item{setCIReNN()}{ A recurrent neural network model}
#' \item{setMLP()}{ A neural network model}
#' \item{setDeepNN()}{ A deep neural network model}
#' \item{setKNN()}{ A KNN model}
#' \item setLassoLogisticRegression() A lasso logistic regression model
#' \item setGradientBoostingMachine() A gradient boosting machine
#' \item setAdaBoost() An ada boost model
#' \item setRandomForest() A random forest model
#' \item setDecisionTree() A decision tree model
#' \item setKNN() A KNN model
#'
#' }
#' @param logSettings An object of \code{logSettings} created using \code{createLogSettings}
Expand Down
Loading

0 comments on commit c5176a2

Please sign in to comment.