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 | |
EPSILON = 1e-10 | |
def _error(actual: np.ndarray, predicted: np.ndarray): | |
""" Simple error """ | |
return actual - predicted | |
- The paper introduces a novel technique to explain the predictions of any classifier in an interpretable and faithful manner.
- It also proposes a method to explain models by obtaining representative individual predictions and their explanations.
- Link to the paper
- Demo
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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
The [Cufflinks](http://cole-trapnell-lab.github.io/cufflinks/) Unix package is extremely well regarded for RNA-seq analysis. Yet it is widely acknowledged that installation is difficult, not least by the [Cufflinks authors themselves](http://cole-trapnell-lab.github.io/cufflinks/getting_started/#installing-a-pre-compiled-binary-release)! Whilst the authors provide precompiled binaries to make the installation process easier [the instructions aren't very explicit](http://cole-trapnell-lab.github.io/cufflinks/getting_started/). Having spent a good hour on Google and StackOverflow I've put together an instruction list for the less experienced Unix user like myself. | |
Note this guide is for Unix distributions. | |
1. Download the Cufflinks tar from http://cole-trapnell-lab.github.io/cufflinks/install/ | |
'''shell | |
wget http://cole-trapnell-lab.github.io/cufflinks/install/ | |
''' | |
2. Untar the downloaded file | |
'''shell |
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 | |
from scipy import stats | |
from itertools import combinations | |
from statsmodels.stats.multitest import multipletests | |
from statsmodels.stats.libqsturng import psturng | |
import warnings | |
def kw_dunn(groups, to_compare=None, alpha=0.05, method='bonf'): | |
""" |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
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
#!/usr/bin/env sh | |
# first check to see if mongo service is running. you can't delete any files until the service stops so perform a quick check. | |
launchctl list | grep mongo | |
# NOTE: the pipe | symbol means the commands on the right performs on the output from the left | |
# grep is a string search utility. `grep mongo` means search for the substring mongo | |
# use the unload command to end the mongo service. this is required to 'unlock' before removing the service. | |
# first look for the file to delete | |
MONGO_SERVICE_FILE=$(ls ~/Library/LaunchAgents/*mongodb*) |
How to use Pelican on GitHub Pages ![Gittip](https://camo.githubusercontent.com/41a54e41e95fa22290d0d187814d701f6a938105a3578f940d3d4d047145fe6a/68747470733a2f2f7261772e6769746875622e636f6d2f6769747469702f7777772e6769747469702e636f6d2f6d61737465722f696d672d7372632f6769747469702d6c6f676f2d33322e706e67)
Author: Josef Jezek
sudo apt-get install python-setuptools
NewerOlder