Comments (4)
Just to make sure I'm thinking about the right thing here: For me it would be enough to implement a make_projmat(d, q, derivative_to_project_onto)
that returns the actual projection matrix. Did you expect something different or is that fine?
from tornadox.
no that is fine. I think it would be useful to implement it as some linear-operator-thing, but I can make the exact refactoring I have in mind once things work :)
from tornadox.
along the lines of:
def select_derivative(self, state, derivative):
# Once we allow changed orderings, extend this functionality here.
# Due to the behaviour in __init__,
# non-coordinate-representation should be impossible
assert self.state_ordering == "coordinate"
derivative_indices = np.arange(
start=derivative, stop=self.state_dimension, step=(self.num_derivatives + 1)
)
return np.take(state, indices=derivative_indices)
def derivative_selection_operator(self, derivative):
selection_unit_vector = np.eye(self.num_derivatives + 1)[:, derivative]
selection_unit_vector_as_matrix = selection_unit_vector.reshape(
(1, self.num_derivatives + 1)
)
selection_matrix = np.kron(
np.eye(self.wiener_process_dimension), selection_unit_vector_as_matrix
)
return selection_matrix
from tornadox.
which I know realise is not an operator, my bad. I meant something like
class Projection2Derivative1d:
def __init__(self, derivative):
self._derivative = derivative
def __matmul__(self, other):
return np.take(other, axis=-2, indices=self.derivative)
and axis=-2 makes sure it behaves like numpy matmul. Non-1d projections are then fairly straightforward, but not really used for EK0, right?
from tornadox.
Related Issues (20)
- Krylov methods in truncated EK1 HOT 1
- Inconsistent `__init__` in EK1 and ODEFilter
- More efficient projection matrices
- Representation of ODEFilter means? HOT 2
- RK init HOT 3
- Diagonal EK1 Todo HOT 2
- Reference means as matrix HOT 4
- Solve interface
- Diagonal Jacobians (and more?)
- ODE dimension init
- First step
- RK init + Radau should get the jacobian
- Package name HOT 1
- Consider replacing dataclasses with namedtuples
- Migrate the EK0 and DiagonalEK1 to a diagonal diffusion model HOT 3
- Stats
- Lorenz96 is not working HOT 4
- How to save covariances for very high-dimensional problems? HOT 2
- More efficient diagonal Jacobians for the PDEs HOT 3
- Citation
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 tornadox.