sdv-dev / Copulas

A library to model multivariate data using copulas.

Home Page:https://sdv.dev/Copulas/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigating the `get_likelihood` method

fealho opened this issue · comments

The get_likelihood method below may not work as expected:

def get_likelihood(self, uni_matrix):
"""Compute likelihood of the vine."""
# TODO: explain what this is supposed to do and make it work
# TODO: Alternatively, remove it.
num_tree = len(self.trees)
values = np.empty([1, num_tree])
for i in range(num_tree):
value, new_uni_matrix = self.trees[i].get_likelihood(uni_matrix)
uni_matrix = new_uni_matrix
values[0, i] = value
return np.sum(values)

An explanation of what this method does should be added, and we should investigate whether it works as expected.