metacountregressor 0.1.55__py3-none-any.whl → 0.1.57__py3-none-any.whl
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/solution.py +16 -19
- {metacountregressor-0.1.55.dist-info → metacountregressor-0.1.57.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.55.dist-info → metacountregressor-0.1.57.dist-info}/RECORD +4 -4
- {metacountregressor-0.1.55.dist-info → metacountregressor-0.1.57.dist-info}/WHEEL +0 -0
metacountregressor/solution.py
CHANGED
@@ -5,18 +5,16 @@
|
|
5
5
|
import ast
|
6
6
|
import itertools
|
7
7
|
import math
|
8
|
-
|
9
|
-
#from dis import dis
|
8
|
+
|
10
9
|
import os
|
11
|
-
|
10
|
+
|
12
11
|
import random
|
13
12
|
import sys
|
14
13
|
import time
|
15
14
|
import warnings
|
16
15
|
from collections import Counter
|
17
16
|
from functools import wraps
|
18
|
-
|
19
|
-
#from telnetlib import XAUTH
|
17
|
+
|
20
18
|
from tempfile import TemporaryFile
|
21
19
|
import traceback
|
22
20
|
import latextable
|
@@ -24,12 +22,12 @@ import numpy as np
|
|
24
22
|
import pandas as pd
|
25
23
|
import psutil
|
26
24
|
import scipy.special as sc
|
27
|
-
|
25
|
+
|
28
26
|
import statsmodels.api as sm
|
29
27
|
from scipy.integrate import quad
|
30
28
|
from scipy.optimize import minimize
|
31
29
|
from scipy.stats import boxcox, gamma, lognorm, nbinom, norm, poisson, t
|
32
|
-
|
30
|
+
|
33
31
|
from sklearn import preprocessing
|
34
32
|
from scipy.special import gammaln
|
35
33
|
from sklearn.metrics import mean_absolute_error as MAE
|
@@ -44,12 +42,9 @@ from texttable import Texttable
|
|
44
42
|
#from optimparallel import minimize_parallel
|
45
43
|
|
46
44
|
from ._device_cust import device as dev
|
47
|
-
#from optimparallel import minimize_parallel
|
48
|
-
#import pareto
|
49
45
|
from .pareto_file import Pareto, Solution
|
50
46
|
|
51
|
-
|
52
|
-
#import aesara.tensor as T
|
47
|
+
|
53
48
|
|
54
49
|
|
55
50
|
#np.seterr(divide='ignore', invalid='ignore')
|
@@ -3966,7 +3961,9 @@ class ObjectiveFunction(object):
|
|
3966
3961
|
#if b_gam < 0.8*model_nature['dispersion_penalty']:
|
3967
3962
|
#penalty += model_nature['dispersion_penalty'] -b_gam
|
3968
3963
|
|
3969
|
-
|
3964
|
+
b_gam = np.exp(b_gam)
|
3965
|
+
if b_gam > np.exp(6):
|
3966
|
+
penalty += b_gam
|
3970
3967
|
|
3971
3968
|
#if abs(b_gam) < 0.01:
|
3972
3969
|
# penalty += 1/np.abs(b_gam)
|
@@ -3974,9 +3971,9 @@ class ObjectiveFunction(object):
|
|
3974
3971
|
|
3975
3972
|
|
3976
3973
|
|
3977
|
-
|
3978
|
-
|
3979
|
-
|
3974
|
+
# if b_gam >= 4.5:
|
3975
|
+
# penalty += b_gam
|
3976
|
+
# b_gam = 4.61
|
3980
3977
|
#b_gam = 7.9
|
3981
3978
|
# penalty += model_nature['dispersion_penalty'] -b_gam
|
3982
3979
|
#penalty += 1/np.max((0.01,abs(b_gam)))
|
@@ -5615,15 +5612,15 @@ class ObjectiveFunction(object):
|
|
5615
5612
|
def _minimize(self, loglik_fn, x, args, method, tol, options, bounds = None, hess_calc = None):
|
5616
5613
|
|
5617
5614
|
if method == "BFGS":
|
5618
|
-
|
5615
|
+
|
5619
5616
|
|
5620
5617
|
|
5621
5618
|
try:
|
5622
|
-
|
5619
|
+
|
5623
5620
|
return self._bfgs(loglik_fn, x, args=args, tol=tol, **options) #@IgnoreException
|
5624
5621
|
|
5625
5622
|
except:
|
5626
|
-
return minimize(loglik_fn, x, args=args, jac=args[6],
|
5623
|
+
return minimize(loglik_fn, x, args=args, jac=args[6], method='BFGS', tol=tol, options=options)
|
5627
5624
|
|
5628
5625
|
|
5629
5626
|
|
@@ -5653,7 +5650,7 @@ class ObjectiveFunction(object):
|
|
5653
5650
|
else:
|
5654
5651
|
return result
|
5655
5652
|
elif method == 'BFGS_2':
|
5656
|
-
return minimize(loglik_fn, x, args=args, jac=args[6],
|
5653
|
+
return minimize(loglik_fn, x, args=args, jac=args[6], method='BFGS')
|
5657
5654
|
elif method == "L-BFGS-B":
|
5658
5655
|
|
5659
5656
|
return minimize(loglik_fn, x, args=args, jac=args[6], hess = args[7], method='L-BFGS-B', bounds =bounds, tol=tol, options=options)
|
@@ -39,7 +39,7 @@ metacountregressor/set_data.csv,sha256=68iJkW4O4HVM8GyNlO0drwp8ZMXkccXCUc7jnA8xn
|
|
39
39
|
metacountregressor/set_data_s.csv,sha256=hELwnv6RjpmXcMheFafwrYbLbyYE21hFKyqJhA8L05o,11111
|
40
40
|
metacountregressor/setup.py,sha256=CpbdBScFhvStc6WByFiAlP7T5wGdWetsLI8X5JRRpP4,268
|
41
41
|
metacountregressor/single_objective_finder.py,sha256=QYXUpxJp7-ul5ZiIKGgYGaH_yFFGUbI7X3yKu5asogE,1960
|
42
|
-
metacountregressor/solution.py,sha256=
|
42
|
+
metacountregressor/solution.py,sha256=X_emVvrny-Ku8mDsRdLw0fPIInj69jHmFnHLUQuHzqk,313311
|
43
43
|
metacountregressor/Stage5A_1848_All_Initial_Columns.csv,sha256=uwsadEyupgIH1w5f8vnlwlo13ryww3VCGYlOnN0dEL0,188769
|
44
44
|
metacountregressor/Stage5A_1848_All_Initial_Columns.xlsx,sha256=5U5Ab1jjGi5qoKp06Bw2tpdPjGaDGoyt5976AAFdEbs,699231
|
45
45
|
metacountregressor/synth_dataset_generator.ipynb,sha256=caBMQJOaeINPZJw5aTsSOXhmenSqrpS7GycINAzUUxs,27153
|
@@ -49,6 +49,6 @@ metacountregressor/testML.R,sha256=UbTsLFUhoJG9bJnU2rbUKlfcprAkROnhREK41qKzbvQ,2
|
|
49
49
|
metacountregressor/TestSetFake.csv,sha256=JPYAWYLAw7rgQHdGTz0rltMfapX8QYt3BVSyK_D-Lzg,1640
|
50
50
|
metacountregressor/ThaiAccident.csv,sha256=NIi_uPyo5u-B6Hj0Ln9xuJ8fnvGbWK9GLdTWdpG5uug,418202
|
51
51
|
metacountregressor/tk_app.py,sha256=0UM76hpQ-ha96ma_Z5ryxYQUSdF4PJBCsLuI1EGu6_E,59490
|
52
|
-
metacountregressor-0.1.
|
53
|
-
metacountregressor-0.1.
|
54
|
-
metacountregressor-0.1.
|
52
|
+
metacountregressor-0.1.57.dist-info/METADATA,sha256=5LQhxDBsE2PMp9DO_Xz0AU8dD3uXfOG3uTrDVHVcaSM,13112
|
53
|
+
metacountregressor-0.1.57.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
54
|
+
metacountregressor-0.1.57.dist-info/RECORD,,
|
File without changes
|