Here is my to-do list for Gists/things I intend to write Gists about:
- Generic Bayesian linear regression: as basis functions, define some classes with
__call__
methods (EG Gaussian, polynomials) which take appropriate parameters to their__init__
method (EG location, scale, polynomial order); a given Bayesian linear regression solution should accept a list of basis functions, whose outputs for each data point can be calculated with the built-inmap
function, ornumpy.vectorise
, and compare the output with the MAP and ML solutions, EG:
import numpy as np
class Sigmoid:
def __init__(self, loc): self.loc = loc
def __call__(self, x): return 1.0 / (1.0 + np.exp(self.loc - x))
loc_list = np.linspace(0, 1, 10) # 10 basis functions
basis_functions = [Sigmoid(loc) for loc in loc_list]
x = np.linspace(0, 1, 20) # 20 data points
phi = np.array([b(x) for b in basis_functions]) # (10, 20) design matrix
- Repeat above with Newton's method (+ line-search?) for logistic regression
- DSP Gists:
- HMM
- Kalman filtering
- Spectrogram (STFT?)
- PSD tests? See 3F1/3F3 notes
- Resampling using Fourier methods; try different methods to avoid ringing by applying a function before resampling and then applying the inverse function after resampling, EG:
- Subtracting a linear-least squares interpolation of the data
- Subtracting a line which interpolates the first and last data points
- Multiplying element-wise by a non-zero window which is tapered at the edges (EG Hamming window)
- Speed tests Gist:
- Turn the code into a
speed_test
function, which accepts a test-function as an argument - Add an optional warmup time; the warmup time works by initiating a
signal.alarm
(only after registering a signal-handler) and then running the test function in a loop until thesignal.alarm
is raised; the signal-handler raises a time-out error which is caught in the loop and sets a flag, which makes the loop exit, at which point the code can go into the rest of thespeed_test
function - Make the
speed_test
function able to accept multipletest_function
s so that it can make a comparison and plot the results on a graph
- Turn the code into a
- Gist about linked lists in C: add description of why linked lists are useful/when to use them
- Gist about writing "Hello world" to a file: add 2 alternative approaches using
system
andexecl
- A single Gist containing the following functions:
fork
execle
strerror(errno)
fileno
dup2
exit
waitpid (<sys/wait.h>
- Preprocessor directives in C
- Useful GCC compiler flags
- Basic Java usage
- Basic threading/multiprocessing/mapping tutorial
- Basic Docker commands and volumes
- Writing functions for frequently saving matplotlib.pyplot images
- Logging