pagnani / ArDCA.jl

Autoregressive networks for protein
MIT License
33 stars 8 forks source link

More versatile loglikelihood #35

Closed PierreBarrat closed 7 months ago

PierreBarrat commented 7 months ago

I often use calls like loglikelihood(s, arnet) where s is not strictly a Vector{Int}. For instance, the following code fails

S = sample(arnet, 100)
julia> map(s -> loglikelihood(s, arnet), eachcol(S))

This PR makes loglikelihood a bit more versatile by changing the first argument type from Vector{Int} to AbstractVector{<:Integer}, and similarly for the function derived from ArNet