This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidygraph) | |
| library(tidyverse) | |
| library(ggraph) | |
| library(dendextend) | |
| library(igraph) | |
| palette_OkabeIto <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7", "#999999") | |
| cut_df <- function(dendrogram, height, c){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| These computations rely on nearest-neighbor statistics | |
| ''' | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import ctypes as ct | |
| from scipy.linalg import cython_blas | |
| #ct.cdll.LoadLibrary("libopenblas.dll") | |
| #openblas = ct.CDLL("libopenblas.dll") | |
| #dgemm = openblas.dgemm | |
| ct.pythonapi.PyCapsule_GetPointer.restype = ct.c_void_p | |
| ct.pythonapi.PyCapsule_GetPointer.argtypes = [ct.py_object, ct.c_char_p] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| This code is maintained at https://github.com/mutualinfo/mutual_info | |
| Please download the latest code there, to have improvements and | |
| bug fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from scipy import special, stats | |
| from statsmodels.base.model import GenericLikelihoodModel | |
| def vuong_test(p1, p2): | |
| r""" | |
| Vuong-test for non-nested models. | |
| Parameters | |
| ---------- |