Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 2.0.0 #87

Open
wants to merge 449 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
449 commits
Select commit Hold shift + click to select a range
f142828
Added check to prevent recalibration if not all predictions are valid.
alexzwanenburg Jan 19, 2024
76dfcd6
Checked xgboost learners.
alexzwanenburg Jan 19, 2024
9d4e227
Updated correlation VIMP unit test.
alexzwanenburg Jan 19, 2024
4a9c83b
Update glmnet VIMP unit test.
alexzwanenburg Jan 19, 2024
8e6e5d9
Regression VIMP now works correctly.
alexzwanenburg Jan 19, 2024
ad5e24a
Added test to check that different ranks are assigned.
alexzwanenburg Jan 19, 2024
1165285
get_placeholder_prediction_table has been removed.
alexzwanenburg Jan 19, 2024
008e7dd
Deprecated ..predict_survival_probability, which has been fully absor…
alexzwanenburg Jan 19, 2024
9039b28
Novelty predictors are now generated with additional info.
alexzwanenburg Jan 22, 2024
ef44ef8
Renamed test-predict.
alexzwanenburg Jan 22, 2024
ddaeb11
Added .as_prediction_table_argument.
alexzwanenburg Jan 23, 2024
6f0985c
Outcome event markers in synthetic datasets are now fully reproducible.
alexzwanenburg Jan 24, 2024
7e500cb
Add piping for novelty detectors.
alexzwanenburg Jan 24, 2024
5a875ec
Further improvements to processing novelty detectors.
alexzwanenburg Jan 24, 2024
e817367
Fixed tests.
alexzwanenburg Jan 24, 2024
079e8ee
Updated news.
alexzwanenburg Jan 23, 2024
a5b71b6
Update CITATION files to use bibentry.
alexzwanenburg Jan 23, 2024
926a44b
Update cran-comments.md
alexzwanenburg Jan 23, 2024
26c4552
Update cran-comments.md
alexzwanenburg Jan 24, 2024
c761933
Fixed Rd \usage section NOTES
alexzwanenburg Jan 24, 2024
61224e3
WIP on exporting prediction tables
alexzwanenburg Jan 24, 2024
e46e648
Moved export_prediction_data from FamiliarDataComputationPredictionDa…
alexzwanenburg Jan 26, 2024
edff469
Added checks for empty prediction tables.
alexzwanenburg Jan 26, 2024
a6dadd4
Fixed a missing outcome_type argument.
alexzwanenburg Jan 26, 2024
06b2a7e
Updated test to check the correct columns.
alexzwanenburg Feb 10, 2024
2fff4b1
Created .get_default_time_max function to make sure that a default ti…
alexzwanenburg Feb 11, 2024
c2ab8e7
as_data_object method for data.table populates settings$eval$time_max…
alexzwanenburg Feb 11, 2024
dfe0465
Replaced references to risk_group by group.
alexzwanenburg Feb 11, 2024
b39c970
Fixed erroneous attribute check in filter_missing_outcome for predict…
alexzwanenburg Feb 11, 2024
ae298c6
Added outcome_type as argument to filter_missing_outcome to override …
alexzwanenburg Feb 11, 2024
eefd2a7
remove_nonvalid_predictions is now deprecated.
alexzwanenburg Feb 11, 2024
e29002e
Updated plot kaplan meier plots to work with new prediction tables.
alexzwanenburg Feb 11, 2024
5574733
Reformulated plot_ice_b test.
alexzwanenburg Feb 11, 2024
4b310f4
Pass time to survival probability tables.
alexzwanenburg Feb 11, 2024
684741d
Add test for survival probability prediction tables.
alexzwanenburg Feb 11, 2024
2389cc9
WIP on plot_ice
alexzwanenburg Feb 11, 2024
a9371a7
ICE plots now work with the new system.
alexzwanenburg Feb 13, 2024
523b241
Fixed an incorrect check.
alexzwanenburg Feb 13, 2024
5d161db
Fixed remaining issues with calibration plots.
alexzwanenburg Feb 13, 2024
50e8a1d
Update FamiliarDataComputationCalibrationData.R
alexzwanenburg Feb 13, 2024
bf9ed89
Fixes for calibration plots to work with prediction tables directly.
alexzwanenburg Feb 14, 2024
13728ac
Fixed n_groups to 1.
alexzwanenburg Feb 14, 2024
1964aa9
Added .create_outcome_info method.
alexzwanenburg Feb 14, 2024
3c4760d
Add possibility to set learner and vimp method for prediction tables.
alexzwanenburg Feb 14, 2024
f3548a5
update to test_plot_ordering.
alexzwanenburg Feb 14, 2024
ce617f4
The model object is now passed to the prediction tables, where relevant.
alexzwanenburg Feb 15, 2024
d6102e4
outcome_info is now passed correctly.
alexzwanenburg Feb 15, 2024
5c5bf19
Added check to .merge_slots_into_data that checks whether the data ar…
alexzwanenburg Feb 15, 2024
5204119
Updated calibration plot unit test to avoid survival.
alexzwanenburg Feb 15, 2024
47713e3
Debugged plotting of confusion matrices.
alexzwanenburg Feb 15, 2024
f210b9b
Debugged decision curve plots.
alexzwanenburg Feb 15, 2024
064b04b
Can pass through the prediction type for test_plot_ordering.
alexzwanenburg Feb 16, 2024
cf4d3b8
Provide earlier check on object class for decision curves.
alexzwanenburg Feb 16, 2024
6ed3773
Add evaluation time when providing a survival probability table.
alexzwanenburg Feb 16, 2024
991169b
Pass correct object to as_prediction_table when computing survival pr…
alexzwanenburg Feb 16, 2024
3098496
Enabled unit test for assessing calibration plots of survival probabi…
alexzwanenburg Feb 16, 2024
44847aa
Prevent returning early NULL when creating risk stratification tables.
alexzwanenburg Feb 16, 2024
b8d60e3
Add details to risk group stratification data to allow for plotting.
alexzwanenburg Feb 16, 2024
4e820c0
Update test-plot_kaplan_meier_curve.R
alexzwanenburg Feb 16, 2024
1312e81
Added unit tests for prediction tables.
alexzwanenburg Feb 16, 2024
7543bf1
Various fixes
alexzwanenburg Feb 16, 2024
8614903
Prevent notes due to coro.
alexzwanenburg Feb 16, 2024
c14655a
Updated experiment_data unit test to work with new test data.
alexzwanenburg Feb 17, 2024
1d24b03
Updated test-as_data_object unit test.
alexzwanenburg Feb 17, 2024
ede2d43
Code organisation.
alexzwanenburg Feb 19, 2024
ac3dc31
Added check on class of outcome_info.
alexzwanenburg Feb 19, 2024
b5ed367
Fully deprecated remove_missing_outcomes.
alexzwanenburg Feb 19, 2024
82a72ca
Identifiers may not always line up perfectly, so add fill.
alexzwanenburg Feb 19, 2024
d4e0f45
Add additional checks on input arguments to as_prediction_table.
alexzwanenburg Feb 19, 2024
6c37cf4
Updated test-export_ice to current datasets,
alexzwanenburg Feb 19, 2024
3f168e5
Updated test-train_familiar to current datasets.
alexzwanenburg Feb 19, 2024
17d0008
Fixed an error caused by collision of sample / feature and instance n…
alexzwanenburg Feb 27, 2024
aa87158
Added bug fix to the correct release.
alexzwanenburg Feb 27, 2024
0748417
Computing metric baseline values for repeated measurements now works.
alexzwanenburg Feb 27, 2024
a131905
Updated values to accomodate current datasets.
alexzwanenburg Feb 27, 2024
4e972e5
Added fall-back methods for NULL objects.
alexzwanenburg Feb 27, 2024
b0146b7
Updated linters.
alexzwanenburg Feb 27, 2024
96ec329
Fixed linting issues.
alexzwanenburg Feb 27, 2024
dc5c566
Fixed linting issues.
alexzwanenburg Feb 27, 2024
fa659a5
Fixed linting issues.
alexzwanenburg Feb 27, 2024
554ddae
Fixed linter issues.
alexzwanenburg Feb 28, 2024
d625145
Conversion of stop to ..error and rlang::abort.
alexzwanenburg Feb 28, 2024
b14021e
Fixed linting issues.
alexzwanenburg Feb 28, 2024
0726fa2
Fixes linter issues.
alexzwanenburg Feb 28, 2024
bc54f41
Fixed linter issues.
alexzwanenburg Mar 1, 2024
5f13b95
Fixed linter issues.
alexzwanenburg Mar 1, 2024
c7de7f3
Fixed linter issues.
alexzwanenburg Mar 2, 2024
e455eab
Fixed linter issues.
alexzwanenburg Mar 2, 2024
9c8ff5d
Fixed linter issues.
alexzwanenburg Mar 3, 2024
8dab16e
Update HyperparameterOptimisation.R
alexzwanenburg Mar 3, 2024
6996935
Fixed linter issues.
alexzwanenburg Mar 4, 2024
ec161ad
Fixed linter issues.
alexzwanenburg Mar 6, 2024
a65f390
Fixed linter issues.
alexzwanenburg Mar 7, 2024
e28a0c9
Fixed linter issues.
alexzwanenburg Mar 13, 2024
0b0f4c7
Fixed linting issues.
alexzwanenburg Mar 19, 2024
75b02cc
Fixed linter issues.
alexzwanenburg Mar 19, 2024
b5d0f45
Fixed linter issues.
alexzwanenburg Mar 21, 2024
2c7d4bc
Fixed linter issues.
alexzwanenburg Mar 21, 2024
4ab49d6
Fixed linting issues.
alexzwanenburg Mar 22, 2024
bf2cef5
Fixed remaining linter issues.
alexzwanenburg Mar 22, 2024
fdedd7d
Bring changes from 1.4.7 forward to version 2.0.0.
alexzwanenburg May 14, 2024
93a9753
Add test skips for tests that take too long on CI.
alexzwanenburg May 14, 2024
b6e7e4e
Add test skips for tests that take too long on CI.
alexzwanenburg May 14, 2024
90de12b
Fixed an incorrect check.
alexzwanenburg May 22, 2024
ca6db4f
Tests for hyperparameter tuning can now run a single (standard) confi…
alexzwanenburg May 22, 2024
ff6428b
Added tests for hyperparameter optimisation for variable importance m…
alexzwanenburg May 22, 2024
57369f9
Bring forward fix to integer feature errors from 1.4.9
alexzwanenburg Jun 3, 2024
f98bdd2
Merge branch 'master' into dev2.0.0
alexzwanenburg Sep 24, 2024
0c5e903
Bring forward newer additions.
alexzwanenburg Sep 24, 2024
233180b
Update cran-comments.
alexzwanenburg Sep 24, 2024
4ebf2d2
Bring forward changes to tests from 1.5.0 to 2.0.0.
alexzwanenburg Sep 24, 2024
e8ca121
Add documentation.
alexzwanenburg Sep 24, 2024
33681e8
Update DESCRIPTION
alexzwanenburg Sep 24, 2024
57108ce
Set correct winsorising fraction
alexzwanenburg Sep 24, 2024
17255b9
Fixed incorrect return and function in get_similarity_range
alexzwanenburg Sep 24, 2024
b90bda5
Panel widths remain flexible for composite plots.
alexzwanenburg Sep 24, 2024
7494ad3
Add code for updating transformation objects.
alexzwanenburg Sep 24, 2024
d13beb6
Add support for paletteer plotting palettes
alexzwanenburg Sep 24, 2024
80b0dde
Update description of discrete_palette.
alexzwanenburg Sep 24, 2024
b783f28
Add news on the paletteer package.
alexzwanenburg Sep 24, 2024
c9c7c3e
Update gradient_palette documentation.
alexzwanenburg Sep 24, 2024
b64dd40
Update NEWS.md
alexzwanenburg Sep 24, 2024
c0b3469
WIP on plausibility checks.
alexzwanenburg Sep 25, 2024
71cd53e
Added internal methods for computing AUC values.
alexzwanenburg Sep 27, 2024
a930df8
Concordance variable importance for categorical outcomes now use AUC-…
alexzwanenburg Sep 27, 2024
545fc5a
WIP on feature checks.
alexzwanenburg Sep 27, 2024
c295833
The `sample_similarity` evaluation element is now mentioned in the do…
alexzwanenburg Sep 27, 2024
04959f9
Added check on invariant features.
alexzwanenburg Oct 2, 2024
6057bff
WIP implementation and test for batch normality plausibility.
alexzwanenburg Oct 2, 2024
111dfd7
Added check on batch normalisation assumptions.
alexzwanenburg Oct 4, 2024
973008a
Added test for plausibility checks on data.
alexzwanenburg Oct 10, 2024
931d985
Added test for predicting from data with reordered columns.
alexzwanenburg Oct 11, 2024
ca63273
Added iteration seed as configuration parameter.
alexzwanenburg Oct 11, 2024
c93bb63
Replace feature selection by variable importance.
alexzwanenburg Oct 14, 2024
bddbccb
Replace references to feature selection by variable importance.
alexzwanenburg Oct 15, 2024
cc0cc92
WIP on translating the main data preprocessing, variable importance a…
alexzwanenburg Oct 25, 2024
e031368
Updated code to work more flexibly with input of data.
alexzwanenburg Oct 28, 2024
6585ae6
Renamed attribute name to task_name.
alexzwanenburg Oct 28, 2024
5d0dc12
Add task_id and n_tasks attributes to familiarTask
alexzwanenburg Oct 28, 2024
97d8cfa
Separate methods based on the provided data object.
alexzwanenburg Oct 28, 2024
d23ce23
Add some barebones initial support for fairness evaluations.
alexzwanenburg Oct 28, 2024
414464c
Add whitespace.
alexzwanenburg Oct 28, 2024
216d52e
Setup task generators for data preprocessing.
alexzwanenburg Oct 28, 2024
88f87dd
Populate .generate_vimp_tasks skeleton
alexzwanenburg Oct 28, 2024
959135c
Transfer LOOCV unit test.
alexzwanenburg Oct 29, 2024
6c5c27a
Check whether hybrid detail level can be used based on sample sizes.
alexzwanenburg Oct 29, 2024
e613e98
Add documentation on minimum number of samples for detail_level.
alexzwanenburg Oct 29, 2024
51122b4
Update documentation.
alexzwanenburg Oct 29, 2024
5f2bdca
Update NEWS.md
alexzwanenburg Oct 29, 2024
8693001
Further work on tasks.
alexzwanenburg Oct 30, 2024
f378d7f
WIP
alexzwanenburg Nov 1, 2024
862cb59
Implementation of task-oriented workflow within summon_familiar.
alexzwanenburg Nov 5, 2024
e61f81e
WIP on VIMP task and VIMP hyperparameter task.
alexzwanenburg Nov 5, 2024
cda9d41
WIP on getting VIMP-related task to work.
alexzwanenburg Nov 8, 2024
60fa280
Update TaskVimp.R
alexzwanenburg Nov 8, 2024
eb84245
Correct function arguments.
alexzwanenburg Nov 8, 2024
ea9c507
Added missing exit statements.
alexzwanenburg Nov 11, 2024
020b9e0
WIP on bringing variable importance computation online.
alexzwanenburg Nov 11, 2024
de01e19
Variable importance task now completes succesfully.
alexzwanenburg Nov 12, 2024
b793c41
Early work on learner tasks.
alexzwanenburg Nov 12, 2024
44ee4f9
All run tables are now passed to tasks to allow for identifying cross…
alexzwanenburg Nov 13, 2024
9c21bde
WIP on learner tasks.
alexzwanenburg Nov 13, 2024
1261568
WIP on train task.
alexzwanenburg Nov 15, 2024
3430875
Variable importance tables are now automatically recovered if they ar…
alexzwanenburg Nov 17, 2024
cc016a6
vimp hyperparameters are now passed to experiment_data
alexzwanenburg Nov 17, 2024
9510461
WIP on hyperparameter optimisation for learners.
alexzwanenburg Nov 17, 2024
97baae7
Models can now be generated using tasks.
alexzwanenburg Nov 18, 2024
c0a2a25
WIP on enabling experiments without an explicit feature selection step.
alexzwanenburg Nov 22, 2024
b81e1c8
WIP on feature selection-less training.
alexzwanenburg Nov 26, 2024
d1331de
Enabled training without explicit feature selection.
alexzwanenburg Dec 3, 2024
cf39f0d
WIP on evaluation tasks.
alexzwanenburg Dec 3, 2024
482b0ec
Fixed wrong argument name.
alexzwanenburg Dec 4, 2024
6b0aeac
WIP on evaluation tasks.
alexzwanenburg Dec 4, 2024
aa166ca
Added wrapper around .generate_test_collection.
alexzwanenburg Dec 5, 2024
97ebba4
WIP perform_task for evaluations.
alexzwanenburg Dec 5, 2024
c55cd72
WIP on #88
alexzwanenburg Dec 6, 2024
ff20b30
Implemented routines for delayedDataObject.
alexzwanenburg Dec 19, 2024
fb4c880
Fix incorrect class of data for method
alexzwanenburg Dec 19, 2024
2729584
WIP on data tasks.
alexzwanenburg Jan 2, 2025
d0b2db5
Naive models now yield the correct number of predicted values
alexzwanenburg Jan 3, 2025
7bf3990
Collections are now formed.
alexzwanenburg Jan 3, 2025
486d014
Export to file now works again.
alexzwanenburg Jan 3, 2025
728f17d
Added default names for datasets.
alexzwanenburg Jan 3, 2025
d969fd3
Deprecated Evaluation.R
alexzwanenburg Jan 3, 2025
5d991f3
Deprecated FeatureSelection.R
alexzwanenburg Jan 3, 2025
0888af1
Deprecated ModelBuilding.R
alexzwanenburg Jan 3, 2025
f2b407d
Revised how names are created and set for familiarEnsemble and famili…
alexzwanenburg Jan 3, 2025
1ca2331
Removed generating_ensemble as attribute of familiarData.
alexzwanenburg Jan 3, 2025
15aa242
Fixed failing test in test-configuration_file.
alexzwanenburg Jan 6, 2025
e3f8a6f
WIP on load_experiment_data
alexzwanenburg Jan 6, 2025
666d84d
Added data_id and run_id to vimpTable objects.
alexzwanenburg Jan 7, 2025
21d004a
test_train now uses the task-based framework.
alexzwanenburg Jan 7, 2025
c0013e4
Reworked outdated functions and methods.
alexzwanenburg Jan 8, 2025
18de4c0
WIP on implementing novelty / out-of-distribution detection as a sepa…
alexzwanenburg Jan 10, 2025
70d32b9
Novelty detectors can now train.
alexzwanenburg Jan 16, 2025
61ddc6a
Removed deprecated functions and methods.
alexzwanenburg Jan 16, 2025
319dee6
Modified tests the change in workflow now throws an error instead of …
alexzwanenburg Jan 16, 2025
0da50ce
Fix to eliminate missing outcome data prior to optimising hyperparame…
alexzwanenburg Jan 17, 2025
c4ff97d
WIP on test_hyperparameter_optimisation
alexzwanenburg Jan 17, 2025
b03ea96
Switch to .perform_task in test_hyperparameter_optimisation
alexzwanenburg Jan 21, 2025
a9fd32a
Adapted checks to current use of hyperparameters attribute.
alexzwanenburg Jan 21, 2025
f71d903
Revised requirement for project_id to be set in get_object_file_name
alexzwanenburg Jan 21, 2025
45152bb
Fixed incorrect use of "on" instead of "by".
alexzwanenburg Jan 21, 2025
6141c46
WIP on fixing issues regarding clustering when determining feature size.
alexzwanenburg Jan 23, 2025
51e8411
Hyperparameter optimisation now works.
alexzwanenburg Jan 24, 2025
e0b7131
Update feature selection variable importance table extraction.
alexzwanenburg Jan 24, 2025
4410e2c
Ignore new warnings due to data checks.
alexzwanenburg Jan 27, 2025
57f3a5a
Add additional checks for missing packages in tests.
alexzwanenburg Jan 28, 2025
e261b90
Fixed an issue that would cause an incorrect number of values to be c…
alexzwanenburg Jan 28, 2025
725c936
Set non-required argument.
alexzwanenburg Jan 28, 2025
1ce20b3
Deprecate get_object_name
alexzwanenburg Jan 28, 2025
11dbfb3
Fixed issue with special test-specific learners.
alexzwanenburg Jan 28, 2025
60763be
is_validation attribute is no longer used.
alexzwanenburg Jan 28, 2025
7f5a12d
File cleaning.
alexzwanenburg Jan 28, 2025
c49711f
Fixed incorrect attribute name.
alexzwanenburg Jan 28, 2025
6f24994
Fixed issue with get_n_samples for prediction tables not having count…
alexzwanenburg Jan 28, 2025
a135650
Fixed an error when trying to identify features prior to clustering.
alexzwanenburg Jan 29, 2025
46d57cf
Update NEWS.md
alexzwanenburg Jan 29, 2025
4acc55d
Variable importance table aggregation now respects variable importanc…
alexzwanenburg Jan 29, 2025
11da9b9
featureInfo objects now have a project_id attribute.
alexzwanenburg Jan 29, 2025
5f5bce1
Hyperparameters and variable importance tables are now always exported.
alexzwanenburg Jan 29, 2025
024ad6e
Update test.
alexzwanenburg Jan 29, 2025
039b3d4
Fix testexpectation.
alexzwanenburg Jan 29, 2025
2e27c93
Add data computation methods for character objects.
alexzwanenburg Jan 29, 2025
1149f19
Do not return invisible values.
alexzwanenburg Jan 30, 2025
e3b490e
Fixed selection statement to only select the correct lines.
alexzwanenburg Jan 30, 2025
77dc573
Added check before selecting features for inclusion in models.
alexzwanenburg Jan 30, 2025
11caecb
Update tests.
alexzwanenburg Jan 30, 2025
c4d44ff
Added check on n_dim to isolation forests.
alexzwanenburg Jan 30, 2025
2c71762
Fixed issues with subselecting subgroups of patients in ICE/PD analyses.
alexzwanenburg Jan 31, 2025
4b20fee
Externally supplied hyperparameters are now correctly passed on for .…
alexzwanenburg Jan 31, 2025
8d32b06
Fix comment.
alexzwanenburg Jan 31, 2025
fd4dc28
Set number of threads during prediction with isotree.
alexzwanenburg Feb 3, 2025
c78b225
Fix incorrectly specified check leading to an R disconnection error.
alexzwanenburg Feb 3, 2025
0786ec7
Replaced outdated function argument.
alexzwanenburg Feb 3, 2025
d7495ff
Fixes an error related to having to few data for sampling.
alexzwanenburg Feb 3, 2025
e4a3a5f
Repair issue with external variable importance used during hyperparam…
alexzwanenburg Feb 3, 2025
613eadf
Added exception weibull regression for training.
alexzwanenburg Feb 3, 2025
b1c2a19
Show which features appear in a cluster (#76)
alexzwanenburg Feb 4, 2025
0c25354
Initial pathing for integrating SHAP analysis.
alexzwanenburg Feb 5, 2025
cfbacd0
Added implementation plan for SHAP computations.
alexzwanenburg Feb 12, 2025
4a5fd11
Added additional notes.
alexzwanenburg Feb 12, 2025
0391b30
Update FamiliarDataComputationSHAP.R
alexzwanenburg Feb 12, 2025
13fa572
Percentile values are now obtained from feature distributions.
alexzwanenburg Feb 13, 2025
5dbdb9b
ICE feature ranges now utilise percentile values of featureInfo objects.
alexzwanenburg Feb 13, 2025
5315365
Add function to obtain evenly spaced percentiles.
alexzwanenburg Feb 13, 2025
88c3587
Updated feature range for ICE to use optimally spaced percentiles.
alexzwanenburg Feb 13, 2025
d037f6a
WIP on SHAP
alexzwanenburg Feb 13, 2025
f68aca8
WIP on SHAP values.
alexzwanenburg Feb 14, 2025
2d892f9
WIP on shap
alexzwanenburg Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Checked glmnet learner unit test.
alexzwanenburg committed Jan 17, 2024
commit 017169da585205ac711df5c24e9be28917ebc320
82 changes: 47 additions & 35 deletions tests/testthat/test-learner_glmnet_S4.R
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
# First test if all selectable learners are also available
familiar:::test_all_learners_available(
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = TRUE))
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = TRUE)
)
familiar:::test_all_learners_available(
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = TRUE))
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = TRUE)
)
familiar:::test_all_learners_available(
learners = familiar:::.get_available_glmnet_elastic_net_learners(show_general = TRUE))
learners = familiar:::.get_available_glmnet_elastic_net_learners(show_general = TRUE)
)

