Skip to content

DDR - Deep Distribution Regression

The deep distributional regression model.


Class Definition

Bases: BaseModel

Functions

__init__(cutpoints=None, num_hidden_layers=2, hidden_size=100, dropout_rate=0.2, proportion=0.1, loss_metric='jbce', learning_rate=0.001)

Args: x_train_shape: The shape of the training data, used to define the input size of the first layer. cutpoints: The cutpoints for the DDR model. num_hidden_layers: The number of hidden layers in the network. hidden_size: The number of neurons in each hidden layer.

forward(x)

Forward pass of the DDR model. Args: x: Input tensor. Returns: The cutpoints and probabilities for the DDR model.

Loss Functions

JBCE Loss

The joint binary cross entropy loss. Args: dists: the predicted distributions y: the observed values alpha: the penalty parameter

NLL Loss