Skip to content

Review for SequentialSamplingModels.jl #126

@rsenne

Description

@rsenne

Hi all!

I'm one of your reviewers for the The Proceedings of the JuliaCon Conferences. Overall, I think the package is a great addition to the ecosystem, but I have comments on the following items that I would like to hear your rebuttal or see changes before signing off.

Comments About the Code

  • The does not have error handling of invalid parameter combinations. For example, if I specified the following DDM model:
    DDM(ν = 1.0, α = -0.8, z = -473.89, τ = -1.0)
    no error is thrown. I think using either ArgCheck.jl
  • Many of the simulate functions could benefit from better memory allocation approaches. One possibility is to use something like sizehint!
  • More of a personal matter, but i think restructuring the src directory to have subdirs like you do on the documentation would be great.
  • Using specific seeds for the Random module is discouraged. 1.) Using randomness can make tests more reliable 2.) If you want to use RNGs, use StableRNGs
  • Personal choice, but I would suggest making the testing folder its own julia "project" with its own Project.toml file. I think this will make things easier to debug and you can remove all of the repeated library imports.
  • Instead of overloading Random.rand, you could define a custom sampler for your models which could simplify the API for some of the models.
    Something like this perhaps (I wrote this quick so might need to iron out some details...):
# Abstract type for all samplers
abstract type AbstractSSMSampler end

# Generic sampler struct that holds model + auxiliary data
struct SSMSampler{M<:Union{SSM1D,SSM2D}, D} <: AbstractSSMSampler
    model::M
    data::D
end

# Single rand method that dispatches on sampler type
function rand(rng::AbstractRNG, s::SSMSampler)
    _rand(rng, s.model, s.data)
end
  • Some of the ways "invalid" RTs are handled is inconsistent. For example, in the DDM:
    if τ ≥ t
        return T(NaN)
    end

but in LBA:

rt < τ ? (return 1e-10) : nothing

I think choosing a small positive constant makes more sense, and I would make this consistent across the package. Unless there is a reason I am missing?

Documentation

Overall very few comments.

  • I would make sure you have a stable documentation not just a dev documentation.
  • I feel the contribution guidelines are a little light. I think it would also be great if they were more front and center? Maybe on the home page?
  • I would turn your examples in the docstrings to doctests.
  • Would you consider adding codecov? It would be nice to know how much code is tested.

Comments on the paper

  • There are some plot rendering issues on the plots. For example, there are overlapping labels in figure 4.
  • Mentioning again here, you link to the dev documentation. I would change this to stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions