Posts

Showing posts with the label change point

GA Vibes Part 2

Image
 As a final exercise for the change point Genetic Algorithm (GA), I'll apply it to global temperature anomaly  data from climate.gov . I applied the GA to this data. $ python src/ga_cp_bic.py /mnt/c/Users/bbth/OneDrive/analytic_garden/GA/data/Temperature_1880_2024.csv -R 5 -m 7 Num Breakpoints: 0 Restart: 1 MSE: 0 .10286155700349382 BIC: -319.83037125244255 Restart: 2 MSE: 0 .10780974084485254 BIC: -313.01768583106514 Restart: 3 MSE: 0 .08734095963729796 BIC: -343.5472153386782 Restart: 4 MSE: 0 .10132137776725991 BIC: -322.0179216010041 Restart: 5 MSE: 0 .10279682698913807 BIC: -319.9216473989269 Train MSE: 0 .08734095963729796 Random number seed: 1757604284 Breaks: [] Slopes: [ 0 .00282703 ] Initial slope: -5.444485953515934 BIC: -343.5472153386782 Num Breakpoints: 1 Restart: 1 MSE: 0 .017966374806006904 BIC: -562.8847985227927 Restart: 2 MSE: 0 .02173895666295018 BIC: -535.2472265839913 Restart: 3 MSE: 0...

GA Vibes

Image
https://en.wikipedia.org/wiki/Chromosome#/media/File:Chromosome_structure.png I have been interested in  evolutionary computation  (EC) for quite a while. Evolutionary computation is a family of algorithms for global optimization inspired by biological evolution. Genetic algorithms  (GA) are a form of EC commonly used for the solution of optimization problems. The method is inspired by natural selection. In a genetic algorithm, a population of candidate solutions to the optimization problem are encoded as chromosomes, an analogy to biological chromosomes. Each chromosome is an encoding of the parameters needed to generate a possible value of the function being optimized. The encoding might be a bitmap, a vector, program code, or any representation that can be used to calculate the objective function. For each chromosome, a fitness or score is calculated. The score is the value of the objective function for that chromosome. The full evaluation of the set of chrom...