Skip to content

Commit

Permalink
change exception to warnings, add positive constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
RektPunk committed Aug 29, 2024
1 parent 528627c commit 6e8c158
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mqboost/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from mqboost.optimize import MQOptimizer
from mqboost.regressor import MQRegressor

__version__ = "0.2.3"
__version__ = "0.2.4"
6 changes: 5 additions & 1 deletion mqboost/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from itertools import chain, repeat
from typing import List

Expand Down Expand Up @@ -100,7 +101,10 @@ def delta_validate(delta: float) -> float:
if not isinstance(delta, float):
raise ValidationException("Delta is not float type")

if delta <= 0:
raise ValidationException("Delta must be positive")

if delta > _delta_upper_bound:
raise ValidationException("Delta must be smaller than or equal to 0.05")
warnings.warn("Delta should be 0.05 or less.")

return delta
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mqboost"
version = "0.2.3"
version = "0.2.4"
description = "Monotonic composite quantile gradient boost regressor"
authors = ["RektPunk <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 6e8c158

Please sign in to comment.