Skip to content

Instantly share code, notes, and snippets.

View ARGHZ's full-sized avatar

Juan Carrillo ARGHZ

View GitHub Profile
@Swarchal
Swarchal / find_correlation.py
Last active June 23, 2022 04:17
findCorrelation in python
import pandas as pd
import numpy as np
def find_correlation(df, thresh=0.9):
"""
Given a numeric pd.DataFrame, this will find highly correlated features,
and return a list of features to remove
params:
- df : pd.DataFrame
# -*- coding: utf-8 -*-
"""
An example where effecting jittering of triggers occurs when
downsampling before epoching.
"""
import numpy as np
import matplotlib.pyplot as plt
# 1 sec of data @ 1000 Hz
fs = 1000. # Hz
@agramfort
agramfort / pdc_dtf.py
Created March 30, 2014 16:33
Partial Directed Coherence and Direct Transfer Function using MVAR processes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Implements Partial Directed Coherence and Direct Transfer Function
using MVAR processes.
Reference
---------
Luiz A. Baccala and Koichi Sameshima. Partial directed coherence:
a new concept in neural structure determination.