Package: deepregression 1.0.0

deepregression: Fitting Deep Distributional Regression

Allows for the specification of semi-structured deep distributional regression models which are fitted in a neural network as proposed by Ruegamer et al. (2023) <doi:10.18637/jss.v105.i02>. Predictors can be modeled using structured (penalized) linear effects, structured non-linear effects or using an unstructured deep network model.

Authors:David Ruegamer [aut, cre], Florian Pfisterer [ctb], Philipp Baumann [ctb], Chris Kolb [ctb], Lucas Kook [ctb]

deepregression_1.0.0.tar.gz
deepregression_1.0.0.zip(r-4.5)deepregression_1.0.0.zip(r-4.4)deepregression_1.0.0.zip(r-4.3)
deepregression_1.0.0.tgz(r-4.4-any)deepregression_1.0.0.tgz(r-4.3-any)
deepregression_1.0.0.tar.gz(r-4.5-noble)deepregression_1.0.0.tar.gz(r-4.4-noble)
deepregression_1.0.0.tgz(r-4.4-emscripten)deepregression_1.0.0.tgz(r-4.3-emscripten)
deepregression.pdf |deepregression.html
deepregression/json (API)

# Install 'deepregression' in R:
install.packages('deepregression', repos = c('https://druegamer.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.28 score 1 packages 63 scripts 278 downloads 88 exports 42 dependencies

Last updated 2 years agofrom:338b46a35b. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 10 2024
R-4.5-winNOTENov 10 2024
R-4.5-linuxNOTENov 10 2024
R-4.4-winNOTENov 10 2024
R-4.4-macNOTENov 10 2024
R-4.3-winOKNov 10 2024
R-4.3-macOKNov 10 2024

Exports:%>%check_and_installcoef.deepregressioncombine_penaltiescreate_familycreate_penaltycvdeepregressiondistfun_to_distensembleensemble.deepregressionextract_pure_gam_partextract_Sextractlenextractvalextractvarfamily_to_tfdfamily_to_trafofit.deepregressionfitted.deepregressionform_controlform2textfrom_preds_to_distgam_plot_datagam_processorget_distributionget_ensemble_distributionget_gam_partget_gamdataget_gamdata_reduced_nrget_layer_by_opnameget_layernr_by_opnameget_layernr_trainableget_names_pfcget_partial_effectget_processor_nameget_specialget_type_pfcget_weight_by_nameget_weight_by_opnamehandle_gam_termint_processorinverse_group_lasso_penkeras_drlayer_add_identitylayer_concatenate_identitylayer_generatorlayer_group_hadamardlayer_hadamardlayer_hadamard_difflayer_sparse_conv_2dlayer_splinelin_processorlog_scoremake_foldsmake_generator_from_matrixmake_tfd_distmakeInputsmakelayernamemultioptimizernames_familiesorthog_controlorthog_Porthog_structured_smooths_Zpenalty_controlplot_cvplot.deepregressionprecalc_gampredict_genpredict.deepregressionprepare_dataprepare_newdataprint.deepregressionquantregularizer_group_lassoreinit_weightssimplyconnected_layerstddevstop_iter_cv_resultsubnetwork_inittf_repeattf_row_tensortf_split_multipletf_stride_colstf_stride_last_dim_tensortib_layertibgroup_layerweight_control

Dependencies:backportsbase64enccliconfigdplyrfansigenericsglueherejsonlitekeraslatticelifecyclemagrittrMatrixmgcvnlmepillarpkgconfigpngprocessxpsR6rappdirsRcppRcppTOMLreticulaterlangrprojrootrstudioapitensorflowtfautographtfprobabilitytfrunstibbletidyselectutf8vctrswhiskerwithryamlzeallot

Readme and manuals

Help Manual

Help pageTopics
Function to check python environment and install necessary packagescheck_and_install
Method for extracting ensemble coefficient estimatescoef.drEnsemble
Function to combine two penaltiescombine_penalties
Function to create (custom) familycreate_family
Function to create mgcv-type penaltycreate_penalty
Generic cv functioncv
Fitting Semi-Structured Deep Distributional Regressiondeepregression
Function to define output distribution based on dist_fundistfun_to_dist
Generic deep ensemble functionensemble
Ensemblind deepregression modelsensemble.deepregression
Extract the smooth term from a deepregression term specificationextract_pure_gam_part
Convenience function to extract penalty matrix and valueextract_S
Formula helpersextractlen extractval form2text
Extract variable from termextractvar
Character-tfd mapping functionfamily_to_tfd
Character-to-transformation mapping functionfamily_to_trafo
Method for extracting the fitted values of an ensemblefitted.drEnsemble
Options for formula parsingform_control
Function to transform a distritbution layer output into a loss functionfrom_dist_to_loss
Define Predictor of a Deep Distributional Regression Modelfrom_preds_to_dist
used by gam_processorgam_plot_data
Function to return the fitted distributionget_distribution
Obtain the conditional ensemble distributionget_ensemble_distribution
Extract gam part from wrapped termget_gam_part
Extract property of gamdataget_gamdata
Extract number in matching table of reduced gam termget_gamdata_reduced_nr
Function to return layer given model and nameget_layer_by_opname
Function to return layer number given model and nameget_layernr_by_opname
Function to return layer numbers with trainable weightsget_layernr_trainable
Extract term names from the parsed formula contentget_names_pfc
Return partial effect of one smooth termget_partial_effect
Extract processor name from termget_processor_name
Extract terms defined by specials in formulaget_special
Function to subset parsed formulasget_type_pfc
Function to retrieve the weights of a structured layerget_weight_by_name
Function to return weight given model and nameget_weight_by_opname
Function to define smoothness and call mgcv's smooth constructorhandle_gam_term
Compile a Deep Distributional Regression Modelkeras_dr
Convenience layer functionlayer_add_identity layer_concatenate_identity
Function that creates layer for each processorgam_processor int_processor layer_generator lin_processor
Sparse 2D Convolutional layerlayer_sparse_conv_2d
Function to define spline as TensorFlow layerlayer_spline
Function to return the log_scorelog_score
Function to loop through parsed formulas and apply data trafoloop_through_pfc_and_call_trafo
Generate folds for CV out of one hot encoded matrixmake_folds
creates a generator for trainingmake_generator
Make a DataGenerator from a data.frame or matrixmake_generator_from_matrix
Families for deepregressionmake_tfd_dist
Convenience layer functionmakeInputs
Function that takes term and create layer namemakelayername
Function to define an optimizer combining multiple optimizersmultioptimizer
Returns the parameter names for a given familynames_families
Options for orthogonalizationorthog_control
Function to compute adjusted penalty when orthogonalizingorthog_P
Orthogonalize a Semi-Structured Model Post-hocorthog_post_fitting
Orthogonalize structured term by another matrixorthog_structured_smooths_Z
Options for penalty setup in the pre-processingpenalty_control
Plot CV results from deepregressionplot_cv
Generic functions for deepregression modelscoef.deepregression cv.deepregression fit.deepregression fitted.deepregression mean.deepregression plot.deepregression predict.deepregression print.deepregression quant.deepregression stddev.deepregression
Pre-calculate all gam parts from the list of formulasprecalc_gam
Generator function for deepregression objectspredict_gen
Function to prepare data based on parsed formulasprepare_data
Function to prepare new data based on parsed formulasprepare_newdata
Control function to define the processor for terms in the formulaprocess_terms
Generic quantile functionquant
Genereic function to re-intialize model weightsreinit_weights
Method to re-initialize weights of a '"deepregression"' modelreinit_weights.deepregression
Function to define orthogonalization connections in the formulaseparate_define_relation
Generic sd functionstddev
Function to get the stoppting iteration from CVstop_iter_cv_result
Initializes a Subnetwork based on the Processed Additive Predictorsubnetwork_init
TensorFlow repeat function which is not available for TF 2.0tf_repeat
Row-wise tensor product using TensorFlowtf_row_tensor
Split tensor in multiple partstf_split_multiple
Function to index tensors columnstf_stride_cols
Function to index tensors last dimensiontf_stride_last_dim_tensor
For using mean squared error via TFPtfd_mse
Implementation of a zero-inflated negbinom distribution for TFPtfd_zinb
Implementation of a zero-inflated poisson distribution for TFPtfd_zip
Hadamard-type layersinverse_group_lasso_pen layer_group_hadamard layer_hadamard layer_hadamard_diff regularizer_group_lasso simplyconnected_layer tibgroup_layer tib_layer
Function to update miniconda and packagesupdate_miniconda_deepregression
Options for weights of layersweight_control