StackGP 0.0.10__tar.gz → 0.0.12__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: StackGP
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: A stack-based genetic programming system
5
5
  Author-email: Nathan Haut <hautnath@msu.edu>
6
6
  Project-URL: Homepage, https://github.com/hoolagans/StackGP
@@ -812,8 +812,19 @@ def uncertainty(data,trim=0.3):
812
812
  return h
813
813
  else:
814
814
  return 0
815
-
815
+
816
816
  def evaluateModelEnsemble(ensemble, inputData):
817
+ responses=[evaluateGPModel(mod, inputData) for mod in ensemble]
818
+ if type(responses[0])==np.ndarray:
819
+ responses=np.transpose(responses)
820
+ predictions=[np.median(res) for res in responses]
821
+ else:
822
+
823
+ predictions=[np.median(responses)]
824
+
825
+ return predictions
826
+
827
+ def evaluateModelEnsembleUncertainty(ensemble, inputData):
817
828
  responses=[evaluateGPModel(mod, inputData) for mod in ensemble]
818
829
  if type(responses[0])==np.ndarray:
819
830
  responses=np.transpose(responses)
@@ -821,10 +832,10 @@ def evaluateModelEnsemble(ensemble, inputData):
821
832
  else:
822
833
 
823
834
  uncertainties=[uncertainty(responses,0)]
824
-
825
835
  return uncertainties
836
+
826
837
  def relativeEnsembleUncertainty(ensemble,inputData):
827
- output=evaluateModelEnsemble(ensemble,inputData)
838
+ output=evaluateModelEnsembleUncertainty(ensemble,inputData)
828
839
  return np.array(output)
829
840
 
830
841
  def createUncertaintyFunc(ensemble):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StackGP
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: A stack-based genetic programming system
5
5
  Author-email: Nathan Haut <hautnath@msu.edu>
6
6
  Project-URL: Homepage, https://github.com/hoolagans/StackGP
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "StackGP"
3
- version = "0.0.10"
3
+ version = "0.0.12"
4
4
  authors = [
5
5
  { name="Nathan Haut", email="hautnath@msu.edu" },
6
6
  ]
File without changes
File without changes
File without changes
File without changes