This file contains 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 multiprocessing | |
from joblib import Parallel, delayed | |
from scipy.spatial.distance import pdist, squareform | |
def _dcorr(y, n2, A, dcov2_xx): | |
"""Helper function for distance correlation bootstrapping. | |
""" | |
# Pairwise Euclidean distances | |
b = squareform(pdist(y, metric='euclidean')) |
This file contains 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 |
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 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 | |
def find_closest_divisor(n, m): | |
"""Find the divisor of n closest to m | |
""" | |
divisors = np.array([ i for i in range(1, int(np.sqrt(n)+1)) if n % i == 0 ]) | |
divisions = n / divisors | |
return divisions[np.argmin(np.abs(m - divisions))] | |
number, divisor = 1024, 100 |
This file contains 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(ez) | |
library(lsmeans) | |
library(effsize) | |
# Load the file | |
df <- read.csv(file="", head=TRUE, sep=",") | |
# Choose dependant variable (e.g. reaction time) | |
df$dv <- df$RT |