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
#!/bin/bash | |
mkdir example-dir | |
touch test.py | |
cp test.py example-dir/test.py | |
cd example | |
ls -al | grep "\.py$" |
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
# uses python3 | |
import sys | |
import numpy as np | |
# helper functions | |
def est_class_mean(x, y, label): | |
"""Given n * d numpy array of predictors, n * 1 array of labels and class label of interest, | |
return empirical mean for each variable in given class |