-
-
Notifications
You must be signed in to change notification settings - Fork 41
Generalizing minimal initializers #267
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
Conversation
|
I think that we can generalize the minimal reservoir inits even more now by also having some random sign changes there. For this we need to format function bernoulli!(rng::AbstractRNG, vecormat::AbstractVecOrMat; p::Number=0.5)
for idx in eachindex(vecormat)
if rand(rng) > p # keeping current approach consistent
vecormat[idx] = - vecormat[idx]
end
end
endand then having the option to change signs in the inits functions like so function delay_line!(rng::AbstractRNG, reservoir_matrix::AbstractMatrix, weight::AbstractVector,
shift::Int; sampling_type=:default, kwargs...) # :bernoulli, :irrational
for idx in first(axes(reservoir_matrix, 1)):(last(axes(reservoir_matrix, 1)) - shift)
reservoir_matrix[idx + shift, idx] = weight[idx]
end
f_sample = getfield(@__MODULE__, sampling_type)
f_sample!(rng, reservoir_matrix; kwargs...)
end |
|
Not really sure why docs are failing, locally they compile just fine. @ChrisRackauckas I can't access the buildkite log it seems, is there any way to get access? |
|
Pipeline is public now. |
|
Awesome, thanks |
|
I'm getting and it doesn't allow me to relaunch the workflow |
|
all seems to be fine now |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Closes #265. I am thinking if the building pieces need to be user facing too. I need to update existing documentation to reflect the new flexibility of the initializers (option of using vector of values for
weight). Add docstrings to the building pieces too if they become public api.