Initialise states for SampleChains. Initialise partition state for SampleChains.
Source:R/init.R
InitPartition.Rd
Initialise states for SampleChains. Initialise partition state for SampleChains.
Examples
data <- bnlearn::learning.test
scorer <- CreateScorer(
scorer = BNLearnScorer,
data = data
)
InitPartition(colnames(data), scorer)
#> [[1]]
#> [[1]]$state
#> partition node
#> 1 1 F
#> 2 2 C
#> 3 3 A
#> 4 3 E
#> 5 4 D
#> 6 5 B
#>
#> [[1]]$log_score
#> [1] -24564.87
#>
#> [[1]]$proposal_info
#> NULL
#>
#> [[1]]$mcmc_info
#> NULL
#>
#>
#> [[2]]
#> [[2]]$state
#> partition node
#> 1 1 E
#> 2 2 C
#> 3 2 D
#> 4 3 B
#> 5 4 F
#> 6 5 A
#>
#> [[2]]$log_score
#> [1] -24614.82
#>
#> [[2]]$proposal_info
#> NULL
#>
#> [[2]]$mcmc_info
#> NULL
#>
#>