Description
Currently, the statistics are subclasses of mechanisms. The user initializes the statistic with desired parameters (e.g. epsilon, delta, n
), and when the actual mechanism is called, it is called by exporting that mechanism’s release method to the statistic, e.g.:
.self$result <- export(mechanism)$evaluate(fun=fun.covar, x=x, sens=sens, postFun=.self$postProcess, formula=formula, columns=columns, intercept=intercept)
This makes the statistic’s attributes (like the user-specified epsilon
) callable by the mechanism. For a new user, it may be unclear where these attributes are initialized, since it is done implicitly in the export
call in the statistic release
method. Since the mechanism and statistic classes have fundamentally different roles in the library, I wonder if it would be clearer to have them as separate classes with clarity for what is passed into the mechanism, rather than having the statistics as a subclass of the mechanisms.
On the one hand, this will make the code less condense. But it might also be clearer. Thoughts?