-
Notifications
You must be signed in to change notification settings - Fork 23
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 norms decorator #196
Comments
So the functions should be as standard R function? Just to confirm, for storage, all the L2norms for pdf of every distribution should be in |
Yes and yes |
Question: if we add these as functions until the decorator is written, how should the dependency on the parameters be handled (as the methods will temporarily live outside an R6 class)? Should these just be arguments? For example, if we want to add the |
based one phone discussion right now: since the function needs to call self, the signature should be For functions with additional arguments, you have, for example, |
Sorry I didn't see this sooner Franz. After discussion with Ain it transpires that this is vastly simpler than what I initially thought and these can be added directly to the |
It would still have to be done somewhere, no? Though using the kernel version for the distribution may simplify things. On a minor note, I would call the methods something more descriptive like |
Exactly
I agree and had been thinking something similar |
Closing as now being implemented as methods and not decorators |
As the final structure of this decorator is unclear, for now it would be most sensible to write these functions using S3 dispatch notation, i.e. say the function is Pdf2Norm, then this would be written as:
<function>.<distribution>
where<function>
is the function implemented and<distribution>
is the classname of the distribution, seelistDistributions()
for the full list. e.g. to implement the 2-norm of Binomial pdf:Pdf2Norm.Binomial
For now these can be stored in a single script for each function class, e.g.
Pdf2Norm.R
,Cdf2Norm.R
, each containing the specific functions for each distribution.@aintoha We will discuss here if you have any questions as you go along.
The text was updated successfully, but these errors were encountered: