eggp 2.0.0__tar.gz → 2.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eggp
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary: Python Wheels for eggp algorithm.
5
5
  Author-email: Fabricio Olivetti <folivetti@users.noreply.github.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -793,7 +793,7 @@ To install eggp you'll need:
793
793
  - `libz`
794
794
  - `libnlopt`
795
795
  - `libgmp`
796
- - `ghc-9.6.6`
796
+ - `ghc-9.14.1`
797
797
  - `cabal` or `stack`
798
798
 
799
799
  ### Method 1: PIP
@@ -91,7 +91,7 @@ To install eggp you'll need:
91
91
  - `libz`
92
92
  - `libnlopt`
93
93
  - `libgmp`
94
- - `ghc-9.6.6`
94
+ - `ghc-9.14.1`
95
95
  - `cabal` or `stack`
96
96
 
97
97
  ### Method 1: PIP
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
12
12
 
13
13
  [project]
14
14
  name = "eggp"
15
- version = "2.0.0"
15
+ version = "2.2.0"
16
16
  authors = [{ name = "Fabricio Olivetti", email = "folivetti@users.noreply.github.com" }]
17
17
  description = "Python Wheels for eggp algorithm."
18
18
  readme = "README.md"
@@ -44,13 +44,13 @@ def _get_hs_eggp_run_data():
44
44
  ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int,
45
45
  ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int,
46
46
  ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int,
47
- ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int, ctypes.c_int,
47
+ ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int, ctypes.c_int,
48
48
  ]
49
49
  lib.hs_eggp_run_data.restype = ctypes.c_char_p
50
50
  _hs_eggp_run_data = lib.hs_eggp_run_data
51
51
  return _hs_eggp_run_data
52
52
 
53
- VERSION: str = "2.0.0"
53
+ VERSION: str = "2.2.0"
54
54
 
55
55
 
56
56
  _hs_rts_init: bool = False
@@ -88,11 +88,11 @@ def main(args: List[str] = []) -> int:
88
88
  with hs_rts_init(rts_args + cli_args):
89
89
  return unsafe_hs_eggp_main()
90
90
 
