Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMA-ES implementation and Force example #236

Closed
wants to merge 98 commits into from

Commits on May 10, 2023

  1. Resuming CMA-ES development

    Added all base method for the CMA-ES component of MTUQ. In the process of streamlining the parallel_cmaes.py implementation.
    thurinj committed May 10, 2023
    Configuration menu
    Copy the full SHA
    824db10 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. Added cmaes_parallel.py

    This will be the default file for development. Non-mpi version will be tested but might not be fully developed.
    thurinj committed May 11, 2023
    Configuration menu
    Copy the full SHA
    6c963f4 View commit details
    Browse the repository at this point in the history
  2. Added example script for MT

    thurinj committed May 11, 2023
    Configuration menu
    Copy the full SHA
    1d1f841 View commit details
    Browse the repository at this point in the history
  3. Update cmaes_parallel.py

    Corrected a few anomalies in the code. The path and cov update now correspond to purecma python package.
    thurinj committed May 11, 2023
    Configuration menu
    Copy the full SHA
    90f5751 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2023

  1. Create a new example for CMA-ES

    Based on GridSearch.FullMomentTensor.py, should provide a nice overview of the basic MT inversion with CMA-ES. Still work in progress.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    b2c1b2d View commit details
    Browse the repository at this point in the history
  2. Added Force source initialization tooltip.

    Added a new function to automatically create the list of parameters for force inversion.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    f537215 View commit details
    Browse the repository at this point in the history
  3. Cleanup file formating

    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    a595923 View commit details
    Browse the repository at this point in the history
  4. Added CMA-ES Force

    Work in progress Force CMA-ES application. Currently works with the "greens" mode in CMAES.Force.py
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    da37420 View commit details
    Browse the repository at this point in the history
  5. Update CMAES.FullMomentTensor.py

    Fixed import error and cleaned up debug plot.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    1b79189 View commit details
    Browse the repository at this point in the history
  6. Update CMAES.Force.py

    Tested the database mode on a depth-search.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    815d735 View commit details
    Browse the repository at this point in the history
  7. Revert "Update CMAES.Force.py"

    This reverts commit 815d735.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    aa596b3 View commit details
    Browse the repository at this point in the history
  8. Revert "Revert "Update CMAES.Force.py""

    This reverts commit aa596b3.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    2c47a0b View commit details
    Browse the repository at this point in the history
  9. Refined example scripts

    Overhauled the script description and populated with comments and recommendations on uses.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    b1ac1bf View commit details
    Browse the repository at this point in the history
  10. Removed local path description for databases.

    Local paths referring to my machine have been replaced with "generic" path to be changed by users.
    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    fd05f34 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    72eb74d View commit details
    Browse the repository at this point in the history
  12. Fixed waveform plot function.

    thurinj committed May 15, 2023
    Configuration menu
    Copy the full SHA
    e7403de View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2f1b81f View commit details
    Browse the repository at this point in the history
  14. Update cmaes_parallel.py

    thurinj authored May 15, 2023
    Configuration menu
    Copy the full SHA
    cebdbf9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    af3baee View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d707242 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. Configuration menu
    Copy the full SHA
    8fdbd06 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c13a2e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c07853f View commit details
    Browse the repository at this point in the history

