StackGP 0.0.8__tar.gz → 0.0.9__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.8
3
+ Version: 0.0.9
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
@@ -632,7 +632,7 @@ def alignGPModel(model, data, response): #Aligns a model
632
632
  if np.isnan(np.array(prediction)).any() or np.isnan(np.array(response)).any() or not np.isfinite(np.array(prediction,dtype=np.float32)).all():
633
633
  return model
634
634
  try:
635
- align=np.polyfit(prediction,response,1,rcond=1e-16)#np.round(np.polyfit(prediction,response,1,rcond=1e-16),decimals=14)
635
+ align=np.round(np.polyfit(prediction,response,1,rcond=1e-16),decimals=14)#np.polyfit(prediction,response,1,rcond=1e-16)#np.round(np.polyfit(prediction,response,1,rcond=1e-16),decimals=14)
636
636
  except np.linalg.LinAlgError:
637
637
  #print("Alignment failed for: ", model, " with prediction: ", prediction, "and reference data: ", response)
638
638
  return model
@@ -688,7 +688,7 @@ def evolve(inputData, responseData, generations=100, ops=defaultOps(), const=def
688
688
 
689
689
  #paretoModels=paretoTournament(models)
690
690
  paretoModels=selectModels(models,elitismRate/100*popSize if elitismRate/100*popSize<len(models) else len(models))
691
- if extinction and i%extinctionRate:
691
+ if extinction and i%extinctionRate==0 and i>0:
692
692
  models=initializeGPModels(variableCount,ops,const,popSize)
693
693
  for mods in models:
694
694
  setModelQuality(mods,inData,resData,modelEvaluationMetrics=metrics)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StackGP
3
- Version: 0.0.8
3
+ Version: 0.0.9
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.8"
3
+ version = "0.0.9"
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