Comments (5)
I think it would probably be useful to provide an extra term, because that makes it easier to implement the VP part. The question is how to do the syntax.
Maybe, I would add a term
spatial = XX
and then let XX be filled with functions that we provide, e.g.
spatial = spatialDNN(x, y)
spatial = spatialFormula(~ mem1 + mem2 + ...)
spatial = spatialCAR(x, y)
etc? Btw, I was thinking yesterday that we could use the same algorithm that currently fits the biotic interactions also to fit a spatial CAR structure. In the end, it's just a covariance matrix, right? So, if we don't have a problem to fit 10.000 species, we should be able to implement a 10.000 site CAR term as well.
Just to make things more complicated - if we keep the spatial syntax, maybe we would really make this explicit also for the other components, so that do, vor example
sjSDM(X = NULL, Y = NULL, env = envFormula(), biotic = bioticCov(), spatial = spatialDNN()
and then we could also provide the lasso option directly in the function. You see what I mean?
We should of course think through if this really works and makes sense for the user and programming-wise, but I think it might be easier and more compact to implement.
It's basically the same principle as the varStruct, corStruct ... although it has to be said that this is always terribly confusing to people.
If we do this, we maybe also want to drop X, and let people provide X directly in the env and space components.
from s-jsdm.
I think it would probably be useful to provide an extra term, because that makes it easier to implement the VP part. The question is how to do the syntax.
Maybe, I would add a term
spatial = XX
and then let XX be filled with functions that we provide, e.g.
Good idea, that way it also does not interfere with the formula syntax
spatial = spatialDNN(x, y) spatial = spatialFormula(~ mem1 + mem2 + ...) spatial = spatialCAR(x, y)
etc? Btw, I was thinking yesterday that we could use the same algorithm that currently fits the biotic interactions also to fit a spatial CAR structure. In the end, it's just a covariance matrix, right? So, if we don't have a problem to fit 10.000 species, we should be able to implement a 10.000 site CAR term as well.
Just to make things more complicated - if we keep the spatial syntax, maybe we would really make this explicit also for the other components, so that do, vor example
sjSDM(X = NULL, Y = NULL, env = envFormula(), biotic = bioticCov(), spatial = spatialDNN()
and then we could also provide the lasso option directly in the function. You see what I mean?
We should of course think through if this really works and makes sense for the user and programming-wise, but I think it might be easier and more compact to implement.
It's basically the same principle as the varStruct, corStruct ... although it has to be said that this is always terribly confusing to people.
If we do this, we maybe also want to drop X, and let people provide X directly in the env and space components.
Interesting idea, here a few remarks:
Actually, we do not fit a covariance matrix with the CAR model, right? The weight matrix can be created from a distance matrix or we could even use a sparse neighbor matrix (ICAR). In the CAR, the calculation of the inverse matrix ( (D*(I-aW)^-1 ) is the bottleneck.
However, the memory puts an upper limit on the CAR approach. 10.000 sites results in a 40gb matrix (single precision), which is not feasible for most of the GPUs. On the other hand, how realistic are eDNA communities with ten thousands of sites? If there's not enough memory, people just have to switch to spatial predictors.
Also, I have concerns how useful the CAR actually is. We have to discuss this point.
From the technical side, it should not be to difficult to implement. We can inhere from the model_base class. Also, I think it should be compatible with stochastic gradient descent (but ofc, we have first to simulate this ).
from s-jsdm.
I'm kind of delaying this intentionally because the API change will break the scripts for the paper... except (maybe) I write a lot of additional code.
Not sure what to do
from s-jsdm.
Make a branch?
from s-jsdm.
Solved by spatial eigenvectors and trend surface models
from s-jsdm.
Related Issues (20)
- incorrect mean evaluation metrics in short_summary from sjSDM_cv.R ? HOT 1
- Co-occurrence matrix based on residual associations HOT 1
- PyTorch not loading HOT 6
- Time as "spatial" variable HOT 14
- Adding spatial component reduces R2 of model HOT 3
- generateSpatialEV improve documentation HOT 1
- Error/; Error in py_call_impl(callable, dots$args, dots$keywords) : AssertionError: Size mismatch between tensors HOT 1
- Error in py_call_impl(callable, dots$args, dots$keywords) : torch._C._LinAlgError: linalg.inv: The diagonal element 1 is zero HOT 1
- Different R2 produced for Model and Anova HOT 1
- Easy Model Residuals HOT 1
- Bug: plot.sjSDM doesnt work for species with whitespace HOT 1
- Error: object 'torch' not found in the example Pichler and Hartig- 2020 HOT 2
- Scale of predicted results and questions about tuning HOT 3
- plotInternalStructure: there is no package called ‘ggplodt2’ HOT 1
- Error : torch._C._LinAlgError HOT 3
- Shared contributions in ANOVA HOT 4
- Error when predicting to new data - error: Error : torch._C._LinAlgError: linalg.inv: The diagonal element 3 is zero HOT 4
- offset
- plotInternalStructure error HOT 4
- Species-level predictors? HOT 4
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.