Skip to content

Commit

Permalink
Updated function
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander März committed Jan 19, 2024
1 parent 7b80dac commit e31a8ae
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions xgboostlss/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,6 @@ def softplus_fn_df(predt: torch.tensor) -> torch.tensor:
return predt + torch.tensor(2.0, dtype=predt.dtype)


def softplus_fn_quantile(predt: torch.tensor,
beta: int,
threshold: int) -> torch.tensor:
"""
Softplus function used for Student-T distribution.
Arguments
---------
predt: torch.tensor
Predicted values.
beta: int
Beta parameter for softplus function.
threshold: int
Threshold parameter for softplus function.
Returns
-------
predt: torch.tensor
Predicted values.
"""
predt = softplus(input=nan_to_num(predt), beta=beta, threshold=threshold) + torch.tensor(1e-06, dtype=predt.dtype)

return predt


def squareplus_fn(predt: torch.tensor) -> torch.tensor:
"""
Square-Plus function used to ensure predt is strictly positive.
Expand Down

0 comments on commit e31a8ae

Please sign in to comment.