goldingn / gpe

Gaussian process everything - an R package to reimplement and combine common statistical models using GPs
MIT License
26 stars 5 forks source link

refactoring kernel class? #8

Closed davharris closed 9 years ago

davharris commented 9 years ago

Right now, the constructors and evaluators are in different parts of the code base and the connection between them needs to be maintained manually.

If these two kinds of functions were connected somehow (either by the class system or by putting them into a larger object with both functions as fields), then I think that everything would turn out easier in the long run.

goldingn commented 9 years ago

Completely agree, I tried something similar in earlier sandbox code, but I'm not sure how to achieve that whilst maintaining the syntax - kernels being both functions and having properties.

Prototypes welcome though!

goldingn commented 9 years ago

OK, this is now done - each basis kernel has it's own file, with one function to construct, one to evaluate. I've started naming these files to represent some hierarchy, so these are e.g.: kernel_basis_rbf.R