cmdstan 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/ext/cmdstan/extconf.rb +2 -2
- data/lib/cmdstan/mcmc.rb +4 -3
- data/lib/cmdstan/model.rb +2 -2
- data/lib/cmdstan/version.rb +1 -1
- metadata +5 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b919404c064aa08c6766d3718c168f70ef422e32d66eebf6de84b901e244d2c
|
4
|
+
data.tar.gz: 70f11779bdb74a2d0ba2a95ba6ba37c05cd5e637422667474765f3bdbfca2efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1238805b583a22b5aef689a70ce0eba43a270e9a090ce531038ac8e93a2d386f202ff800ef80247cb118edf37ef06fe5a9230c9589070a8b6f5e463c6a19363d
|
7
|
+
data.tar.gz: 7e7c0cdf1b481a400844605eded2822d644eb441f85875bd65d9b91d856150dd40d9a83671d19d2693c28dbae4c17a4af3b07a336a133909c30f7fa9802b2b90
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/ext/cmdstan/extconf.rb
CHANGED
@@ -3,8 +3,8 @@ require "fileutils"
|
|
3
3
|
require "net/http"
|
4
4
|
require "tmpdir"
|
5
5
|
|
6
|
-
version = "2.
|
7
|
-
checksum = "
|
6
|
+
version = "2.26.0"
|
7
|
+
checksum = "0bc5529a4818e70ef8181191a515ea5e1a6fce326dda41a040f99deb89bcb663"
|
8
8
|
url = "https://github.com/stan-dev/cmdstan/releases/download/v#{version}/cmdstan-#{version}.tar.gz"
|
9
9
|
|
10
10
|
$stdout.sync = true
|
data/lib/cmdstan/mcmc.rb
CHANGED
@@ -25,11 +25,12 @@ module CmdStan
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def summary
|
28
|
-
|
29
|
-
|
28
|
+
# add suffix since path can't already exist
|
29
|
+
path = "#{Tempfile.new.path}.csv"
|
30
|
+
run_command "#{CmdStan.path}/bin/stansummary#{extension}", "--csv_filename=#{path}", *@output_files.map(&:path)
|
30
31
|
|
31
32
|
result = {}
|
32
|
-
CSV.foreach(
|
33
|
+
CSV.foreach(path, headers: true, converters: :numeric) do |row|
|
33
34
|
value = row.to_h
|
34
35
|
name = value.delete("name")
|
35
36
|
result[name] = value if name == "lp__" || !name.end_with?("__")
|
data/lib/cmdstan/model.rb
CHANGED
@@ -61,7 +61,7 @@ module CmdStan
|
|
61
61
|
args << "num_samples=#{sampling_iters.to_i}" if sampling_iters
|
62
62
|
args += ["algorithm=hmc", "adapt", "engaged=1"]
|
63
63
|
|
64
|
-
run_command
|
64
|
+
run_command(*args)
|
65
65
|
|
66
66
|
output_files << output_file
|
67
67
|
end
|
@@ -99,7 +99,7 @@ module CmdStan
|
|
99
99
|
args << "algorithm=#{algorithm.to_s.downcase}" if algorithm
|
100
100
|
args << "iter=#{iter.to_i}" if iter
|
101
101
|
|
102
|
-
run_command
|
102
|
+
run_command(*args)
|
103
103
|
|
104
104
|
MLE.new(output_file)
|
105
105
|
end
|
data/lib/cmdstan/version.rb
CHANGED
metadata
CHANGED
@@ -1,59 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmdstan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '5'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '5'
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
55
13
|
description:
|
56
|
-
email: andrew@
|
14
|
+
email: andrew@ankane.org
|
57
15
|
executables: []
|
58
16
|
extensions:
|
59
17
|
- ext/cmdstan/extconf.rb
|
@@ -89,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
47
|
- !ruby/object:Gem::Version
|
90
48
|
version: '0'
|
91
49
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.2.3
|
93
51
|
signing_key:
|
94
52
|
specification_version: 4
|
95
53
|
summary: Bayesian inference for Ruby, powered by CmdStan
|