Commits on May 17, 2023

  1. Boundary Handling

    Reset boundary handling method back to rand-based, instead of re-initialize.
    thurinj committed May 17, 2023
    Configuration menu
    Copy the full SHA
    de5613a View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Configuration menu
    Copy the full SHA
    d9e4bd3 View commit details
    Browse the repository at this point in the history
  2. Modified plotting

    Slight modification to allow for matplotlib backend plot for _plot_lune_matplotlib and the use of CMA-ES log as input for the main mtuq plot_misfit_lune() function
    thurinj committed May 25, 2023
    Configuration menu
    Copy the full SHA
    580869f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4018cc5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8853946 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9345a72 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a614901 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f8a771e View commit details
    Browse the repository at this point in the history
  8. Added comment

    Added the CMA-ES algorithm description in the introduction comment for reference.
    thurinj committed May 25, 2023
    Configuration menu
    Copy the full SHA
    b94f5ad View commit details
    Browse the repository at this point in the history
  9. Added line for desambiguation

    thurinj committed May 25, 2023
    Configuration menu
    Copy the full SHA
    b750600 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Configuration menu
    Copy the full SHA
    82ffdff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71ecd9e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9495ecc View commit details
    Browse the repository at this point in the history
  4. Update variable_encoder.py

    thurinj committed May 30, 2023
    Configuration menu
    Copy the full SHA
    3043a61 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6954577 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Optmized database mode

    Added a Green's function caching option to account for local database use with fixed origin. This fix increases the performance significantly, even if the database mode is not the preferred way of searching solutions for fixed origin.
    thurinj committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    72ac44f View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Created combined plot for FMT misfit visualization

    Combines the matplotlib backends misfit plots (lune and dc) into a figure for CMA-ES visualization.
    thurinj committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    13de416 View commit details
    Browse the repository at this point in the history
  2. Update double_couple.py

    Remove un-necessary default option preventing to change the colormap with **kwargs for some reason.
    thurinj committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    c64e1b1 View commit details
    Browse the repository at this point in the history
  3. Update _matplotlib.py

    Adjustments for combined_plots
    thurinj committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    bb3ed2e View commit details
    Browse the repository at this point in the history
  4. Update combined_plots.py

    Added ability to plot deviatoric and dc on the lune by padding result DataArrays with v and w = 0 if needed
    thurinj committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    8a94544 View commit details
    Browse the repository at this point in the history
  5. Update CMAES.FullMomentTensor.py

    Added new plotting options, and got rid of temporary parts of the base script.
    thurinj committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    f3662c0 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

  1. Implemented basic solve method

    Workin version of the future "Solve" method. TODO: clean the deprecated sections of the code, add checks and tests, and docstrings.
    thurinj committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    7180cbb View commit details
    Browse the repository at this point in the history
  2. Fix vw_random binning

    Fix the latitude binning so that it can plot values centered on 0 (requires odd number of grid cells)
    thurinj committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    4514059 View commit details
    Browse the repository at this point in the history
  3. Overhaul of parallel_CMA_ES class

    Fixed some of the plotting functions. Adding subroutines for readability and maintenance.
    thurinj committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    ce44404 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. Update cmaes_parallel.py

    Reorganized script, changing docstring to unified format, rename the main "Solve" method.
    thurinj committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    699a442 View commit details
    Browse the repository at this point in the history
  2. Update cmaes_parallel.py

    Continued docstring reformating
    thurinj committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    1964643 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Update cmaes_parallel.py

    Added new docstring for the Solve method and removed a useless input (replaced with inner CMA_ES_parallel mode attribute)
    thurinj committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    f283b04 View commit details
    Browse the repository at this point in the history
  2. Update CMAES.FullMomentTensor.py

    Remodeled the example script, and modified plotting function.
    thurinj committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    3c402a9 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Update _matplotlib.py

    Make sure that colored plots are displayed above the Lune's grid.
    thurinj committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    8547492 View commit details
    Browse the repository at this point in the history
  2. Update cmaes_parallel.py

    Iteration printing + plot scaling tuning.
    thurinj committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    b878da5 View commit details
    Browse the repository at this point in the history
  3. Removed cmaes_source.py

    Removed unused source file.
    thurinj committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    f8256b5 View commit details
    Browse the repository at this point in the history
  4. Delete cmaes.py

    Removed un-used source file (all functionalities are in the cmaes_parallel.py file, that will soon replace the base cmaes.py file)
    thurinj committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    72df9cc View commit details
    Browse the repository at this point in the history
  5. removed cmaes_parallel and replaced by cmaes

    Changed cmaes_parallel into cmaes for simplicity.
    thurinj committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    943eed4 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Update cmaes.py

    Corrected a bug that would prevent switching from the 5-column waveform plot to the 3-column waveform plot (if a single dataset/process was given)
    thurinj committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    33906d2 View commit details
    Browse the repository at this point in the history
  2. Update cmaes.py

    Modified log print
    thurinj committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    738601a View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. Enabling polarity misfit in CMA-ES

    Tweaked Polarity misfit class to improve compatibility with CMA-ES.
    Integrated polarity misfit in CMA-ES, and detection of polarity misfit for waveform plotting.
    thurinj committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    60b5126 View commit details
    Browse the repository at this point in the history
  2. Update cmaes.py

    Change checks order for polarity misfit avoidance in plot waveforms.
    thurinj committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    bfc7673 View commit details
    Browse the repository at this point in the history
  3. Update cmaes.py

    Pointing to incorrect variable in previous fix.
    thurinj committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    ecf99c7 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. Configuration menu
    Copy the full SHA
    54804d1 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2023

  1. Update cmaes.py

    Fixed bug that prevented using polarity misfit with CMA-ES automatic Solve function (and plotting).
    thurinj committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    194d7e5 View commit details
    Browse the repository at this point in the history
  2. Update CMAES.Force.py

    Changed dependency
    thurinj committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    092900a View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2023

  1. Update cmaes.py

    Added Solve method input check and implemented basic data normalization.
    thurinj committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    2ecfbff View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Update cmaes.py

    Implemented weighted misfit combination and fixed bugs.
    thurinj committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    2401fab View commit details
    Browse the repository at this point in the history
  2. Update lune.py

    Added a workaround for CMA-ES plotting method, where we want to plot the mean instead of the minimum misfit.
    thurinj committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    4244500 View commit details
    Browse the repository at this point in the history
  3. Update cmaes.py

    Several bug-solve. Normalization works both in terms of inversion and plotting.
    thurinj committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    b7fd4d7 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. Update force.py

    Allows plotting CMA-ES result (would fail otherwise when encountering a single sample in a bin)
    thurinj committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    13b0eb9 View commit details
    Browse the repository at this point in the history
  2. Revised _plot_lune() input args.

    Added a plot_type argument to allow more flexibility when plotting with the Matplotlib backend (allowing pcolormesh, scatter plots and contour plots).
    Correct docstrings for the _plot_lune_matplotlib() method.
    thurinj committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    05a4b7d View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Plot force rework

    Added "plot_type" argument to force plots functions
    thurinj committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    3dd41c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Removed keyword argument in lune plot

    Removed unnecessary argument that can go in **kwargs, to follow original syntax.
    thurinj committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    0ece7d8 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Update polarity.py

    Implemented polarity misfit for point-force sources. A test function has also been added in order to verify that the USE convention is respected.
    thurinj committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    b1e08e2 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. Update cmaes.py

    Removed unnecessary normalization.
    thurinj committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    5550da0 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Update variable_encoder.py

    Changed the default behavior for the v and w variable to "reinitialize" as it might helps with sampling close to the boundaries (even if making the convergence a bit slower).
    thurinj committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    494a948 View commit details
    Browse the repository at this point in the history
  2. Changed CMA-ES examples

    Updated CMA-ES examples with new input syntax (for weighted misfit)
    thurinj committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    a84c9b6 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Update _matplotlib.py

    Fixed tri-contour bug encountered with NaN values in force plots.
    thurinj committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    4c22271 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2023

  1. Update _matplotlib.py

    Fixed colormesh on the sphere by splitting the plot in two to avoid projection artifacts.
    thurinj committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    f45738d View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2023

  1. Update _matplotlib.py

    Corrected the mis-rotation of DC data
    thurinj committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    0a4dfeb View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. Configuration menu
    Copy the full SHA
    2d42cf1 View commit details
    Browse the repository at this point in the history
  2. Update CMAES.Force.py

    Replaced dataset with Ezgi's example.
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    4caf54e View commit details
    Browse the repository at this point in the history
  3. Update variable_encoder.py

    Changed default behavior for h to reinitialize for better exploration of both up and down hemispheres.
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    4cc82dd View commit details
    Browse the repository at this point in the history
  4. Update CMAES.Force.py

    Defined default example for the Force CMA-ES, based on the Barry Arm glacier Landslide
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    2099f80 View commit details
    Browse the repository at this point in the history
  5. Update CMAES.FullMomentTensor.py

    Modified default weights for CMA.Solve in the database mode.
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    b1f24d8 View commit details
    Browse the repository at this point in the history
  6. Modified figure naming conventions.

    Changed naming convention for figures, and added event_id field in example CMA object initialization.
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    b5d7dd2 View commit details
    Browse the repository at this point in the history
  7. Update cmaes.py

    Fixed final naming convention.
    thurinj committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    eebc577 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. Added Landslide example

    Added data from the Barry Arm landslide for force inversion examples.
    thurinj committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    1c7f98d View commit details
    Browse the repository at this point in the history
  2. Modified naming conventions for force GF

    Allowing different naming conventions for long-period data (MXZ, MXR, MXT on top of BXZ, BXR, BXT)
    thurinj committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    ae3158e View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Added automatic force plot in the Solve method

    Added the force sphere plot during the plotting phase of the Solve method. Also fixed the mean misfit location as the green circle in the plot (in-lieu of the minimum of the misfit map).
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    13d9d5d View commit details
    Browse the repository at this point in the history
  2. Update cmaes.py

    Added scatter plot functionality to force mode. The behavior will now be to return a different plot for each mode (Lune or Force sphere) based on CMA-ES mode (mt, mt_dc, mt_dev or force).
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    d6b451a View commit details
    Browse the repository at this point in the history
  3. Update CMAES.FullMomentTensor.py

    Added rank.0 plotting function (would otherwise cause problems on parallel jobs).
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    c100729 View commit details
    Browse the repository at this point in the history
  4. Update CMAES.Force.py

    Final version of the CMA-ES force example.
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    5033491 View commit details
    Browse the repository at this point in the history
  5. Create GridSearch.Force.py

    Created the Force Example for MTUQ based on the Barry Arm glacier landslide.
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    dd38642 View commit details
    Browse the repository at this point in the history
  6. Update .gitignore

    Restored default .gitignore
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    c08ba70 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a7dc653 View commit details
    Browse the repository at this point in the history
  8. Updated examples comments.

    Updated comment before final commit and PR.
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    38798f2 View commit details
    Browse the repository at this point in the history
  9. Update cmaes.py

    Change the type of import to mimic import of mpi4py in example scripts.
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    916d845 View commit details
    Browse the repository at this point in the history
  10. Update cmaes.py

    Added a check for mpi environment.
    thurinj committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    77625ab View commit details
    Browse the repository at this point in the history