91
- def eggp_run(dataset: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time : int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames : str, useFracBayes: int, dbFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str:
91
+ def eggp_run(dataset: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time : int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames : str, useFracBayes: int, dbFile: str = "", dbFitFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str:
92
92
  with hs_rts_init():
93
- return unsafe_hs_eggp_run(dataset, gen, nPop, maxSize, nTournament, pc, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbDataset, dbCacheSize, dbFlushEvery)
93
+ return unsafe_hs_eggp_run(dataset, gen, nPop, maxSize, nTournament, pc, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbFitFile, dbDataset, dbCacheSize, dbFlushEvery)
94
94
 
95
- def eggp_run_data(data: np.ndarray, nrows: List[int], header: str, params: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time : int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames : str, useFracBayes: int, dbFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str:
95
+ def eggp_run_data(data: np.ndarray, nrows: List[int], header: str, params: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time : int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames : str, useFracBayes: int, dbFile: str = "", dbFitFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str:
96
96
  ''' Runs eggp with the dataset passed directly as a contiguous double
97
97
  array, bypassing the temp-CSV round trip.
98
98
 
@@ -113,7 +113,7 @@ def eggp_run_data(data: np.ndarray, nrows: List[int], header: str, params: str,
113
113
  cdata = data.ctypes.data_as(ctypes.POINTER(ctypes.c_double))
114
114
  cnrows = (ctypes.c_int * len(nrows))(*nrows)
115
115
  with hs_rts_init():
116
- out = _get_hs_eggp_run_data()(cdata, cnrows, len(nrows), data.shape[1], header.encode(), params.encode(), gen, nPop, maxSize, nTournament, pc, pm, nonterminals.encode(), loss.encode(), optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo.encode(), loadFrom.encode(), varnames.encode(), useFracBayes, dbFile.encode(), dbDataset.encode(), dbCacheSize, dbFlushEvery)
116
+ out = _get_hs_eggp_run_data()(cdata, cnrows, len(nrows), data.shape[1], header.encode(), params.encode(), gen, nPop, maxSize, nTournament, pc, pm, nonterminals.encode(), loss.encode(), optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo.encode(), loadFrom.encode(), varnames.encode(), useFracBayes, dbFile.encode(), dbFitFile.encode(), dbDataset.encode(), dbCacheSize, dbFlushEvery)
117
117
  return out.decode("utf-8") if out is not None else ""
118
118
 
119
119
  def make_function(expression, loss="MSE"):
@@ -233,7 +233,7 @@ class EGGP(BaseEstimator, RegressorMixin):
233
233
  >>> estimator = EGGP(loss="Bernoulli")
234
234
  >>> estimator.fit(X, y)
235
235
  """
236
- def __init__(self, gen = 100, nPop = 100, maxSize = 15, nTournament = 3, pc = 0.9, pm = 0.3, nonterminals = "add,sub,mul,div", loss = "MSE", optIter = 50, optRepeat = 2, nParams = -1, folds = 1, max_time = -1, simplify = False, trace = False, generational = False, dumpTo = "", loadFrom = "", useFracBayes = False, pinball_tau = 0.5, dbFile = "", dbDataset = "", dbCacheSize = 100000, dbFlushEvery = 0):
236
+ def __init__(self, gen = 100, nPop = 100, maxSize = 15, nTournament = 3, pc = 0.9, pm = 0.3, nonterminals = "add,sub,mul,div", loss = "MSE", optIter = 50, optRepeat = 2, nParams = -1, folds = 1, max_time = -1, simplify = False, trace = False, generational = False, dumpTo = "", loadFrom = "", useFracBayes = False, pinball_tau = 0.5, dbFile = "", dbFitFile = "", dbDataset = "", dbCacheSize = 100000, dbFlushEvery = 0):
237
237
  nts = "add,sub,mul,div,power,powerabs,\
238
238
  aq,abs,sin,cos,tan,sinh,cosh,tanh,\
239
239
  asin,acos,atan,asinh,acosh,atanh,sqrt,\
@@ -297,6 +297,7 @@ class EGGP(BaseEstimator, RegressorMixin):
297
297
  self.useFracBayes = int(useFracBayes)
298
298
  self.pinball_tau = pinball_tau
299
299
  self.dbFile = dbFile
300
+ self.dbFitFile = dbFitFile
300
301
  self.dbDataset = dbDataset
301
302
  self.dbCacheSize = dbCacheSize
302
303
  self.dbFlushEvery = dbFlushEvery
@@ -389,7 +390,7 @@ class EGGP(BaseEstimator, RegressorMixin):
389
390
 
390
391
  dname = self.get_fname("", header)
391
392
 
392
- csv_data = eggp_run_data(combined, [combined.shape[0]], ",".join(header), dname, self.gen, self.nPop, self.maxSize, self.nTournament, self.pc, self.pm, self.nonterminals, self.loss_arg, self.optIter, self.optRepeat, self.nParams, self.folds, self.max_time, self.simplify, self.trace, self.generational, self.dumpTo, self.loadFrom, varnames, self.useFracBayes, self.dbFile, self.dbDataset, self.dbCacheSize, self.dbFlushEvery)
393
+ csv_data = eggp_run_data(combined, [combined.shape[0]], ",".join(header), dname, self.gen, self.nPop, self.maxSize, self.nTournament, self.pc, self.pm, self.nonterminals, self.loss_arg, self.optIter, self.optRepeat, self.nParams, self.folds, self.max_time, self.simplify, self.trace, self.generational, self.dumpTo, self.loadFrom, varnames, self.useFracBayes, self.dbFile, self.dbFitFile, self.dbDataset, self.dbCacheSize, self.dbFlushEvery)
393
394
 
394
395
  if len(csv_data) > 0:
395
396
  csv_io = StringIO(csv_data.strip())
@@ -424,7 +425,7 @@ class EGGP(BaseEstimator, RegressorMixin):
424
425
  dname = self.get_fname("", header)
425
426
 
426
427
  csv_data = eggp_run_data(data, nrows, ",".join(header), dname, self.gen, self.nPop, self.maxSize, self.nTournament, self.pc, self.pm,
427
- self.nonterminals, self.loss_arg, self.optIter, self.optRepeat, self.nParams, self.folds, self.max_time, self.simplify, self.trace, self.generational, self.dumpTo, self.loadFrom, varnames, self.useFracBayes, self.dbFile, self.dbDataset, self.dbCacheSize, self.dbFlushEvery)
428
+ self.nonterminals, self.loss_arg, self.optIter, self.optRepeat, self.nParams, self.folds, self.max_time, self.simplify, self.trace, self.generational, self.dumpTo, self.loadFrom, varnames, self.useFracBayes, self.dbFile, self.dbFitFile, self.dbDataset, self.dbCacheSize, self.dbFlushEvery)
428
429
 
429
430
  if len(csv_data) > 0:
430
431
  csv_io = StringIO(csv_data.strip())
@@ -10,8 +10,8 @@ int unsafe_hs_eggp_main() {
10
10
  return hs_eggp_main();
11
11
  }
12
12
 
13
- char * unsafe_hs_eggp_run( char *dataset, int gens, int nPop, int maxSize, int nTournament, double pc, double pm, char *nonterminals, char *loss, int optIter, int optRepeat, int nParams, int split, int max_time, int simplify, int trace, int generational, char *dumpTo, char *loadFrom, char *varnames, int useFracBayes, char *dbFile, char *dbDataset, int dbCacheSize, int dbFlushEvery ) {
14
- return hs_eggp_run(dataset, gens, nPop, maxSize, nTournament, pc, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbDataset, dbCacheSize, dbFlushEvery);
13
+ char * unsafe_hs_eggp_run( char *dataset, int gens, int nPop, int maxSize, int nTournament, double pc, double pm, char *nonterminals, char *loss, int optIter, int optRepeat, int nParams, int split, int max_time, int simplify, int trace, int generational, char *dumpTo, char *loadFrom, char *varnames, int useFracBayes, char *dbFile, char *dbFitFile, char *dbDataset, int dbCacheSize, int dbFlushEvery ) {
14
+ return hs_eggp_run(dataset, gens, nPop, maxSize, nTournament, pc, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbFitFile, dbDataset, dbCacheSize, dbFlushEvery);
15
15
  }
16
16
 
17
17
  void unsafe_hs_eggp_init(int argc, char **argv) {
@@ -59,6 +59,6 @@ void unsafe_py_write_stderr( char * str) {
59
59
 
60
60
  char * unsafe_hs_eggp_version();
61
61
  int unsafe_hs_eggp_main();
62
- char * unsafe_hs_eggp_run( char *dataset, int gens, int nPop, int maxSize, int nTournament, double p, double pm, char *nonterminals, char *loss, int optIter, int optRepeat, int nParams, int split, int max_time, int simplify, int trace, int generational, char *dumpTo, char *loadFrom, char *varnames, int useFracBayes, char *dbFile, char *dbDataset, int dbCacheSize, int dbFlushEvery);
62
+ char * unsafe_hs_eggp_run( char *dataset, int gens, int nPop, int maxSize, int nTournament, double p, double pm, char *nonterminals, char *loss, int optIter, int optRepeat, int nParams, int split, int max_time, int simplify, int trace, int generational, char *dumpTo, char *loadFrom, char *varnames, int useFracBayes, char *dbFile, char *dbFitFile, char *dbDataset, int dbCacheSize, int dbFlushEvery);
63
63
  void unsafe_hs_eggp_init(int argc, char **argv);
64
64
  void unsafe_hs_eggp_exit();
@@ -11,4 +11,4 @@ else:
11
11
  class Session(Protocol):
12
12
  def version(self) -> str: ...
13
13
  def main(self, args: List[str] = []) -> int: ...
14
- def eggp_run(self, dataset: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time: int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames: str, useFracBayes: int, dbFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str: ...
14
+ def eggp_run(self, dataset: str, gen: int, nPop: int, maxSize: int, nTournament: int, pc: float, pm: float, nonterminals: str, loss: str, optIter: int, optRepeat: int, nParams: int, split: int, max_time: int, simplify: int, trace : int, generational : int, dumpTo: str, loadFrom: str, varnames: str, useFracBayes: int, dbFile: str = "", dbFitFile: str = "", dbDataset: str = "", dbCacheSize: int = 100000, dbFlushEvery: int = 0) -> str: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eggp
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary: Python Wheels for eggp algorithm.
5
5
  Author-email: Fabricio Olivetti <folivetti@users.noreply.github.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -793,7 +793,7 @@ To install eggp you'll need:
793
793
  - `libz`
794
794
  - `libnlopt`
795
795
  - `libgmp`
796
- - `ghc-9.6.6`
796
+ - `ghc-9.14.1`
797
797
  - `cabal` or `stack`
798
798
 
799
799
  ### Method 1: PIP
@@ -6,7 +6,6 @@ src/eggp/__init__.py
6
6
  src/eggp/__main__.py
7
7
  src/eggp/_binding.pyi
8
8
  src/eggp/binding.i
9
- src/eggp/binding.py
10
9
  src/eggp/typing.py
11
10
  src/eggp.egg-info/PKG-INFO
12
11
  src/eggp.egg-info/SOURCES.txt
@@ -1,76 +0,0 @@
1
- # This file was automatically generated by SWIG (https://www.swig.org).
2
- # Version 4.4.1
3
- #
4
- # Do not make changes to this file unless you know what you are doing - modify
5
- # the SWIG interface file instead.
6
-
7
- from sys import version_info as _swig_python_version_info
8
- # Import the low-level C/C++ module
9
- if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
10
- from . import _binding
11
- else:
12
- import _binding
13
-
14
- try:
15
- import builtins as __builtin__
16
- except ImportError:
17
- import __builtin__
18
-
19
- def _swig_repr(self):
20
- try:
21
- strthis = "proxy of " + self.this.__repr__()
22
- except __builtin__.Exception:
23
- strthis = ""
24
- return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
25
-
26
-
27
- def _swig_setattr_nondynamic_instance_variable(set):
28
- def set_instance_attr(self, name, value):
29
- if name == "this":
30
- set(self, name, value)
31
- elif name == "thisown":
32
- self.this.own(value)
33
- elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
34
- set(self, name, value)
35
- else:
36
- raise AttributeError("You cannot add instance attributes to %s" % self)
37
- return set_instance_attr
38
-
39
-
40
- def _swig_setattr_nondynamic_class_variable(set):
41
- def set_class_attr(cls, name, value):
42
- if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
43
- set(cls, name, value)
44
- else:
45
- raise AttributeError("You cannot add class attributes to %s" % cls)
46
- return set_class_attr
47
-
48
-
49
- def _swig_add_metaclass(metaclass):
50
- """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
51
- def wrapper(cls):
52
- return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
53
- return wrapper
54
-
55
-
56
- class _SwigNonDynamicMeta(type):
57
- """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
58
- __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
59
-
60
-
61
-
62
- def unsafe_hs_eggp_version():
63
- return _binding.unsafe_hs_eggp_version()
64
-
65
- def unsafe_hs_eggp_main():
66
- return _binding.unsafe_hs_eggp_main()
67
-
68
- def unsafe_hs_eggp_run(dataset, gens, nPop, maxSize, nTournament, p, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbDataset, dbCacheSize, dbFlushEvery):
69
- return _binding.unsafe_hs_eggp_run(dataset, gens, nPop, maxSize, nTournament, p, pm, nonterminals, loss, optIter, optRepeat, nParams, split, max_time, simplify, trace, generational, dumpTo, loadFrom, varnames, useFracBayes, dbFile, dbDataset, dbCacheSize, dbFlushEvery)
70
-
71
- def unsafe_hs_eggp_init(argc):
72
- return _binding.unsafe_hs_eggp_init(argc)
73
-
74
- def unsafe_hs_eggp_exit():
75
- return _binding.unsafe_hs_eggp_exit()
76
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes