Skip to content

Commit

Permalink
Added more RandomizedSearchCV Parameters
Browse files Browse the repository at this point in the history
Added: RandomizedSearchCV parameters for some methods

TODO: Rest of parameters, fix warnings
  • Loading branch information
CaderIdris committed Oct 23, 2023
1 parent 303c932 commit f1b5233
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 10 deletions.
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cachetools==5.3.1; python_version >= '3.7'
certifi==2023.7.22; python_version >= '3.6'
cffi==1.16.0; python_version >= '3.8'
chardet==5.2.0; python_version >= '3.7'
charset-normalizer==3.3.0; python_full_version >= '3.7.0'
charset-normalizer==3.3.1; python_full_version >= '3.7.0'
colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
comm==0.1.4; python_version >= '3.6'
coverage[toml]==7.3.2; python_version >= '3.8'
Expand All @@ -38,7 +38,7 @@ jedi==0.19.1; python_version >= '3.6'
jinja2==3.1.2; python_version >= '3.7'
json5==0.9.14
jsonpointer==2.4
jsonschema==4.19.1; python_version >= '3.8'
jsonschema[format-nongpl]==4.19.1; python_version >= '3.8'
jsonschema-specifications==2023.7.1; python_version >= '3.8'
jupyter==1.0.0
jupyter-client==8.4.0; python_version >= '3.8'
Expand All @@ -56,13 +56,13 @@ markupsafe==2.1.3; python_version >= '3.7'
matplotlib-inline==0.1.6; python_version >= '3.5'
mccabe==0.7.0; python_version >= '3.6'
mistune==3.0.2; python_version >= '3.7'
mypy==1.6.0; python_version >= '3.8'
mypy==1.6.1; python_version >= '3.8'
mypy-extensions==1.0.0; python_version >= '3.5'
nbclient==0.8.0; python_full_version >= '3.8.0'
nbconvert==7.9.2; python_version >= '3.8'
nbformat==5.9.2; python_version >= '3.8'
nest-asyncio==1.5.8; python_version >= '3.5'
notebook==7.0.5; python_version >= '3.8'
notebook==7.0.6; python_version >= '3.8'
notebook-shim==0.2.3; python_version >= '3.7'
overrides==7.4.0; python_version >= '3.6'
packaging==23.2; python_version >= '3.7'
Expand Down Expand Up @@ -111,7 +111,7 @@ traitlets==5.11.2; python_version >= '3.8'
types-python-dateutil==2.8.19.14
typing-extensions==4.8.0; python_version >= '3.8'
uri-template==1.3.0
urllib3==2.0.6; python_version >= '3.7'
urllib3==2.0.7; python_version >= '3.7'
virtualenv==20.24.5; python_version >= '3.7'
wcwidth==0.2.8
webcolors==1.13
Expand All @@ -134,20 +134,20 @@ h5netcdf==1.2.0; python_version >= '3.9'
h5py==3.10.0; python_version >= '3.8'
joblib==1.3.2; python_version >= '3.7'
kiwisolver==1.4.5; python_version >= '3.7'
llvmlite==0.41.0; python_version >= '3.8'
llvmlite==0.41.1; python_version >= '3.8'
logical-unification==0.4.6; python_version >= '3.6'
matplotlib==3.8.0; python_version >= '3.9'
minikanren==1.0.3; python_version >= '3.6'
multipledispatch==1.0.0
numba==0.58.0; python_version >= '3.8'
numba==0.58.1; python_version >= '3.8'
numpy==1.25.2; python_version >= '3.9'
pandas==2.1.1; python_version >= '3.9'
pillow==10.1.0; python_version >= '3.8'
pymc==5.9.0; python_version >= '3.9'
pyparsing==3.1.1; python_full_version >= '3.6.8'
pytensor==2.17.2; python_version < '3.12' and python_version >= '3.9'
pytensor==2.17.3; python_version < '3.12' and python_version >= '3.9'
pytz==2023.3.post1
scikit-learn==1.3.1; python_version >= '3.8'
scikit-learn==1.3.2; python_version >= '3.8'
scipy==1.11.3; python_version < '3.13' and python_version >= '3.9'
setuptools==68.2.2; python_version >= '3.8'
shap==0.43.0; python_version >= '3.8'
Expand All @@ -156,6 +156,6 @@ threadpoolctl==3.2.0; python_version >= '3.8'
toolz==0.12.0; python_version >= '3.5'
tqdm==4.66.1; python_version >= '3.7'
tzdata==2023.3; python_version >= '2'
xarray==2023.9.0; python_version >= '3.9'
xarray==2023.10.1; python_version >= '3.9'
xarray-einstats==0.6.0; python_version >= '3.9'
xgboost==2.0.0; python_version >= '3.8'
88 changes: 88 additions & 0 deletions src/calidhayte/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,17 @@ def ridge(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2),
'tol': uniform(loc=0, scale=1),
'solver': [
'svd',
'cholesky',
'lsqr',
'sparse_cg',
'sag',
'saga',
'lbfgs'
]
},
**kwargs
):
Expand Down Expand Up @@ -716,6 +727,9 @@ def lasso(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2),
'tol': uniform(loc=0, scale=1),
'selection': ['cyclic', 'random']
},
**kwargs
):
Expand Down Expand Up @@ -787,6 +801,9 @@ def multi_task_lasso(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2),
'tol': uniform(loc=0, scale=1),
'selection': ['cyclic', 'random']
},
**kwargs
):
Expand Down Expand Up @@ -858,6 +875,10 @@ def elastic_net(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2),
'l1_ratio': uniform(loc=0, scale=1),
'tol': uniform(loc=0, scale=1),
'selection': ['cyclic', 'random']
},
**kwargs
):
Expand Down Expand Up @@ -928,6 +949,10 @@ def multi_task_elastic_net(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2),
'l1_ratio': uniform(loc=0, scale=1),
'tol': uniform(loc=0, scale=1),
'selection': ['cyclic', 'random']
},
**kwargs
):
Expand Down Expand Up @@ -1000,6 +1025,7 @@ def lars(
List[Union[int, str, float]]
]
] = {
'n_nonzero_coefs': list(range(1, 11))
},
**kwargs
):
Expand Down Expand Up @@ -1046,6 +1072,7 @@ def lars_lasso(
List[Union[int, str, float]]
]
] = {
'alpha': uniform(loc=0, scale=2)
},
**kwargs
):
Expand Down Expand Up @@ -1092,6 +1119,7 @@ def omp(
List[Union[int, str, float]]
]
] = {
'n_nonzero_coefs': list(range(1, 11))
},
**kwargs
):
Expand Down Expand Up @@ -1139,6 +1167,11 @@ def bayesian_ridge(
List[Union[int, str, float]]
]
] = {
'tol': uniform(loc=0, scale=1),
'alpha_1': uniform(loc=0, scale=1),
'alpha_2': uniform(loc=0, scale=1),
'lambda_1': uniform(loc=0, scale=1),
'lambda_2': uniform(loc=0, scale=1)
},
**kwargs
):
Expand Down Expand Up @@ -1185,6 +1218,7 @@ def bayesian_ard(
List[Union[int, str, float]]
]
] = {
'tol': uniform(loc=0, scale=1),
'alpha_1': uniform(loc=0, scale=1),
'alpha_2': uniform(loc=0, scale=1),
'lambda_1': uniform(loc=0, scale=1),
Expand Down Expand Up @@ -1235,6 +1269,10 @@ def tweedie(
List[Union[int, str, float]]
]
] = {
'power': [0, 1, 1.5, 2, 2.5, 3],
'alpha': uniform(loc=0, scale=2),
'solver': ['lbfgs', 'newton-cholesky'],
'tol': uniform(loc=0, scale=1),
},
**kwargs
):
Expand Down Expand Up @@ -1281,6 +1319,31 @@ def stochastic_gradient_descent(
List[Union[int, str, float]]
]
] = {
'tol': uniform(loc=0, scale=1),
'loss': [
'squared_error',
'huber',
'epsilon_insensitive',
'squared_epsilon_insensitive'
],
'penalty': [
'l2',
'l1',
'elasticnet',
None
],
'alpha': uniform(loc=0, scale=0.001),
'l1_ratio': uniform(loc=0, scale=1),
'epsilon': uniform(loc=0, scale=1),
'learning_rate': [
'constant',
'optimal',
'invscaling',
'adaptive'
],
'eta0': uniform(loc=0, scale=0.1),
'power_t': uniform(loc=0, scale=1)

},
**kwargs
):
Expand Down Expand Up @@ -1327,6 +1390,13 @@ def passive_aggressive(
List[Union[int, str, float]]
]
] = {
'C': uniform(loc=0, scale=2),
'tol': uniform(loc=0, scale=1),
'loss': [
'epsilon_insensitive',
'squared_epsilon_insensitive'
],
'epsilon': uniform(loc=0, scale=1)
},
**kwargs
):
Expand Down Expand Up @@ -1373,6 +1443,10 @@ def ransac(
List[Union[int, str, float]]
]
] = {
'estimator': [
lm.LinearRegression()
# TODO: ADD
]
},
**kwargs
):
Expand Down Expand Up @@ -1419,6 +1493,7 @@ def theil_sen(
List[Union[int, str, float]]
]
] = {
'tol': uniform(loc=0, scale=1)
},
**kwargs
):
Expand Down Expand Up @@ -1465,6 +1540,9 @@ def huber(
List[Union[int, str, float]]
]
] = {
'epsilon': uniform(loc=1, scale=4),
'alpha': uniform(loc=0, scale=0.01),
'tol': uniform(loc=0, scale=1)
},
**kwargs
):
Expand Down Expand Up @@ -1511,13 +1589,23 @@ def quantile(
List[Union[int, str, float]]
]
] = {
'quantile': uniform(loc=0, scale=2),
'alpha': uniform(loc=0, scale=2),
'tol': uniform(loc=0, scale=1),
'solver': [
'highs-ds',
'highs-ipm',
'highs',
'revised simplex',
]
},
**kwargs
):
"""
Fit x on y via quantile regression
Parameters
'interior-point',
----------
name : str, default="Quantile Regression"
Name of classification technique.
Expand Down

0 comments on commit f1b5233

Please sign in to comment.