From e31a8ae37e85fa44024df8d924c25138a539cb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20M=C3=A4rz?= Date: Fri, 19 Jan 2024 09:36:16 +0100 Subject: [PATCH] Updated function --- xgboostlss/utils.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/xgboostlss/utils.py b/xgboostlss/utils.py index ecf4378..63d946b 100644 --- a/xgboostlss/utils.py +++ b/xgboostlss/utils.py @@ -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.