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

Implement the finding of points lying on a contour of a given function value (aka CONTOUR) #31

Closed
beniz opened this issue May 6, 2014 · 4 comments

Comments

@beniz
Copy link
Collaborator

beniz commented May 6, 2014

This is the CONTOUR subroutine implemented in Minuit and used in ROOT.

@beniz
Copy link
Collaborator Author

beniz commented May 12, 2014

Depends on minos, #30

beniz pushed a commit that referenced this issue May 22, 2014
…al points for deriving a contour line for a pair of parameters, ref #31
@beniz
Copy link
Collaborator Author

beniz commented May 22, 2014

Due to dependency to confidence interval computation, work on contour is taking place on the 'minos' branch.

Contour comes a set of points defining the contour curve that passes by a pair of parameter px, py around the minimum.

For now the initial four points are computed, from which a higher granularity contour can be computed.

Below is a first visualization of those points for a Rosenbrock 2D function. The red dots are the computed points.
rosen_contour2d_test1
Producing contour curves with more points should be the next step.

@beniz
Copy link
Collaborator Author

beniz commented Jul 8, 2014

Contour is now working correctly for an arbitrary number of points.

Examples below are for a 100 points in 10-D. o

  • fsphere in 10-D
    fsphere_contour

btained with:

./test_functions -fname fsphere -dim 10 -contour 0,1 -contour_p 100

that yields

[[-0.324902,-1.01401e-08],[-0.315921,-0.0132615],[-0.314858,-0.0292426],[-0.313066,-0.0446029],[-0.310504,-0.0598537],[-0.307223,-0.0749257],[-0.303197,-0.0898161],[-0.298457,-0.104512],....

and plotted with matplolib:

import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

a=[[-0.324902,-1.01401e-08],[-0.315921,-0.0132615],[-0.314858,-0.0292426],[-0.313066,-0.0446029],[-0.310504,-0.0598537],[-0.307223,-0.0749257],[-0.303197,-0.0898161],[-0.298457,-0.104512],...

plt.plot(*zip(*a),marker='o',ls='')
plt.show()
  • ellirot in 10-D
    ellirot_contour

obtained with

./test_functions -fname ellirot -dim 10 -contour 0,1 -contour_p 100
  • rosenbrock in 10-D
    rosenbrock_contour

obtained with

./test_functions -fname rosenbrock -dim 10 -contour 0,1 -contour_p 100 -contour_fup 90 -sigma0 0.1

beniz pushed a commit that referenced this issue Nov 12, 2014
@beniz
Copy link
Collaborator Author

beniz commented Nov 12, 2014

merged into dev, will be part of next release.

@beniz beniz closed this as completed Nov 12, 2014
beniz pushed a commit that referenced this issue Nov 12, 2014
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
…al points for deriving a contour line for a pair of parameters, ref CMA-ES#31
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant