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
CC=g++ | |
MOC=moc-qt4 | |
CFLAGS=-Wall | |
SOURCES=hello.cc hello_cls.cc | |
MOC_HEADERS=hello_cls.h | |
EXECUTABLE=hello | |
INCDIRS=-I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore | |
LIBS=-lQtCore -lQtGui | |
# Change postfixes | |
MOC_SOURCES=$(MOC_HEADERS:.h=.moc.cc) |
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 | |
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
def horseshoe_prior(name, X, y, m, v, s): | |
''' | |
Regularizing horseshoe prior as introduced by Piironen & Vehtari | |
https://arxiv.org/pdf/1707.01694.pdf | |
name: variable name | |
X: X (2-d array) | |
y: y (for setting pseudo-variance) | |
m: expected number of relevant features (must be < total N) | |
v: regularizing student-t df |