Git Product home page Git Product logo

Comments (5)

kskyten avatar kskyten commented on May 19, 2024

The example works in the dev branch.

from soss.jl.

 avatar commented on May 19, 2024

Are you on 1.2.0?

julia> using Soss, Random;

julia> m = @model X begin
           β ~ Normal() |> iid(size(X,2))
           y ~ For(eachrow(X)) do x
               Normal(x' * β, 1)
           end
       end;

julia> Random.seed!(3);

julia> X = randn(6,2);

julia> rand(m(X=X));

(v1.2) pkg> status Soss
    Status `~/.julia/environments/v1.2/Project.toml`
  [0bf59076] AdvancedHMC v0.2.13
  [31c24e10] Distributions v0.21.8
  [bbc10e6e] DynamicHMC v2.1.1
  [1a297f60] FillArrays v0.7.4
  [f6369f11] ForwardDiff v0.10.6
  [6fdf6af0] LogDensityProblems v0.9.2
  [d8e11817] MLStyle v0.3.1
  [91a5bcdd] Plots v0.27.0
  [8ce77f84] Soss v0.7.0 #master (https://github.com/cscherrer/Soss.jl.git)
  [4c63d2b9] StatsFuns v0.9.0
  [84d833dd] TransformVariables v0.3.8
  [de0858da] Printf 
  [9a3f8284] Random 
  [10745b16] Statistics

from soss.jl.

kskyten avatar kskyten commented on May 19, 2024

Yes, I'm using 1.2.0.

from soss.jl.

cscherrer avatar cscherrer commented on May 19, 2024

Thanks @kskyten, I think this is due to a change in GeneralizedGenerated 0.2; I didn't have version upper bounds (oops).

Works in dev (as you say), should also work to downgrade GeneralizedGenerated

from soss.jl.

cscherrer avatar cscherrer commented on May 19, 2024

Fixed in v0.8:

julia> using Soss, Random

julia> m = @model X begin
                  β ~ Normal() |> iid(size(X,2))
                  y ~ For(eachrow(X)) do x
                      Normal(x' * β, 1)
                  end
              end;

julia> Random.seed!(3);

julia> X = randn(6,2)
6×2 Array{Float64,2}:
  1.19156    0.100793  
 -2.51973   -0.00197414
  2.07481    1.00879   
 -0.97325    0.844223  
 -0.101607   1.15807   
 -1.54251   -0.475159  

julia> rand(m(X=X))
(X = [1.1915557734285787 0.10079289135480324; -2.5197330871745263 -0.0019741367391015213;  ; -0.1016067940589428 1.158074626662026; -1.5425131978228126 -0.47515878362112707], β = [0.07187269298745927, -0.5128103336795292], y = [0.10079289135480324, -2.5197330871745263, 2.0748097755419757, 0.8442227439533416, 1.158074626662026, -0.47515878362112707])

from soss.jl.

Related Issues (20)

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.