Open codetalker7 opened 2 years ago
Yes - this is a very good idea. I am planning to implement the Prior_HorseShoe
and its variants. If we can bring all the priors under single umbrella that will be great.
@codetalker7 any thought on this issue?
@codetalker7 @ShouvikGhosh2048 any thought? please comment
Hi @sourish-cmi. As a starting point, I think it'll be enough to just introduce a new type (say called Prior
), and have all other types subtype it.
abstract type Prior end
"""
docstring for Ridge
"""
struct Ridge <: Prior end
# define all other priors like this
great @codetalker7, did you get a chance to test it? I can try it
Currently the five priors:
Prior_Ridge
,Prior_Laplace
,Prior_Cauchy
,Prior_TDist
andPrior_Uniform
, are not grouped under an umbrella type. Introducing a new supertype for these priors might help in a clearer interface, as well as writing documentation. Since the API remains the same no matter what type of prior we are using, this is a good idea that might help to make the code better.A similar thing holds for the current four regression models. We don't have any kind of type hierarchy currently, and it seems like these are independent types and not grouped under a common umbrella. Thinking about this might be a good idea. This also helps in writing cleaner and more understandable documentation.