Reason why f(X).mean and f_post(X).mean do not have the same datatypes? #12
Unanswered
patel-zeel
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Hey @patel-zeel, You're right that the wrapping in another type is not necessary here. The reason why these types pop up is to allow structured representations of matrices. For example, consider from stheno import Measure, GP
import numpy as np
with Measure():
f = GP(1) + (lambda x: x) * GP(1)
x = np.linspace(0, 100, 100_000) Then >>> f(x).var
<low-rank matrix: shape=100000x100000, dtype=float64, rank=2>
>>> import lab as B
>>> B.diag(f(x).var)
array([1.000000e+00, 1.000001e+00, 1.000004e+00, ..., 1.000060e+04,
1.000080e+04, 1.000100e+04]) which would not be possible if structure was not preserved. Moreover, the type Perhaps the variance is allowed to be a structured matrix type, but the mean should always be a normal tensor? Would that sound reasonable? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying out the following code
output
I was wondering that what could be the benefit of returning different data types at cost of consistency?
Beta Was this translation helpful? Give feedback.
All reactions