hojsgaard / grim Goto Github PK
View Code? Open in Web Editor NEWR package for gRaphical independence models
License: GNU General Public License v2.0
R package for gRaphical independence models
License: GNU General Public License v2.0
Great package Soren! And here comes the first issue:
I am mainly interested in the specification and parameters of the joint probability function of the best (gRim::stepwise.iModel
) log-linear model. (I need the join probability function p(i) for later use.)
It seems impossible to get the parameters of the log-linear model from dModel
returned by dmod()
? As far as I see, dmod()
calls fit.dModel()
which in turn calls loglin()
.
loglin()
has an argument param = FALSE
. Would it be possible to set param = TRUE
in fit.dModel()
without breaking stuff?
Or am I seeing it wrong and is there a better way to extract the model specification?
Edit:
Parameters can be extracted from best model m.opt
with the following code:
loglin(table = m.opt$datainfo$data, margin = m.opt$glist, param = TRUE)$param
Obviously it introduces extra computation, but works.
Now I am looking for a way to define log(p(i)). Would gRbase
be the correct place for such a function? Input would be a dModel
object.
It seems the current implementation of gRim::stepwise.iModel()
only supports starting model-selection from a full main effects model gRim::dmod(~.^1, data = data)
if one wants to include all the variables in the selection procedure.
Is there any theoretical reason for this? In other words, couldn't we just as well start from log p(i) = mu and let AIC do the variable selection?
Reason I ask is that starting from a full main effects model limits model selection to low dimensional contingency tables. (e.g. table()
will not work on data.frames with more than 31 binary columns since the amount of cells explodes to 2^31.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.