Imports ..

Functions

### Notes¶

• Refactor ... FEM .. i.e. Fitness, Engine, and Metrics modules
• Learn Chart or some graphing in Haskell
• Use Cubic Splines as representation ..
• Try gross evolution then hand the population to new run with tiny deltas ..

#### Software versions ..¶

• v04d_hack_301_pareto_splines - Spawned from v04d_hack_301_pareto. Adding cubic splines.
• v04d_hack_301_pareto_newIC - Tried initializing population with single gaussian and then using pareto to add some inflections. Added too many!
• v04d_hack_301_pareto - Up to date graphing functions. Simple pareto with two weights, smoothness and fit. No fitness scaling. No PSO. Reduces 301 cols to 50 by skipping uniformly. Fitness E. 10 steps per sec. Threading forkOS.

• v04d_hack_301 - Old graphing functions. Full 301 fitness. No fitness scaling. No PSO. Fitness D. 1 step per sec. Threading forkOS.

• v04d_hack - Old graphing functions. Fitness C. PSO polyVals. 30 steps per second (problematic?). Threading forkOS.

• v04f_rank_poly - Old graphing fuctions. Fitness Scaling. PolyVals.

#### Probs / To Do¶

• Look at result of alphas and find one that has the correct amount of smoothness. Don't just rely on the generation method. This way we could go back to the straight 301 with no PSO!
• Go back to MSE and compare
• Do R G B in sections?
• Limit the size of transitions not just the number of transitions.
• Initialize with gaussian (tried it .. added deep transitions)
• Read selection paper .. search for more?
• Select 10 points and use cubic spline fit.
• Make 'c' changes logarithmic ..?
• What about assembling piecewise lines end to end .. Seems easy to evolve.
• Make the curve fit of columnar results the fitness ..
• Remove last point which goes way high ..?
• Find memory leak ..
• Make 'random' datatype outside of World which must be strict and go to MVar.Strict
• Or go back to really old version and find original memory leak .. Two problems?
• What is the Linear Algebra solution to the PCA space?
• List all the problems
• Graphing large vectors
• Why were pca_alphas 21! (not 20)
• Skipping generation
• Occasional crazy scatterplot
• Adding printout solves generation skip?
• Adding printout solves memory leak
• Incredible Pareto Video and Part II and Part III and Base and his university site and his website with source code.

### Read In the Raw Data¶

Read No Noise Full File PSD Data

### Data Prep ..

#### Compute the input column means¶

These are required to get the alphas back into real space

#### Convert the ECPolys to ECAlphas¶

Note: Here is how to do an (inverse_transform)[https://stackoverflow.com/questions/32750915/pca-inverse-transform-manually)

• The correct way to transform is
data_reduced = np.dot(data - pca.mean_, pca.components_.T)
• The inverse_transform is just the inverse process of transform
data_original = np.dot(data_reduced, pca.components_) + pca.mean_

#### Compute the polynomial¶

Note that the length of the fitness case inputs is 20, and the range of x's is
$\ \ \ \ \ 0.0 < x < 3.0$

#### Compute the input column means¶

These are required to get the alphas back into real space