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

univariate/bivariate option for ElementPenalty plot recipe #19

Open
joshday opened this issue Mar 15, 2017 · 1 comment
Open

univariate/bivariate option for ElementPenalty plot recipe #19

joshday opened this issue Mar 15, 2017 · 1 comment

Comments

@joshday
Copy link
Member

joshday commented Mar 15, 2017

@Evizero, how did you make the bivariate parameter plots? It would be great if we could make either version from the recipe.

@Evizero
Copy link
Member

Evizero commented Mar 15, 2017

The code is here: https://github.com/JuliaML/FileStorage/blob/master/PenaltyFunctions/createplots.jl#L37-L64

Well since you call me out I will have to admit that I do it very inefficiently 😄

Basically the bivariate parameter plot is just slice through the cost surface of the penalty; a single contour of a contourplot in other words. Since the cost grows differently for each penalty, the level at which this slice is taken differs from one penalty to the next. So I do it in two steps:

  1. Compute the cost value of interest for the specific penalty, which I do by computing the value at [1., 0.]. I do it there because I want all the paths to go through that point. This is the contour level of the cost surface that we want to trace.

  2. Compute a huge grid for the x and y values between -1 and 1, but only keep the coordinates where value(penalty, [xi, yi]) is approximately the value computed in step 1.

As you can see this method is not at all optimal (or precise for that matter). The problem breaks down to computing a specific single contour of a surface. There must be some algorithm around that does that I reckon, but I did not investigate

bivariate_elem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants