Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOHSM has Cholesky problems #45

Open
tdewolff opened this issue Apr 20, 2022 · 0 comments
Open

MOHSM has Cholesky problems #45

tdewolff opened this issue Apr 20, 2022 · 0 comments

Comments

@tdewolff
Copy link
Collaborator

tdewolff commented Apr 20, 2022

El siguiente ejemplo a veces cae, @maltamiranomontero puedes verlo tú? Seguramente hay un problema en el modelo o en los límites de los parámetros (aunque no veo nada raro con los valores de los parámetros cuando se cayó). Esto pasa con dos canales y yo creo que la matriz de la covarianza está mal (pero no estoy seguro). Algunos valores son más grandes que el diagonal, que hace que la matriz no es positiva semi-definitiva.

import numpy as np
import pandas as pd
import mogptk

t = np.linspace(1.0, 200.0, 200)

data = pd.read_csv("data_BM.csv")
dataset = mogptk.DataSet(t, [np.array(data['a']), np.array(data['b']), np.array(data['c']), np.array(data['d'])], names=['Channel 1','Channel 2', 'Channel 3','Channel 4'])
dataset.transform(mogptk.TransformNormalize())
dataset.rescale_x()

for data in dataset:
    data.remove_randomly(pct=0.80)
dataset = dataset[0:2]
 
model = mogptk.MOHSM(dataset, Q=1, P=1, rescale_x=True)
model.init_parameters('BNSE')
model.print_parameters()
[data_BM.csv](https://github.com/GAMES-UChile/mogptk/files/8525944/data_BM.csv)
model.train(iters=1000, lr=0.1, verbose=False)
model.predict()

ERROR: torch.linalg_cholesky: The factorization could not be completed because the input is not positive-definite (the leading minor of order 41 is not positive-definite).

@tdewolff tdewolff mentioned this issue Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant