Skip to content

Releases: cibotech/scalastan

v0.11.0

08 Nov 19:01
Compare
Choose a tag to compare
  • Cross-compile and publish artifacts for both 2.12 and 2.13

Sonatype

15 Apr 16:08
Compare
Choose a tag to compare

Move artifact hosting to sonatype

v0.10.0

15 Oct 15:59
Compare
Choose a tag to compare
  • Bumped dependencies, see eab65b

v0.8.3

12 Feb 19:32
f8f981d
Compare
Choose a tag to compare

Fixes

  • The order that local declarations are emitted has been fixed (PR #110). In v0.8.2 this could cause the Stan compile to fail when local declarations are used with an initial value (see #109).

v0.8.2

08 Jan 20:15
742b6d6
Compare
Choose a tag to compare

New Features:

  • Support for Stan 2.18 functions.
  • Improved Stan result parsing performance.
  • Initial value support for locals.

Fixes:

  • Fixed a null pointer exception that could happen when running multiple ScalaStan instances on the same box.
  • ScalaStan now parses NaN, -Inf, and Inf from the Stan results correctly.
  • numElements has been deprecated in favor of num_elements to match the Stan documentation.

See #109.

v0.8.1

05 Nov 16:16
e17bb39
Compare
Choose a tag to compare

Fixes:

  • Type checking of the lkj distributions now works like in Stan (issue #107). The versions of these distributions taking a second parameter have been deprecated.
  • Fixed the nesting of arguments for variational inference (see PR #108).

v0.8.0

24 Oct 20:09
44dcd94
Compare
Choose a tag to compare

API Changes

  • There is now a StanModel trait which takes the place of the ScalaStan and Model traits. See PR #106. The goal is to make it easier to combine models. The ScalaStan trait is now deprecated. For the most part, the only change necessary will be to replace Model with StanModel, and then move parameters and data items into the StanModel section. For example:

The old way:

object MyApp extends App with ScalaStan {

  val n = data(int(lower = 0))
  val x = data(vector(n))
  val y = data(vector(n))

  val b = parameter(real())
  val m = parameter(real())
  val sigma = parameter(real(lower = 0.0))

  val model = new Model {
    sigma ~ stan.cauchy(0, 1)
    y ~ stan.normal(m * x + b, sigma)
  }

  val xs: Seq[Double] = ???
  val ys: Seq[Double] = ???
  val results = model
    .withData(x, xs)
    .withData(y, ys)
    .run(chains = 5)

  results.summary(System.out)
}

The new way (note that the location of the data and parameters has moved):

object MyApp extends App {

  object MyModel extends StanModel {
    val n = data(int(lower = 0))
    val x = data(vector(n))
    val y = data(vector(n))

    val b = parameter(real())
    val m = parameter(real())
    val sigma = parameter(real(lower = 0.0))

    sigma ~ stan.cauchy(0, 1)
    y ~ stan.normal(m * x + b, sigma)
  }

  val xs: Seq[Double] = ???
  val ys: Seq[Double] = ???
  val results = MyModel
    .withData(MyModel.x, xs)
    .withData(MyModel.y, ys)
    .run(chains = 5)

  results.summary(System.out)
}

Fixes

  • ScalaStan now supports loading mass matrices when run with the DenseE option (previously only DiagE worked).

v0.7.4

05 Oct 18:25
0901515
Compare
Choose a tag to compare
  • Fixes the stepsize argument to the Hmc algorithm (PR #105).

v0.7.3

26 Sep 20:32
ba1216e
Compare
Choose a tag to compare
  • Fixes the scaled_inv_chi_squared distribution (PR #104).

v0.7.2

26 Sep 16:30
bb6b1e4
Compare
Choose a tag to compare
  • Adds support for slicing in two dimensions (PR #103)
  • Fixes type checking on multi_normal (PR #102)