goldingn / gpflowr Goto Github PK
View Code? Open in Web Editor NEW:blossom: Gaussian processes in TensorFlow via R :blossom:
License: Apache License 2.0
:blossom: Gaussian processes in TensorFlow via R :blossom:
License: Apache License 2.0
Translate GPflow/GPflow/hmc.py
to gpflowr/R/hmc.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/sgpmc.py
to gpflowr/R/sgpmc.R
When closed, remember to tick the box in the roadmap issue
With the release of Rstudio's reticulate package, it is now possible to import and use python packages in R.
Assuming python, GPFlow and dependencies are all installed, using GPflow in R is now as simple as doing:
library(reticulate)
gpf <- import('GPflow')
This approach is so much easier, more robust, more computationally efficient, and more tightly integrated with GPflow than re-writing the whole thing in R.
There are a few convenience functions missing however. For example algorithmic operators are not overloaded for kernels:
const <- gpf$kernels$Constant(1, 1)
rbf <- gpf$kernels$RBF(1, 1, 1)
k <- const + rbf
## Error in const + rbf : non-numeric argument to binary operator
Also, the print method for most objects is a bit crap:
const
## unnamed.�[1mvariance�[0m transform:+ve prior:None
[ 1.]
These should be easy enough to fix in an R package however. The package will require very few unit tests (GPFlow is well tested), though some integration tests would be useful.
So the plan is to delete pretty much all of the code and documentation, and just implement these few things. This has all been discussed offline, so this message is just for the benefit of anyone else who's watching the repo, and wondering why a whole load of code and issues just dissapeared
Translate GPflow/GPflow/sgpr.py
to gpflowr/R/sgpr.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/priors.py
to gpflowr/R/priors.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/transforms.py
to gpflowr/R/transforms.R
When closed, remember to tick the box in the roadmap issue
Hi
For now, it is not possible to assign values to kernel parameters, here's a MWE
library(gpflowr)
k <- kernels$RBF(1)
k$lengthscales
k$lengthscales <- 0.5
the output of last instruction is
Error in (function (value) : parameters must be Param objects
Best
Translate GPflow/GPflow/mean_functions.py
to gpflowr/R/mean_functions.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/kullback_leiblers.py
to gpflowr/R/kullback_leiblers.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/likelihoods.py
to gpflowr/R/likelihoods.R
When closed, remember to tick the box in the roadmap issue
Hi again
I am experimenting issues with covariance matrix computation. In some tests, I have used tf$Session()$run(kernel$K(X))
which works just fine, but there are "helpers" that are more user oriented that do not work for now:
library(gpflowr)
# just fine
X <- matrix(runif(10),10,1)
X2 <- matrix(runif(12),12,1)
k <- kernels$RBF(1)
#errors
K <- k$compute_K(X,X2)
K <- k$compute_K_symm(X)
Kdiag <- k$compute_Kdiag(X)
the output for the first two errors is
Error in eval(substitute(expr), envir, enclos) :
ValueError: as_list() is not defined on an unknown TensorShape.
and for the last one, error says that k$compute_Kdiag
is not a function.
Any thoughts?
Here's a list of what needs doing, so we're on the same page and not duplicating effort.
We're translating version 0.3.3 of GPflow
The following tasks refer to files listed as <name>.py
in the GPflow directory and should be translated into <name>.R
in the R directory here.
They are listed approximately in order of increasing complexity and/or dependence on earlier tasks, and each task has a link to its own issue where discussion specific to each task should happen:
Translate GPflow/GPflow/model.py
to gpflowr/R/model.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/densities.py
to gpflowr/R/densities.R
When closed, remember to tick the box in the roadmap issue
The example in the help files has:
m <- gp$gpr$GPR(X, Y, kern=k)
This failed, but the following worked for me:
m <- gp$models$GPR(X, Y, kern=k)
Translate GPflow/GPflow/conditionals.py
to gpflowr/R/conditionals.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/svgp.py
to gpflowr/R/svgp.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/vgp.py
to gpflowr/R/vgp.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/gpr.py
to gpflowr/R/gpr.R
When closed, remember to tick the box in the roadmap issue
Translate GPflow/GPflow/gpmc.py
to gpflowr/R/gpmc.R
When closed, remember to tick the box in the roadmap issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.