Coder Social home page Coder Social logo

gpflowr's People

Contributors

goldingn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gpflowr's Issues

hmc

Translate GPflow/GPflow/hmc.py to gpflowr/R/hmc.R
When closed, remember to tick the box in the roadmap issue

sgpmc

Translate GPflow/GPflow/sgpmc.py to gpflowr/R/sgpmc.R
When closed, remember to tick the box in the roadmap issue

overhaul package as a reticulate import

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

sgpr

Translate GPflow/GPflow/sgpr.py to gpflowr/R/sgpr.R
When closed, remember to tick the box in the roadmap issue

priors

Translate GPflow/GPflow/priors.py to gpflowr/R/priors.R
When closed, remember to tick the box in the roadmap issue

transforms

Translate GPflow/GPflow/transforms.py to gpflowr/R/transforms.R
When closed, remember to tick the box in the roadmap issue

parameter assignation

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

mean_functions

Translate GPflow/GPflow/mean_functions.py to gpflowr/R/mean_functions.R
When closed, remember to tick the box in the roadmap issue

kullback_leiblers

Translate GPflow/GPflow/kullback_leiblers.py to gpflowr/R/kullback_leiblers.R
When closed, remember to tick the box in the roadmap issue

likelihoods

Translate GPflow/GPflow/likelihoods.py to gpflowr/R/likelihoods.R
When closed, remember to tick the box in the roadmap issue

Computing covariance matrix

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?

translation roadmap

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:

model

Translate GPflow/GPflow/model.py to gpflowr/R/model.R
When closed, remember to tick the box in the roadmap issue

densities

Translate GPflow/GPflow/densities.py to gpflowr/R/densities.R
When closed, remember to tick the box in the roadmap issue

error in help

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)

conditionals

Translate GPflow/GPflow/conditionals.py to gpflowr/R/conditionals.R
When closed, remember to tick the box in the roadmap issue

svgp

Translate GPflow/GPflow/svgp.py to gpflowr/R/svgp.R
When closed, remember to tick the box in the roadmap issue

vgp

Translate GPflow/GPflow/vgp.py to gpflowr/R/vgp.R
When closed, remember to tick the box in the roadmap issue

gpr

Translate GPflow/GPflow/gpr.py to gpflowr/R/gpr.R
When closed, remember to tick the box in the roadmap issue

gpmc

Translate GPflow/GPflow/gpmc.py to gpflowr/R/gpmc.R
When closed, remember to tick the box in the roadmap issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.