Skip to content
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

Add new types for priors and models. #15

Open
codetalker7 opened this issue Jul 4, 2022 · 5 comments
Open

Add new types for priors and models. #15

codetalker7 opened this issue Jul 4, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@codetalker7
Copy link
Member

Currently the five priors: Prior_Ridge, Prior_Laplace, Prior_Cauchy, Prior_TDist and Prior_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.

@sourish-cmi
Copy link
Collaborator

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.

@sourish-cmi
Copy link
Collaborator

@codetalker7 any thought on this issue?

@sourish-cmi
Copy link
Collaborator

@codetalker7 @ShouvikGhosh2048 any thought? please comment

@codetalker7
Copy link
Member Author

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

@sourish-cmi
Copy link
Collaborator

great @codetalker7, did you get a chance to test it? I can try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants