metacountregressor 0.1.203__tar.gz → 0.1.205__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.
Files changed (27) hide show
  1. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/PKG-INFO +1 -1
  2. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/helperprocess.py +1 -1
  3. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/metaheuristics.py +7 -0
  4. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/solution.py +8 -8
  5. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/PKG-INFO +1 -1
  6. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/LICENSE.txt +0 -0
  7. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/README.rst +0 -0
  8. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/__init__.py +0 -0
  9. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/_device_cust.py +0 -0
  10. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/app_main.py +0 -0
  11. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/data_split_helper.py +0 -0
  12. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/halton.py +0 -0
  13. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/main.py +0 -0
  14. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/main_old.py +0 -0
  15. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/pareto_file.py +0 -0
  16. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/pareto_logger__plot.py +0 -0
  17. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/setup.py +0 -0
  18. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/single_objective_finder.py +0 -0
  19. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor/test_generated_paper2.py +0 -0
  20. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/SOURCES.txt +0 -0
  21. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/dependency_links.txt +0 -0
  22. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/not-zip-safe +0 -0
  23. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/requires.txt +0 -0
  24. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/metacountregressor.egg-info/top_level.txt +0 -0
  25. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/setup.cfg +0 -0
  26. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/setup.py +0 -0
  27. {metacountregressor-0.1.203 → metacountregressor-0.1.205}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.203
3
+ Version: 0.1.205
4
4
  Summary: Extensive Testing for Estimation of Data Count Models
5
5
  Home-page: https://github.com/zahern/CountDataEstimation
6
6
  Author: Zeke Ahern
@@ -415,7 +415,7 @@ def PCA_code(X, n_components=5):
415
415
  return principalComponents
416
416
 
417
417
 
418
- def interactions(df, keep=None, drop_this_perc=0.6, interact = False):
418
+ def interactions(df, keep=None, drop_this_perc=0.5, interact = False):
419
419
  full_columns = df.columns
420
420
  if interact:
421
421
  interactions_list = []
@@ -275,6 +275,13 @@ def harmony_search(objective_function, initial_harmonies=None, hyperparameters=N
275
275
  Returns:
276
276
  _type_: results for the harmony search algorithm in single or multi objective
277
277
  """
278
+ #set up objective function hyper
279
+ if kwargs.get('_hms') is not None:
280
+ objective_function._hms = kwargs.get('_hms')
281
+ if kwargs.get('_hmcr') is not None:
282
+ objective_function._hmcr = kwargs.get('_hmcr')
283
+
284
+
278
285
  man = None
279
286
  if 'Manual_Fit' in kwargs:
280
287
  if kwargs['Manual_Fit'] is not None:
@@ -150,7 +150,7 @@ class ObjectiveFunction(object):
150
150
  self.rdm_fit = None
151
151
  self.rdm_cor_fit = None
152
152
  self.dist_fit = None
153
-
153
+ self.rounding_point = kwargs.get('decimals_in_coeff', 2)
154
154
  self.MAE = None
155
155
  self.best_obj_1 = 1000000.0
156
156
  self._obj_1 = kwargs.get('_obj_1', 'bic')
@@ -160,18 +160,18 @@ class ObjectiveFunction(object):
160
160
  self.GP_parameter = 0
161
161
  self.is_multi = kwargs.get('is_multi', False)
162
162
  self.complexity_level = kwargs.get('complexity_level', 6)
163
- self._max_iterations_improvement = 10000
163
+ self._max_iterations_improvement = kwargs.get("WIC",10000)
164
164
  self.generated_sln = set()
165
165
  self.ave_mae = 0
166
166
  # defalt paramaters for hs #TODO unpack into harmony search class
167
167
  self.algorithm = 'hs' # 'sa' 'de' also avialable
168
168
  self._hms = 20
169
- self._max_time = 60 * 60 * 24
170
- self._hmcr = .5
169
+ self._max_time = kwargs.get('_max_time',.60 * 60 * 24)
170
+ self._hmcr = kwargs.get('_hmcr',.5)
171
171
  self._par = 0.3 #dont think this gets useted
172
172
  self._mpai = 1
173
173
  self._max_imp = 100000
174
- self._WIC = 1000 # Number of Iterations without Multiobjective Improvement #tod chuck into solution
174
+ self._WIC = kwargs.get("WIC",10000) # Number of Iterations without Multiobjective Improvement #tod chuck into solution
175
175
  self._panels = None
176
176
  self.is_multi = True
177
177
  self.method_ll = 'Nelder-Mead-BFGS'
@@ -1146,7 +1146,8 @@ class ObjectiveFunction(object):
1146
1146
  print(np.exp(self.coeff_[-1]))
1147
1147
  #self.coeff_[-1] = np.exp(self.coeff_[-1]) # min possible value for negbinom
1148
1148
 
1149
- self.coeff_ = [self.round_with_padding(x, 2) for x in self.coeff_]
1149
+
1150
+ self.coeff_ = [self.round_with_padding(x, self.rounding_point) for x in self.coeff_]
1150
1151
 
1151
1152
  self.stderr = [self.round_with_padding(x, 2) for x in self.stderr]
1152
1153
  self.zvalues = [self.round_with_padding(
@@ -5912,8 +5913,7 @@ class ObjectiveFunction(object):
5912
5913
 
5913
5914
  if self.no_extra_param:
5914
5915
  dispersion_poisson = 0
5915
- print('b :', len(b))
5916
- print(self.get_param_num())
5916
+
5917
5917
  baby = self.get_param_num()
5918
5918
  if len(b) != baby:
5919
5919
  print('modify')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.203
3
+ Version: 0.1.205
4
4
  Summary: Extensive Testing for Estimation of Data Count Models
5
5
  Home-page: https://github.com/zahern/CountDataEstimation
6
6
  Author: Zeke Ahern