This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division # use // for integer division | |
from __future__ import absolute_import # use from . import | |
from __future__ import print_function # use print("...") instead of print "..." | |
from __future__ import unicode_literals # all the strings are unicode | |
__author__ = 'Youhei Akimoto' | |
import sys | |
import pprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Module for Computationally Efficient Eigen Decomposition of Low Rank Matrix | |
! | |
! ALGORITHM | |
! --------- | |
! This module provides functionarities to compute the eigen decomposition of | |
! a real-valued matrix of the form | |
! C = alpha * Q * B * Q' + beta * X * X' + gamma * Y * Y', | |
! where | |
! Q: m-by-n with orthonormal columns | |
! B: n-by-n symmetric matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division # use // for integer division | |
from __future__ import absolute_import # use from . import | |
from __future__ import print_function # use print("...") | |
from __future__ import unicode_literals # all the strings are unicode | |
__author__ = 'Youhei Akimoto' | |
import numpy as np | |
from numpy import sqrt, exp, log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division # use // for integer division | |
from __future__ import absolute_import # use from . import | |
from __future__ import print_function # print function | |
from __future__ import unicode_literals # all the strings are unicode | |
__author__ = 'Youhei Akimoto' | |
import warnings | |
from math import sqrt, exp, log, ceil, floor | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import # use from . import | |
from __future__ import division # use // for integer division | |
from __future__ import print_function # use print() instead of print | |
from __future__ import unicode_literals # all the strings are unicode | |
"""Iterative Algorithm Interface | |
This module provides the framework for iterative algorithms. It consists of the following classes | |
ABCIterativeAlgorithm: | |
The interface of iterative algorithms equipped with logging and plotting functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import # use from . import | |
from __future__ import division # use // for integer division | |
from __future__ import print_function # use print() instead of print | |
from __future__ import unicode_literals # all the strings are unicode | |
"""Iterative Algorithm Interface | |
This module provides the framework for iterative algorithms. It consists of the following classes | |
ABCIterativeAlgorithm: | |
The interface of iterative algorithms equipped with logging and plotting functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import warnings | |
from collections import deque | |
import math | |
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
class DdCma: | |
"""dd-CMA: CMA-ES with diagonal decoding [1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import time | |
import numpy as np | |
from scipy.stats import kendalltau # tau-b in scipy v1.1.0 | |
class AdaptiveSimulationSwitcher: | |
"""Adaptive Switching Strategy | |
In simulation-basedf optimization we often have access to multiple simulators or surrogate models that approximate a computationally expensive or intractable objective function with different trade-offs between the fidelity and computational time. Such a setting is called multi-fidelity optimization. | |
This is a python code of the strategy proposed in the following reference to adaptively select which simulator to use during optimization of comparison-based evolutionary algorithms. Our adaptive switching strategy works as a wrapper of multiple simulators: optimization algorithms optimize the wrapper function and the adaptive switching strategy selects a simulator inside the wrapper. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy import stats | |
from scipy.optimize import minimize | |
"""Saddle Point Optimization with Approximate Minimization Oracle | |
Adversarial Evolution Strategy : Zero-order saddle point optimizer | |
Adversarial SLSQP : First-order saddle point optimizer | |
Its extended version is available at (https://gist.github.com/youheiakimoto/ab51e88c73baf68effd95b750100aad0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy import stats | |
import matplotlib.pyplot as plt | |
"""Adversarial-CMA-ES: derivative-free min-max optimization solver using (1+1)-CMA-ES [1] | |
It is an extention of Adversarial Evolution Strategy [2] | |
(https://gist.github.com/youheiakimoto/15212dbf46dc546af20af38b0b48ff17) | |
Reference | |
--------- |
OlderNewer