-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
Description
After some research, seems like if you replace Normal
distribution with StudentT
distribution and get HSTP
Here is a related paper as well
https://proceedings.mlr.press/v202/sellier23a.html
Lines 322 to 331 in bc4b51d
if self._parameterization == "noncentered": | |
self._beta = pm.Normal( | |
f"{name}_hsgp_coeffs_", size=self._m_star - int(self._drop_first) | |
) | |
self._sqrt_psd = sqrt_psd | |
f = self.mean_func(X) + phi @ (self._beta * self._sqrt_psd) | |
elif self._parameterization == "centered": | |
self._beta = pm.Normal(f"{name}_hsgp_coeffs_", sigma=sqrt_psd) | |
f = self.mean_func(X) + phi @ self._beta |
Turning into
if self._parameterization == "noncentered":
self._beta = pm.StudentT(
f"{name}_hsgp_coeffs_", self.nu, size=self._m_star - int(self._drop_first)
)
self._sqrt_psd = sqrt_psd
f = self.mean_func(X) + phi @ (self._beta * self._sqrt_psd)
elif self._parameterization == "centered":
self._beta = pm.StudentT(f"{name}_hsgp_coeffs_", self.nu, sigma=sqrt_psd)
f = self.mean_func(X) + phi @ self._beta
Alternatively, you can use Fisher transfrom or any other inverse normalizing transformations to "pull out" nu
bwengalstwiecki and fonnesbeck
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
bwengals commentedon Sep 25, 2023
That's really cool, this should definitely be added. Probably could just put an additional kwarg
nu=None
on the HSGP class and fix the code like you did.I don't follow the second paper though, about transforming a t distributed RV to a normal. What do you mean to pull out
nu
?ferrine commentedon Sep 25, 2023
bwengals commentedon Sep 26, 2023
ah I see now. I'm not sure which would work better. It's an approximation right? The first way you did it,
pm.Normal
->pm.StudentT
is exact and looks simpler to meferrine commentedon Sep 28, 2023
Yes, I tried exact one and it works like charm
ferrine commentedon Sep 29, 2023
Should it come with HSGP name or HSTP subclass? GP is Gaussian process, while T Process is different
bwengals commentedon Oct 3, 2023
True... definitely less code to have
nu
be an optional kwarg that makes it a TP. But you're right, the code would say "GP" when it's really a t-process.I kinda prefer the kwarg option? Though there already is a
TP
classferrine commentedon Oct 3, 2023
I prefer the explicit way to create a subclass
bwengals commentedon Oct 12, 2023
From the user perspective I agree. For implementing it'd make for a lot of code dup, unless I'm missing something clever. Maybe have kwargs for HSGP, and also an HSTP class that calls it?
fonnesbeck commentedon Oct 16, 2023
If we want to generalize, we could rename the class
HSP
orHSSP
(stochastic process), and then specify the type of process as a keyword arg.