-
Notifications
You must be signed in to change notification settings - Fork 1
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
jp/deflation #5
jp/deflation #5
Conversation
…ism and include the first example where 9 solutions are found.
This is really cool! In terms of the terminology we've been using, are they all equilibrium measures? I think the global minimizer is called the equilibrium measure and the other potential local minimizers are just referred to as steady states and non uniqueness of steady states is not necessarily the same as non uniqueness of the equilibrium measures. We should maybe compute the energies along with the measures to check this. |
great, thanks! in terms of the code, does that mean just computing the energies of all the 9 solutions in the example script? Is there anything else you had in mind? |
Yes, the energies should be greater than the equilibrium measure which has 3 intervals, and can currently only be computed in Mathematica you’ll need the log transform implemented to compute the energy, though point wise evaluation is fine and is easier to compute. Check out |
Am I wrong in thinking that implementing the log transform for weighted U in this example can be done by simply re-implementing the already coded up log transform for weighted T (stieltjes.jl, lines 157-171)? |
is only for evaluating the log transform on the same interval. You can tell because What we need for two-intervals is evaluating when For comparison, for the Hilbert/Stieltjes case we have and |
ok! and here we only want to perform the log transform over the range where the (feasible) measures are supported? So not on the whole domain (a,b)? |
We want two things:
x = 0.1 # some real point, either on the domain or not
W = Weighted(ChebyshevU())
t = axes(W,1)
log.(abs.(x .- t')) * W # should return a row-vector This could be done by creating const LogKernelPoint{T,V,D} = BroadcastQuasiMatrix{T,typeof(log),BroadcastQuasiMatrix{T,typeof(abs),Tuple{BroadcastQuasiMatrix{T,typeof(-),Tuple{T,QuasiAdjoint{V,Inclusion{V,D}}}}}}} by mimicking
|
So should the following already be working?
I currently get a
|
You have an extra |
because I did.. fixed my example |
without the extra ', I am still getting an error:
|
Ah, for some reason it's only working for complex numbers right now: julia> inv.(x .- t') * W
transpose((ComplexF64) .* ((ComplexF64) .^ ℵ₀-element InfiniteArrays.OneToInf{Int64} with indices OneToInf() with indices OneToInf()) with indices OneToInf()) with indices Base.OneTo(1)×OneToInf():
0.0917376-1.29575im -0.531751-0.0756742im -0.0467394+0.21711im … I'll have to look into that... |
Actually the issue isn't real or complex, it's that the code for evaluation when JuliaApproximation/ClassicalOrthogonalPolynomials.jl#66 has a fix. |
Thanks @dlfivefifty! Switching to the branch I suppose that implementing the evaluation of the energy at a point for the log-kernel would be part of a seperate PR for ClassicalOrthogonalPolynomials.jl. Would you want to merge this deflation PR into EquilibriumMeasures.jl or leave it as a branch for now? |
Let’s merge this, but perhaps it would be helpful to make it support other types like |
I am willing to give it a go! This would be my first time dealing with |
This is more basic Julia. Eg some tricks are to use |
Okay! So I think it's working in the sense that giving initial guesses that are |
Changes made! Thanks for going through the code @dlfivefifty |
For the record: we need the following branch I'll try to get this working with a custom Manifest.toml |
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
=========================================
Coverage ? 97.29%
=========================================
Files ? 1
Lines ? 74
Branches ? 0
=========================================
Hits ? 72
Misses ? 2
Partials ? 0 Continue to review full report at Codecov.
|
Here are the necessary modifications to the Newton iteration in the
equilibriummeasure
function to utilize deflation when looking for multiple solutions of a one-interval log-kernel equilbrium measures problem. The Newton update is computed as normal and then (nonlinearly) scaled to prevent the Newton method converging to an already discovered solution.An example of a problem with 9 solutions (3 feasible) is found in
examples/non-unique-equilibrium-measure.jl
.