Skip to content

Commit ad4942d

Browse files
Make Chains objects display only information and not statistical eval (#307)
* Make Chains objects display only information and not statistical evaluations * Make describe function display summary stats * Make describe function to display summary stats and quantiles * fixed formatting issues Until this commit, there are not new changes in this PR * implemented DataAPI.describe() function * Formatting fix * Major version bump from 6.0.7 to 6.1.0 * Version bump to 7.0.0 * update version in Docs too * Ran JuliaFormatter on files that are changed in this PR * Updated tables tests and MCMCChains version in test/Project.toml * Run JuliaFormatter on test/tables_tests.jl --------- Co-authored-by: Shravan Goswami <[email protected]>
1 parent 6080787 commit ad4942d

File tree

7 files changed

+292
-215
lines changed

7 files changed

+292
-215
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
33
keywords = ["markov chain monte carlo", "probablistic programming"]
44
license = "MIT"
55
desc = "Chain types and utility functions for MCMC simulations."
6-
version = "6.0.7"
6+
version = "7.0.0"
77

88
[deps]
99
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
1010
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
11+
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
1112
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
1213
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1314
IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d"
@@ -29,6 +30,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
2930
[compat]
3031
AbstractMCMC = "0.4, 0.5, 1.0, 2.0, 3.0, 4, 5"
3132
AxisArrays = "0.4.4"
33+
DataAPI = "1.16.0"
3234
Dates = "<0.0.1, 1"
3335
Distributions = "0.21, 0.22, 0.23, 0.24, 0.25"
3436
IteratorInterfaceExtensions = "0.1.1, 1"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CategoricalArrays = "0.8, 0.9, 0.10"
1515
DataFrames = "0.22, 1"
1616
Documenter = "0.26, 0.27, 1"
1717
Gadfly = "1.3.4"
18-
MCMCChains = "6"
18+
MCMCChains = "7"
1919
MLJBase = "0.19, 0.20, 0.21, 1"
2020
MLJDecisionTreeInterface = "0.3, 0.4"
2121
StatsPlots = "0.14, 0.15"

src/MCMCChains.jl

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ using Distributions
88
using RecipesBase
99
using Dates
1010
using KernelDensity: kde, pdf
11-
import StatsBase: autocov, counts, sem, AbstractWeights,
12-
autocor, describe, quantile, sample, summarystats, cov
11+
import DataAPI
12+
import StatsBase:
13+
autocov,
14+
counts,
15+
sem,
16+
AbstractWeights,
17+
autocor,
18+
describe,
19+
quantile,
20+
sample,
21+
summarystats,
22+
cov
1323

1424
import MCMCDiagnosticTools
1525
import MLJModelInterface
@@ -34,9 +44,21 @@ export ChainDataFrame
3444
export summarize
3545

3646
# Reexport diagnostics functions
37-
using MCMCDiagnosticTools: discretediag, ess, ess_rhat, AutocovMethod, FFTAutocovMethod,
38-
BDAAutocovMethod, gelmandiag, gelmandiag_multivariate, gewekediag, heideldiag, mcse,
39-
rafterydiag, rhat, rstar
47+
using MCMCDiagnosticTools:
48+
discretediag,
49+
ess,
50+
ess_rhat,
51+
AutocovMethod,
52+
FFTAutocovMethod,
53+
BDAAutocovMethod,
54+
gelmandiag,
55+
gelmandiag_multivariate,
56+
gewekediag,
57+
heideldiag,
58+
mcse,
59+
rafterydiag,
60+
rhat,
61+
rstar
4062
export discretediag
4163
export ess, ess_rhat, rhat, AutocovMethod, FFTAutocovMethod, BDAAutocovMethod
4264
export gelmandiag, gelmandiag_multivariate
@@ -59,7 +81,8 @@ Parameters:
5981
- `info` : A `NamedTuple` containing miscellaneous information relevant to the chain.
6082
The `info` field can be set using `setinfo(c::Chains, n::NamedTuple)`.
6183
"""
62-
struct Chains{T,A<:AxisArray{T,3},L,K<:NamedTuple,I<:NamedTuple} <: AbstractMCMC.AbstractChains
84+
struct Chains{T,A<:AxisArray{T,3},L,K<:NamedTuple,I<:NamedTuple} <:
85+
AbstractMCMC.AbstractChains
6386
value::A
6487
logevidence::L
6588
name_map::K

0 commit comments

Comments
 (0)