Comments (1)
I think this accurately reflects our conversation. Although, my inclination is to require user-defined functions for each node in the network by default, with specialized utility functions/wrappers (model_to_node methods) that create these node functions based on provided model objects.
My interpretation of what you wrote is then that a) the user specifies the network structure, including maxt and other parameters; b) the predict_fn
slot is by default empty for all nodes, and therefore the user needs to fill these functions somehow. The syntax might be something like:
set_node(net, myGLMObject) #runs modelToNode.glm method or something like that
set_node(net, myFunction) #runs a custom function defined by the user
In each of those two situations, there needs to be a fixed naming convention for the inputs to either the predict.glm()
method or the user-defined myFunction()
. It could be something like
g <- dbn(map[t] | age*sex*map[1:3]) #shorthand for map[t-1]*map[t-2]*map[t-3]? just a thought...
predictMAP <- function(age, sex, map.lag1, map.lag2, map.lag3){
#all inputted parameters need to be vectors of the same length
# we may consider the feasibility of making lagged covariates a matrix,
# such that lag-3 MAP might be inputted as an nsim*3 matrix
#whatever computations the user wants to make
return(predictedMAPComputedInThisFunction)
}
You can see that I'm a little worried about syntax with longer lags involved in the model...
from dbn.
Related Issues (17)
- DESCRIPTION File needs work
- dbn.list
- Plotting bug: adding dependencies to time [t-k], where k>=2
- How do we handle `x[t] | x[t-1]`.
- Propagate time horizontally
- Graph problems with y[t] | x[t]
- New `ggplot` packages might support network plots
- All dynamic nodes should have the same `max_t`
- Model specification with time lags
- Initial Structure HOT 4
- Description in `dbn` needs content
- Return section in `dbn`
- Model to node validation
- Things to do next HOT 1
- plot.dbn HOT 5
- Write tests for functions:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbn.