GithubHelp home page GithubHelp logo

bayes-scala-gp's Introduction

Algorithms for Gaussian Processes

Join the chat at https://gitter.im/danielkorzekwa/bayes-scala Build Status

List of algorithms:

This project uses Bayes-scala library for Bayesian inference.

How to use it from sbt and maven?

Only snapshot version for Scala 2.11.

Snapshot version

Snapshot artifact is built by a Travis CI and deployed to Sonatype OSS Snapshots repository with every commit to Bayes-scala-gp project.

With sbt build tool, add to build.sbt config file:

libraryDependencies += "com.github.danielkorzekwa" %% "bayes-scala-gp" % "0.1-SNAPSHOT"  

resolvers += Resolver.sonatypeRepo("snapshots")

With maven build tool, add to pom.xml config file:

  <repositories>
    <repository>
      <id>oss-sonatype-snapshots</id>
      <name>oss-sonatype-snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
  </repositories>
  
  <dependencies>
    <dependency>
      <groupId>com.github.danielkorzekwa</groupId>
      <artifactId>bayes-scala-gp_2.11</artifactId>
      <version>0.1-SNAPSHOT</version>
    </dependency>
  <dependencies>

bayes-scala-gp's People

Contributors

danielkorzekwa avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

semanticbeeng

bayes-scala-gp's Issues

Perf optimisation for CovSeIso

This test takes 5 sec to run, Different impl of CovSeIso from bayes-scala takes 0.7 sec to execute.

 @Test def perf_test_1d_df_dSf = {

    val x1 = Array(10d)
    val x2 = Array(2d)
    (1L to 2000L * 50 * 50).foreach(_ => covFunc.df_dSf(x1, x2))

  }

CogpGPVar - simplification?

In https://github.com/danielkorzekwa/bayes-scala-gp/blob/fa85daf09c79a3cd1ff3a2e7061613bfe6a38228/src/main/scala/dk/gp/cogp/model/CogpGPVar.scala

You have three lines in which I have impression could be simplified by taking just variance(y) instead of 1/variance(y). Because

  1. vInv will have only values on diagonal and all are positive
  2. cholesky of vinv will give you sqrt of vInv diagonal (as A_A.t = vInv)
  3. transposing cholesky will not change anything (as (A_A.t).t = (A.t*A), but A it all the time a diagonal matrix so that equation is an identity for it)
  4. then taking invchol pretty much multiplies two matrices with the same values on the diagonal, and should result in 1/vInv

So basically on diagonal it should true that
v == 1/sqrt(vInv)^2

    val m = DenseVector.zeros[Double](z.rows)
    val vInv = 0.1 * (1.0 / (variance(y))) * DenseMatrix.eye[Double](z.rows)
    val v = invchol(cholesky(vInv).t)

Moreover, taking inverse of a matrix is something that you should avoid, if possible, because of the numerical properties of the algorithm. Combined with using 1/10 on a big scale (see. http://ta.twi.tudelft.nl/users/vuik/wi211/disasters.html) it may bring unexpected results. Unless you wanted to introduce some random disturbance here.

Of course, I might have missed something and everything here is crucial for the algorithm to work. :)

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.