-
Notifications
You must be signed in to change notification settings - Fork 2
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
Expose Stopping criteria for sift function #19
Comments
The EmpiricalModeDecomposition.jl/src/sift.jl Line 85 in 37d82d0
and I guess this same concept is also used in other places: EmpiricalModeDecomposition.jl/src/sift.jl Line 46 in 37d82d0
To expose the stopping criteria in the linked paper, we do not need the absolute sum of the decomposed data. Instead, it requires the evaluation of the mode amplitude As you mentioned, we can add another keyword argument |
I am having some difficulties figuring out how to pass parameters. EmpiricalModeDecomposition.jl/src/sift.jl Line 80 in 37d82d0
but not stored as intermediate variables. Also, to keep the original criterion working, tol needs to be passed to the stop function, but right now it only accepts the intermediate var struct SiftState .
function sift(yvec, xvec=1:length(yvec), tol=0.1, stop_steps=4;
stop=stop_default)
imf = nothing
num_steps = 0
for (i, step) in enumerate(halt(SiftIterable(yvec, xvec, stop_steps), stop))
#@show sum(abs, step.yvec)
imf = step.yvec
num_steps = i
end
#@show num_steps
imf
end
"Default stopping criteria for sift."
function stop_default(state::SiftState)
ϵ = var(state.yvec) * 0.1 # tol
state.s <= ϵ
end Any ideas? |
I just took a brief look at the latest implementation of CG in IterativeSolver.jl. The structure looks to be in a better shape from which we can more or less borrow. |
There are different stopping criteria in use and it would be good to allow the user to set the stopping criteria as a function.
It might be enough to add the stof function as a keyword argument in the sift function.
One example for another stopping criteria as mentioned in #14
The text was updated successfully, but these errors were encountered: