Comments (3)
sjSDM_model is the base model class for the DNN (keras style) API:
com = simulate_SDM(env = 3L, species = 5L, sites = 100L)
X = com$env_weights
Y = com$response
# the activation function in the last layer must be linear (NULL)
model = sjSDM_model(input_shape = 3L)
model %>%
layer_dense(units = 10L, activation = "tanh") %>%
layer_dense(units = 10L, activation = "relu") %>%
layer_dense(units = 5L)
model %>%
compile(df = 50L,
optimizer = optimizer_adamax(learning_rate = 0.01),
l1_cov = 0.0001,
l2_cov = 0.0001)
model %>%
summary
model %>%
fit(X = X, Y = Y, epochs = 10L, batch_size = 10L)
# species association matrix:
sp = getCov(model)
# you can also continue training:
model %>%
fit(X = X, Y = Y, epochs = 10L, batch_size = 10L)
There is also a section in the vignette for this model class. We could add a reference in the sjSDM detail section... and maybe we should rename the model, e.g. to sjSDM_DNN?
from s-jsdm.
hmm ... but in principle, you can use create all types of models with that, right? I just wonder how much sense it makes to have this for most users, but on the other hand, it can't hurt to have it, so I would just leave it and suggest to close
from s-jsdm.
Well, because of the api changes (flexible linear/dnn structures, and using PyTorch nn.modules) the implementation of this approach is not so easy anymore, which is why I removed it for now (there are other more important things to do for now). I will close this.
from s-jsdm.
Related Issues (20)
- VENN diagram Anova HOT 1
- Problem with installation HOT 1
- Error in sjSDM_cv HOT 8
- PyTorch not installed HOT 13
- Is there a way to assess the significance (p-value?) of pairwise relationships in species associations? HOT 2
- ValueError: Expected parameter rate HOT 4
- Random factors HOT 19
- ValueError: Expected value argument HOT 3
- vp codist
- sjSDM on a remote server HOT 3
- sjSDM - memory issues of anova() HOT 6
- Installation error HOT 5
- Failing to run models on GPU
- Readme Files
- plotsjSDMcoef returns summary table / summary can't run invisible
- importance
- Exact VP definition HOT 1
- Internal structure set negative R2 to 0 or scale
- Bias in sjSDM::linear() coefficient estimates when including an intercept term. HOT 3
- Unable to scale negative R squareds HOT 1
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 s-jsdm.