# Don't perform any further tests on CRAN due to time of running the complete test.
testthat::skip_on_cran()

familiar:::test_all_learners_train_predict_vimp(
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = FALSE))
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = FALSE)
)
familiar:::test_all_learners_train_predict_vimp(
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = FALSE))
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = FALSE)
)
familiar:::test_all_learners_train_predict_vimp(
learners = familiar:::.get_available_glmnet_elastic_net_learners(show_general = FALSE),
hyperparameter_list = list(
"continuous" = list("alpha" = 0.50),
"binomial" = list("alpha" = 0.50),
"multinomial" = list("alpha" = 0.50),
"survival" = list("alpha" = 0.50)))
"survival" = list("alpha" = 0.50)
)
)

familiar:::test_all_learners_parallel_train_predict_vimp(
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = FALSE))
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = FALSE)
)
familiar:::test_all_learners_parallel_train_predict_vimp(
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = FALSE))
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = FALSE)
)
familiar:::test_all_learners_parallel_train_predict_vimp(
learners = familiar:::.get_available_glmnet_elastic_net_learners(show_general = FALSE),
hyperparameter_list = list(
"continuous" = list("alpha" = 0.50),
"binomial" = list("alpha" = 0.50),
"multinomial" = list("alpha" = 0.50),
"survival" = list("alpha" = 0.50)))
"survival" = list("alpha" = 0.50)
)
)


# Continuous outcome tests------------------------------------------------------
@@ -45,11 +56,12 @@ good_model <- familiar:::test_train(
cluster_method = "none",
imputation_method = "simple",
hyperparameter_list = list("sign_size" = familiar:::get_n_features(good_data)),
learner = "lasso_gaussian")
learner = "lasso_gaussian"
)

testthat::test_that("Regularised regression model trained correctly", {
# Model trained
testthat::expect_equal(familiar:::model_is_trained(good_model), TRUE)
testthat::expect_true(familiar:::model_is_trained(good_model))

# That no deprecation warnings are given.
familiar:::test_not_deprecated(good_model@messages$warning)
@@ -67,7 +79,8 @@ testthat::test_that("Regularised regression model has variable importance", {

# Expect that the names are the same as that of the features.
testthat::expect_true(
all(vimp_table$name %in% familiar:::get_feature_columns(good_data)))
all(vimp_table$name %in% familiar:::get_feature_columns(good_data))
)

# Feature 1 is most important.
testthat::expect_equal(vimp_table[rank == 1, ]$name, "feature_1")
@@ -85,11 +98,12 @@ good_model <- familiar:::test_train(
cluster_method = "none",
imputation_method = "simple",
hyperparameter_list = list("sign_size" = familiar:::get_n_features(good_data)),
learner = "lasso_binomial")
learner = "lasso_binomial"
)

testthat::test_that("Regularised regression model trained correctly", {
# Model trained
testthat::expect_equal(familiar:::model_is_trained(good_model), TRUE)
testthat::expect_true(familiar:::model_is_trained(good_model))

# That no deprecation warnings are given.
familiar:::test_not_deprecated(good_model@messages$warning)
@@ -108,7 +122,8 @@ testthat::test_that("Regularised regression model has variable importance", {

# Expect that the names are the same as that of the features.
testthat::expect_true(
all(vimp_table$name %in% familiar:::get_feature_columns(good_data)))
all(vimp_table$name %in% familiar:::get_feature_columns(good_data))
)

# Feature 1 is most important.
testthat::expect_equal(vimp_table[rank == 1, ]$name, "feature_1")
@@ -126,11 +141,12 @@ good_model <- familiar:::test_train(
cluster_method = "none",
imputation_method = "simple",
hyperparameter_list = list("sign_size" = familiar:::get_n_features(good_data)),
learner = "lasso_multinomial")
learner = "lasso_multinomial"
)

testthat::test_that("Regularised regression model trained correctly", {
# Model trained
testthat::expect_equal(familiar:::model_is_trained(good_model), TRUE)
testthat::expect_true(familiar:::model_is_trained(good_model))

# That no deprecation warnings are given.
familiar:::test_not_deprecated(good_model@messages$warning)
@@ -149,7 +165,8 @@ testthat::test_that("Regularised regression model has variable importance", {

# Expect that the names are the same as that of the features.
testthat::expect_true(
all(vimp_table$name %in% familiar:::get_feature_columns(good_data)))
all(vimp_table$name %in% familiar:::get_feature_columns(good_data))
)

# Feature 1 is most important.
testthat::expect_equal(vimp_table[rank == 1, ]$name, "feature_1")
@@ -168,24 +185,15 @@ good_model <- familiar:::test_train(
imputation_method = "simple",
hyperparameter_list = list("sign_size" = familiar:::get_n_features(good_data)),
time_max = 3.5,
learner = "lasso_cox")
learner = "lasso_cox"
)

testthat::test_that("Regularised regression model trained correctly", {
# Model trained
testthat::expect_equal(familiar:::model_is_trained(good_model), TRUE)
testthat::expect_true(familiar:::model_is_trained(good_model))

# Calibration info is present
testthat::expect_equal(familiar:::has_calibration_info(good_model), TRUE)

# Test that the model predicts hazard ratios.
testthat::expect_equal(
familiar:::get_prediction_type(good_model),
"hazard_ratio")

# Test that the model predicts hazard ratios
testthat::expect_equal(
familiar:::get_prediction_type(good_model, type = "survival_probability"),
"survival_probability")
testthat::expect_true(familiar:::has_calibration_info(good_model))

# That no deprecation warnings are given.
familiar:::test_not_deprecated(good_model@messages$warning)
@@ -204,7 +212,8 @@ testthat::test_that("Regularised regression model has variable importance", {

# Expect that the names are the same as that of the features.
testthat::expect_true(
all(vimp_table$name %in% familiar:::get_feature_columns(good_data)))
all(vimp_table$name %in% familiar:::get_feature_columns(good_data))
)

# Feature 1 is most important.
testthat::expect_equal(vimp_table[rank == 1, ]$name, "feature_1")
@@ -216,14 +225,17 @@ testthat::skip("Skip hyperparameter optimisation, unless manual.")
familiar:::test_hyperparameter_optimisation(
learners = familiar:::.get_available_glmnet_ridge_learners(show_general = TRUE),
debug = FALSE,
parallel = FALSE)
parallel = FALSE
)

familiar:::test_hyperparameter_optimisation(
learners = familiar:::.get_available_glmnet_lasso_learners(show_general = TRUE),
debug = FALSE,
parallel = FALSE)
parallel = FALSE
)

familiar:::test_hyperparameter_optimisation(
learners = familiar:::.get_available_glmnet_elastic_net_learners(show_general = TRUE),
debug = FALSE,
parallel = FALSE)
parallel = FALSE
)