metacountregressor 0.1.307__tar.gz → 0.1.308__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {metacountregressor-0.1.307/metacountregressor.egg-info → metacountregressor-0.1.308}/PKG-INFO +1 -1
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/solution.py +21 -6
- {metacountregressor-0.1.307 → metacountregressor-0.1.308/metacountregressor.egg-info}/PKG-INFO +1 -1
- metacountregressor-0.1.308/version.txt +1 -0
- metacountregressor-0.1.307/version.txt +0 -1
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/LICENSE.txt +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/MANIFEST.in +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/README.md +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/README.rst +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/helperprocess.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/setup.cfg +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/setup.py +0 -0
- {metacountregressor-0.1.307 → metacountregressor-0.1.308}/tests/test.py +0 -0
@@ -30,7 +30,7 @@ from scipy.special import gammaln
|
|
30
30
|
from sklearn.metrics import mean_absolute_error as MAE
|
31
31
|
from sklearn.metrics import mean_squared_error as MSPE
|
32
32
|
from statsmodels.tools.numdiff import approx_fprime, approx_hess
|
33
|
-
|
33
|
+
|
34
34
|
from sklearn.preprocessing import StandardScaler, MinMaxScaler
|
35
35
|
from texttable import Texttable
|
36
36
|
import time
|
@@ -455,7 +455,7 @@ class ObjectiveFunction(object):
|
|
455
455
|
self._transformations = kwargs.get('_transformations', ["no", "log", "sqrt", "arcsinh", "nil"])
|
456
456
|
# self._distribution = ['triangular', 'uniform', 'normal', 'ln_normal', 'tn_normal', 'lindley']
|
457
457
|
|
458
|
-
self._distribution = kwargs.get('_distributions', ['triangular', 'uniform', 'normal', '
|
458
|
+
self._distribution = kwargs.get('_distributions', ['triangular', 'uniform', 'normal', 'tn_normal'])
|
459
459
|
|
460
460
|
if self.G is not None:
|
461
461
|
#TODO need to handle this for groups
|
@@ -5060,11 +5060,12 @@ class ObjectiveFunction(object):
|
|
5060
5060
|
proba_ = proba_n.sum(axis =1)
|
5061
5061
|
|
5062
5062
|
"""""
|
5063
|
-
|
5063
|
+
main_disper = self.get_dispersion_paramaters(betas, dispersion)
|
5064
|
+
|
5064
5065
|
|
5065
5066
|
# print(betas_last)
|
5066
5067
|
proba_, proba_n = self.prob_obs_draws_all_at_once(
|
5067
|
-
eVd, np.atleast_3d(y),
|
5068
|
+
eVd, np.atleast_3d(y), main_disper, dispersion)
|
5068
5069
|
# self._prob_product_against_panels()
|
5069
5070
|
|
5070
5071
|
# print(top_stats)
|
@@ -5648,7 +5649,7 @@ class ObjectiveFunction(object):
|
|
5648
5649
|
covariance = self.handle_covariance(covariance)
|
5649
5650
|
covariance = np.clip(covariance, 0, None)
|
5650
5651
|
stderr = np.sqrt(np.diag(covariance))
|
5651
|
-
if stderr_opg:
|
5652
|
+
if stderr_opg is not None:
|
5652
5653
|
stderr = np.minimum(stderr, stderr_opg)
|
5653
5654
|
|
5654
5655
|
|
@@ -5995,6 +5996,20 @@ class ObjectiveFunction(object):
|
|
5995
5996
|
tol=tol.get('ftol', 1e-6), # Use 'ftol' as the default tolerance
|
5996
5997
|
options=options
|
5997
5998
|
)
|
5999
|
+
if optimization_result.message == 'NaN result encountered.':
|
6000
|
+
optimization_result = self._minimize(self._loglik_gradient,
|
6001
|
+
initial_params,
|
6002
|
+
args=(
|
6003
|
+
X, y, draws, X, Xr, self.batch_size, self.grad_yes, self.hess_yes, dispersion, 0, False, 0,
|
6004
|
+
self.rdm_cor_fit, None, None, draws_grouped, XG, mod
|
6005
|
+
),
|
6006
|
+
method='Nelder-Mead-BFGS',
|
6007
|
+
bounds=bounds,
|
6008
|
+
tol=tol.get('ftol', 1e-4), # Use 'ftol' as the default tolerance
|
6009
|
+
options=options
|
6010
|
+
)
|
6011
|
+
|
6012
|
+
|
5998
6013
|
if self.run_numerical_hessian:
|
5999
6014
|
std_errors = self.bootstrap_std_dev(
|
6000
6015
|
initial_params=optimization_result.x,
|
@@ -6191,7 +6206,7 @@ class ObjectiveFunction(object):
|
|
6191
6206
|
else:
|
6192
6207
|
# Optimization failed, return None for all metrics
|
6193
6208
|
print("Optimization failed.")
|
6194
|
-
return None, None, None, None, None, None, None, None
|
6209
|
+
return None, None, None, None, None, None, None, None, None
|
6195
6210
|
def _prepare_data_and_bounds(self, mod, dispersion):
|
6196
6211
|
"""Prepare the data matrices, bounds, and initial parameters."""
|
6197
6212
|
# Prepare data matrices
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.308
|
@@ -1 +0,0 @@
|
|
1
|
-
0.1.307
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/helperprocess.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.307 → metacountregressor-0.1.308}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|