vine copulas
Problem description
I have a question regarding vine copulas. I'm using a made-up dataset to test it, and the issue is when I run the lines: copula = copulas.multivariate.vine.VineCopula(data) copula.fit(data)
I get this error: ValueError: Invalid tree type
What I already tried
I tried the default data set in the example as well, and the same error appears. I also tried this line: copulas.multivariate.VineCopula(data). It gives another error, and needs another argument called X.
Maybe you can try: copula = copulas.multivariate.vine.VineCopula('regular') copula.fit(data)
The vine copula document: https://sdv.dev/Copulas/tutorials/03_Multivariate_Distributions.html#Vine-Copulas
Hi @noonsad, I think @DILIU899 is correct.
I also referenced the API docs. When you instantiate a VineCopula, the first argument should be the vine type -- which a string of either 'regular', 'center' or 'direct'.
I'm closing the issue off since this seems to solve the error. Please feel free to reply if you continue to notice any crashes and we can reopen to investigate.
@DILIU899 and @npatki thanks for the response guys! you're right. I have tried this and it works:
from copulas.multivariate import VineCopula copula = VineCopula('center') #center is the type, 'regular' and 'direct' are also available. copula.fit(data)