SYMBOL INDEX (2112 symbols across 341 files) FILE: ab_testing/bayesian_bandit.py class Bandit (line 20) | class Bandit: method __init__ (line 21) | def __init__(self, p): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function experiment (line 49) | def experiment(): FILE: ab_testing/bayesian_normal.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, true_mean): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function run_experiment (line 49) | def run_experiment(): FILE: ab_testing/bayesian_starter.py class Bandit (line 20) | class Bandit: method __init__ (line 21) | def __init__(self, p): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function experiment (line 49) | def experiment(): FILE: ab_testing/chisquare.py class DataGenerator (line 33) | class DataGenerator: method __init__ (line 34) | def __init__(self, p1, p2): method next (line 38) | def next(self): function get_p_value (line 44) | def get_p_value(T): function run_experiment (line 52) | def run_experiment(p1, p2, N): FILE: ab_testing/comparing_epsilons.py class BanditArm (line 12) | class BanditArm: method __init__ (line 13) | def __init__(self, m): method pull (line 18) | def pull(self): method update (line 21) | def update(self, x): function run_experiment (line 26) | def run_experiment(m1, m2, m3, eps, N): FILE: ab_testing/convergence.py function run_experiment (line 15) | def run_experiment(p1, p2, p3, N): FILE: ab_testing/demo.py function plot (line 14) | def plot(a, b, trial, ctr): FILE: ab_testing/epsilon_greedy.py class BanditArm (line 19) | class BanditArm: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function choose_random_argmax (line 35) | def choose_random_argmax(a): function experiment (line 40) | def experiment(): FILE: ab_testing/epsilon_greedy_starter.py class BanditArm (line 19) | class BanditArm: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: ab_testing/ex_chisq.py function get_p_value (line 21) | def get_p_value(T): FILE: ab_testing/optimistic.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: ab_testing/optimistic_starter.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: ab_testing/server_solution.py class Bandit (line 21) | class Bandit: method __init__ (line 22) | def __init__(self, name): method sample (line 27) | def sample(self): method add_click (line 33) | def add_click(self): method add_view (line 36) | def add_view(self): function get_ad (line 51) | def get_ad(): function click_ad (line 62) | def click_ad(): FILE: ab_testing/server_starter.py class Bandit (line 21) | class Bandit: method __init__ (line 22) | def __init__(self, name): method sample (line 25) | def sample(self): function get_ad (line 39) | def get_ad(): function click_ad (line 45) | def click_ad(): FILE: ab_testing/ucb1.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, p): method pull (line 25) | def pull(self): method update (line 29) | def update(self, x): function ucb (line 34) | def ucb(mean, n, nj): function run_experiment (line 38) | def run_experiment(): FILE: ab_testing/ucb1_starter.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, p): method pull (line 25) | def pull(self): method update (line 29) | def update(self, x): function ucb (line 34) | def ucb(mean, n, nj): function run_experiment (line 38) | def run_experiment(): FILE: airline/ann.py function init_weight (line 12) | def init_weight(M1, M2): function myr2 (line 15) | def myr2(T, Y): class HiddenLayer (line 21) | class HiddenLayer(object): method __init__ (line 22) | def __init__(self, M1, M2, f, an_id): method forward (line 33) | def forward(self, X): class ANN (line 37) | class ANN(object): method __init__ (line 38) | def __init__(self, hidden_layer_sizes): method fit (line 41) | def fit(self, X, Y, activation=T.tanh, learning_rate=1e-3, mu=0.5, reg... method forward (line 118) | def forward(self, X): method score (line 124) | def score(self, X, Y): method predict (line 128) | def predict(self, X): FILE: airline/rnn.py function init_weight (line 19) | def init_weight(M1, M2): function myr2 (line 22) | def myr2(T, Y): class RNN (line 28) | class RNN(object): method __init__ (line 29) | def __init__(self, hidden_layer_sizes): method fit (line 32) | def fit(self, X, Y, activation=T.tanh, learning_rate=1e-1, mu=0.5, reg... method forward (line 99) | def forward(self, X): method score (line 105) | def score(self, X, Y): method predict (line 109) | def predict(self, X): FILE: ann_class/backprop.py function forward (line 17) | def forward(X, W1, b1, W2, b2): function classification_rate (line 27) | def classification_rate(Y, P): function derivative_w2 (line 37) | def derivative_w2(Z, T, Y): function derivative_w1 (line 70) | def derivative_w1(X, Z, T, Y, W2): function derivative_b2 (line 91) | def derivative_b2(T, Y): function derivative_b1 (line 95) | def derivative_b1(T, Y, W2, Z): function cost (line 99) | def cost(T, Y): function main (line 104) | def main(): FILE: ann_class/forwardprop.py function sigmoid (line 39) | def sigmoid(a): function forward (line 42) | def forward(X, W1, b1, W2, b2): function classification_rate (line 53) | def classification_rate(Y, P): FILE: ann_class/regression.py function forward (line 52) | def forward(X): function derivative_V (line 64) | def derivative_V(Z, Y, Yhat): function derivative_c (line 67) | def derivative_c(Y, Yhat): function derivative_W (line 70) | def derivative_W(X, Z, Y, Yhat, V): function derivative_b (line 75) | def derivative_b(Z, Y, Yhat, V): function update (line 80) | def update(X, Z, Y, Yhat, W, b, V, c, learning_rate=1e-4): function get_cost (line 97) | def get_cost(Y, Yhat): FILE: ann_class/tf_example.py function init_weights (line 41) | def init_weights(shape): function forward (line 45) | def forward(X, W1, b1, W2, b2): FILE: ann_class/xor_donut.py function forward (line 19) | def forward(X, W1, b1, W2, b2): function predict (line 35) | def predict(X, W1, b1, W2, b2): function derivative_w2 (line 40) | def derivative_w2(Z, T, Y): function derivative_b2 (line 44) | def derivative_b2(T, Y): function derivative_w1 (line 48) | def derivative_w1(X, Z, T, Y, W2): function derivative_b1 (line 55) | def derivative_b1(Z, T, Y, W2): function get_log_likelihood (line 62) | def get_log_likelihood(T, Y): function test_xor (line 67) | def test_xor(): function test_donut (line 104) | def test_donut(): FILE: ann_class2/adam.py function main (line 18) | def main(): FILE: ann_class2/batch_norm_tf.py function init_weight (line 15) | def init_weight(M1, M2): class HiddenLayerBatchNorm (line 19) | class HiddenLayerBatchNorm(object): method __init__ (line 20) | def __init__(self, M1, M2, f): method forward (line 37) | def forward(self, X, is_training, decay=0.9): class HiddenLayer (line 71) | class HiddenLayer(object): method __init__ (line 72) | def __init__(self, M1, M2, f): method forward (line 81) | def forward(self, X): class ANN (line 85) | class ANN(object): method __init__ (line 86) | def __init__(self, hidden_layer_sizes): method set_session (line 89) | def set_session(self, session): method fit (line 92) | def fit(self, X, Y, Xtest, Ytest, activation=tf.nn.relu, learning_rate... method forward (line 168) | def forward(self, X, is_training): method score (line 175) | def score(self, X, Y): method predict (line 179) | def predict(self, X): function main (line 184) | def main(): FILE: ann_class2/batch_norm_theano.py function init_weight (line 17) | def init_weight(M1, M2): class HiddenLayerBatchNorm (line 21) | class HiddenLayerBatchNorm(object): method __init__ (line 22) | def __init__(self, M1, M2, f): method forward (line 43) | def forward(self, X, is_training): class HiddenLayer (line 83) | class HiddenLayer(object): method __init__ (line 84) | def __init__(self, M1, M2, f): method forward (line 94) | def forward(self, X): function momentum_updates (line 98) | def momentum_updates(cost, params, lr, mu): class ANN (line 111) | class ANN(object): method __init__ (line 112) | def __init__(self, hidden_layer_sizes): method fit (line 115) | def fit(self, X, Y, Xtest, Ytest, activation=T.nnet.relu, learning_rat... method forward (line 196) | def forward(self, X, is_training): method score (line 203) | def score(self, X, Y): function main (line 209) | def main(): FILE: ann_class2/cntk_example.py function get_output (line 97) | def get_output(node, X, Y): FILE: ann_class2/dropout_tensorflow.py class HiddenLayer (line 17) | class HiddenLayer(object): method __init__ (line 18) | def __init__(self, M1, M2): method forward (line 27) | def forward(self, X): class ANN (line 31) | class ANN(object): method __init__ (line 32) | def __init__(self, hidden_layer_sizes, p_keep): method fit (line 36) | def fit(self, X, Y, Xvalid, Yvalid, lr=1e-4, mu=0.9, decay=0.9, epochs... method forward (line 110) | def forward(self, X): method forward_test (line 120) | def forward_test(self, X): method predict (line 126) | def predict(self, X): function error_rate (line 131) | def error_rate(p, t): function relu (line 135) | def relu(a): function main (line 139) | def main(): FILE: ann_class2/dropout_theano.py function momentum_updates (line 22) | def momentum_updates(cost, params, lr, mu): class HiddenLayer (line 35) | class HiddenLayer(object): method __init__ (line 36) | def __init__(self, M1, M2, an_id): method forward (line 46) | def forward(self, X): class ANN (line 50) | class ANN(object): method __init__ (line 51) | def __init__(self, hidden_layer_sizes, p_keep): method fit (line 55) | def fit(self, X, Y, Xvalid, Yvalid, learning_rate=1e-2, mu=0.9, decay=... method forward_train (line 124) | def forward_train(self, X): method forward_predict (line 134) | def forward_predict(self, X): method predict (line 140) | def predict(self, X): function error_rate (line 145) | def error_rate(p, t): function relu (line 149) | def relu(a): function main (line 153) | def main(): FILE: ann_class2/grid_search.py function grid_search (line 18) | def grid_search(): FILE: ann_class2/mlp.py function forward (line 12) | def forward(X, W1, b1, W2, b2): function derivative_w2 (line 25) | def derivative_w2(Z, T, Y): function derivative_b2 (line 28) | def derivative_b2(T, Y): function derivative_w1 (line 31) | def derivative_w1(X, Z, T, Y, W2): function derivative_b1 (line 35) | def derivative_b1(Z, T, Y, W2): FILE: ann_class2/momentum.py function main (line 22) | def main(): FILE: ann_class2/pytorch_batchnorm.py function train (line 68) | def train(model, loss, optimizer, inputs, labels): function get_cost (line 95) | def get_cost(model, loss, inputs, labels): function predict (line 113) | def predict(model, inputs): function score (line 127) | def score(model, inputs, labels): FILE: ann_class2/pytorch_dropout.py function train (line 69) | def train(model, loss, optimizer, inputs, labels): function get_cost (line 96) | def get_cost(model, loss, inputs, labels): function predict (line 114) | def predict(model, inputs): function score (line 128) | def score(model, inputs, labels): FILE: ann_class2/pytorch_example.py function train (line 66) | def train(model, loss, optimizer, inputs, labels): function predict (line 93) | def predict(model, inputs): FILE: ann_class2/pytorch_example2.py function train (line 66) | def train(model, loss, optimizer, inputs, labels): function get_cost (line 89) | def get_cost(model, loss, inputs, labels): function predict (line 103) | def predict(model, inputs): function score (line 113) | def score(model, inputs, labels): FILE: ann_class2/random_search.py function random_search (line 18) | def random_search(): FILE: ann_class2/rmsprop.py function main (line 18) | def main(): FILE: ann_class2/rmsprop_test.py function rmsprop (line 79) | def rmsprop(cost, params, lr=1e-3, decay=0.9, eps=1e-8): FILE: ann_class2/sgd.py function main (line 24) | def main(): FILE: ann_class2/tensorflow2.py function error_rate (line 21) | def error_rate(p, t): function main (line 26) | def main(): FILE: ann_class2/tf_with_save.py function error_rate (line 18) | def error_rate(p, t): class TFLogistic (line 22) | class TFLogistic: method __init__ (line 23) | def __init__(self, savefile, D=None, K=None): method build (line 29) | def build(self, D, K): method fit (line 54) | def fit(self, X, Y, Xtest, Ytest): method predict (line 100) | def predict(self, X): method score (line 108) | def score(self, X, Y): method save (line 111) | def save(self, filename): method load (line 121) | def load(filename): function main (line 127) | def main(): FILE: ann_class2/theano2.py function error_rate (line 21) | def error_rate(p, t): function relu (line 25) | def relu(a): function main (line 29) | def main(): FILE: ann_class2/theano_ann.py function init_weight (line 17) | def init_weight(M1, M2): class HiddenLayer (line 21) | class HiddenLayer(object): method __init__ (line 22) | def __init__(self, M1, M2, f): method forward (line 32) | def forward(self, X): class ANN (line 38) | class ANN(object): method __init__ (line 39) | def __init__(self, hidden_layer_sizes): method fit (line 42) | def fit(self, X, Y, activation=T.nnet.relu, learning_rate=1e-3, mu=0.0... method forward (line 118) | def forward(self, X): method score (line 124) | def score(self, X, Y): method predict (line 128) | def predict(self, X): FILE: ann_class2/util.py function get_clouds (line 21) | def get_clouds(): function get_spiral (line 34) | def get_spiral(): function get_transformed_data (line 70) | def get_transformed_data(): function get_normalized_data (line 117) | def get_normalized_data(): function plot_cumulative_variance (line 148) | def plot_cumulative_variance(pca): function forward (line 160) | def forward(X, W, b): function predict (line 168) | def predict(p_y): function error_rate (line 172) | def error_rate(p_y, t): function cost (line 177) | def cost(p_y, t): function gradW (line 182) | def gradW(t, y, X): function gradb (line 186) | def gradb(t, y): function y2indicator (line 190) | def y2indicator(y): function benchmark_full (line 199) | def benchmark_full(): function benchmark_pca (line 255) | def benchmark_pca(): FILE: ann_logistic_extra/ann_predict.py function softmax (line 22) | def softmax(a): function forward (line 26) | def forward(X, W1, b1, W2, b2): function classification_rate (line 35) | def classification_rate(Y, P): FILE: ann_logistic_extra/ann_train.py function y2indicator (line 13) | def y2indicator(y, K): function softmax (line 36) | def softmax(a): function forward (line 40) | def forward(X, W1, b1, W2, b2): function predict (line 44) | def predict(P_Y_given_X): function classification_rate (line 48) | def classification_rate(Y, P): function cross_entropy (line 51) | def cross_entropy(Y, pY): FILE: ann_logistic_extra/logistic_predict.py function sigmoid (line 18) | def sigmoid(a): function forward (line 21) | def forward(X, W, b): function classification_rate (line 28) | def classification_rate(Y, P): FILE: ann_logistic_extra/logistic_softmax_train.py function y2indicator (line 13) | def y2indicator(y, K): function softmax (line 33) | def softmax(a): function forward (line 37) | def forward(X, W, b): function predict (line 40) | def predict(P_Y_given_X): function classification_rate (line 44) | def classification_rate(Y, P): function cross_entropy (line 47) | def cross_entropy(Y, pY): FILE: ann_logistic_extra/logistic_train.py function sigmoid (line 22) | def sigmoid(a): function forward (line 25) | def forward(X, W, b): function classification_rate (line 29) | def classification_rate(Y, P): function cross_entropy (line 33) | def cross_entropy(T, pY): FILE: ann_logistic_extra/process.py function get_data (line 17) | def get_data(): function get_binary_data (line 69) | def get_binary_data(): FILE: bayesian_ml/1/nb.py class NB (line 11) | class NB: method fit (line 12) | def fit(self, X, Y): method predict_proba (line 41) | def predict_proba(self, X): method predict (line 72) | def predict(self, X): method score (line 75) | def score(self, X, Y): method confusion_matrix (line 78) | def confusion_matrix(self, X, Y): method get_3_misclassified (line 87) | def get_3_misclassified(self, X, Y): method get_3_most_ambiguous (line 93) | def get_3_most_ambiguous(self, X, Y): function plot_image (line 109) | def plot_image(x, Q, title): FILE: bayesian_ml/2/em.py function loglikelihood (line 25) | def loglikelihood(X, Z, W): FILE: bayesian_ml/2/probit.py class ProbitRegression (line 11) | class ProbitRegression: method fit (line 12) | def fit(self, X, Y, sigma=1.5, lam=1, show_w=set(), Q=None): method predict_proba (line 51) | def predict_proba(self, X): method predict (line 55) | def predict(self, X): method score (line 58) | def score(self, X, Y): method confusion_matrix (line 61) | def confusion_matrix(self, X, Y): method get_3_misclassified (line 70) | def get_3_misclassified(self, X, Y): method get_3_most_ambiguous (line 76) | def get_3_most_ambiguous(self, X, Y): function plot_image (line 92) | def plot_image(x, Q, title): FILE: bayesian_ml/3/run.py function e_ln_q_gamma (line 14) | def e_ln_q_gamma(a, b): function objective (line 17) | def objective(X, Y, C, mu, a, b, e, f, a0, b0, e0, f0): function run (line 79) | def run(num=1, T=500): FILE: bayesian_ml/4/emgmm.py function gmm (line 10) | def gmm(X, K, max_iter=20, smoothing=1e-2): function main (line 63) | def main(): FILE: bayesian_ml/4/npbgmm.py function marginal (line 19) | def marginal(x, c, m, a, B): function normalize_phi_hat (line 32) | def normalize_phi_hat(phi_hat): function sample_cluster_identity (line 41) | def sample_cluster_identity(phi): function sample_from_prior (line 54) | def sample_from_prior(c0, m0, a0, B0): function sample_from_X (line 62) | def sample_from_X(X, m0, c0, a0, B0): function gmm (line 75) | def gmm(X, T=500): function main (line 196) | def main(): FILE: bayesian_ml/4/vigmm.py function get_cost (line 11) | def get_cost(X, K, cluster_assignments, phi, alphas, mu_means, mu_covs, ... function gmm (line 98) | def gmm(X, K, max_iter=100): function main (line 207) | def main(): FILE: cnn_class/benchmark.py function error_rate (line 20) | def error_rate(p, t): function flatten (line 24) | def flatten(X): function get_data (line 50) | def get_data(): function main (line 63) | def main(): FILE: cnn_class/cifar.py function init_weight_and_bias (line 17) | def init_weight_and_bias(M1, M2): function init_filter (line 23) | def init_filter(shape, poolsz): function error_rate (line 28) | def error_rate(targets, predictions): function image2array (line 32) | def image2array(im): function getImageData (line 37) | def getImageData(): class HiddenLayer (line 70) | class HiddenLayer(object): method __init__ (line 71) | def __init__(self, M1, M2, an_id): method forward (line 80) | def forward(self, X): class ConvPoolLayer (line 84) | class ConvPoolLayer(object): method __init__ (line 85) | def __init__(self, mi, mo, fw=5, fh=5, poolsz=(2, 2)): method forward (line 96) | def forward(self, X): class CNN (line 106) | class CNN(object): method __init__ (line 107) | def __init__(self, convpool_layer_sizes, hidden_layer_sizes): method fit (line 111) | def fit(self, X, Y, lr=1e-4, mu=0.99, reg=1e-6, decay=0.99999, eps=1e-... method forward (line 211) | def forward(self, X): method predict (line 220) | def predict(self, X): function main (line 225) | def main(): FILE: cnn_class/cnn_tf.py function convpool (line 26) | def convpool(X, W, b): function init_filter (line 34) | def init_filter(shape, poolsz): function rearrange (line 39) | def rearrange(X): function main (line 51) | def main(): FILE: cnn_class/cnn_tf_plot_filters.py function convpool (line 26) | def convpool(X, W, b): function init_filter (line 34) | def init_filter(shape, poolsz): function rearrange (line 39) | def rearrange(X): FILE: cnn_class/cnn_theano.py function relu (line 24) | def relu(a): function convpool (line 28) | def convpool(X, W, b, poolsize=(2, 2)): function init_filter (line 46) | def init_filter(shape, poolsz): function rearrange (line 51) | def rearrange(X): function main (line 63) | def main(): FILE: cnn_class/cnn_theano_plot_filters.py function main (line 22) | def main(): FILE: cnn_class/custom_blur.py function convolve2d (line 40) | def convolve2d(X, W): FILE: cnn_class/edge_benchmark.py function convolve_flatten (line 34) | def convolve_flatten(X): function main (line 50) | def main(): FILE: cnn_class/keras_example.py function rearrange (line 31) | def rearrange(X): FILE: cnn_class2/fashion.py function y2indicator (line 18) | def y2indicator(Y): FILE: cnn_class2/fashion2.py function y2indicator (line 18) | def y2indicator(Y): FILE: cnn_class2/make_limited_datasets.py function mkdir (line 5) | def mkdir(p): function link (line 9) | def link(src, dst): FILE: cnn_class2/siamese.py function load_img (line 30) | def load_img(filepath): function train_generator (line 155) | def train_generator(): function test_generator (line 196) | def test_generator(): function euclidean_distance (line 263) | def euclidean_distance(features): function contrastive_loss (line 277) | def contrastive_loss(y_true, y_pred): function get_train_accuracy (line 291) | def get_train_accuracy(threshold=0.85): function get_test_accuracy (line 356) | def get_test_accuracy(threshold=0.85): FILE: cnn_class2/ssd.py function load_image_into_numpy_array (line 67) | def load_image_into_numpy_array(image): FILE: cnn_class2/style_transfer1.py function VGG16_AvgPool (line 32) | def VGG16_AvgPool(shape): function VGG16_AvgPool_CutOff (line 56) | def VGG16_AvgPool_CutOff(shape, num_convs): function unpreprocess (line 87) | def unpreprocess(img): function scale_img (line 95) | def scale_img(x): function get_loss_and_grads_wrapper (line 146) | def get_loss_and_grads_wrapper(x_vec): FILE: cnn_class2/style_transfer2.py function gram_matrix (line 30) | def gram_matrix(img): function style_loss (line 42) | def style_loss(y, t): function minimize (line 47) | def minimize(fn, epochs, batch_shape): function get_loss_and_grads_wrapper (line 137) | def get_loss_and_grads_wrapper(x_vec): FILE: cnn_class2/style_transfer3.py function load_img_and_preprocess (line 35) | def load_img_and_preprocess(path, shape=None): function get_loss_and_grads_wrapper (line 125) | def get_loss_and_grads_wrapper(x_vec): FILE: cnn_class2/test_softmax.py function custom_softmax (line 13) | def custom_softmax(x): FILE: cnn_class2/tf_resnet.py class AvgPool (line 55) | class AvgPool: method __init__ (line 56) | def __init__(self, ksize): method forward (line 59) | def forward(self, X): method get_params (line 67) | def get_params(self): class Flatten (line 70) | class Flatten: method forward (line 71) | def forward(self, X): method get_params (line 74) | def get_params(self): function custom_softmax (line 78) | def custom_softmax(x): class DenseLayer (line 85) | class DenseLayer: method __init__ (line 86) | def __init__(self, mi, mo): method forward (line 90) | def forward(self, X): method copyFromKerasLayers (line 97) | def copyFromKerasLayers(self, layer): method get_params (line 103) | def get_params(self): class TFResNet (line 107) | class TFResNet: method __init__ (line 108) | def __init__(self): method copyFromKerasLayers (line 147) | def copyFromKerasLayers(self, layers): method forward (line 180) | def forward(self, X): method predict (line 185) | def predict(self, X): method set_session (line 192) | def set_session(self, session): method get_params (line 200) | def get_params(self): FILE: cnn_class2/tf_resnet_convblock.py function init_filter (line 14) | def init_filter(d, mi, mo, stride): class ConvLayer (line 18) | class ConvLayer: method __init__ (line 19) | def __init__(self, d, mi, mo, stride=2, padding='VALID'): method forward (line 25) | def forward(self, X): method copyFromKerasLayers (line 35) | def copyFromKerasLayers(self, layer): method get_params (line 47) | def get_params(self): class BatchNormLayer (line 51) | class BatchNormLayer: method __init__ (line 52) | def __init__(self, D): method forward (line 58) | def forward(self, X): method copyFromKerasLayers (line 68) | def copyFromKerasLayers(self, layer): method get_params (line 79) | def get_params(self): class ConvBlock (line 83) | class ConvBlock: method __init__ (line 84) | def __init__(self, mi, fm_sizes, stride=2, activation=tf.nn.relu): method forward (line 125) | def forward(self, X): method predict (line 142) | def predict(self, X): method set_session (line 149) | def set_session(self, session): method copyFromKerasLayers (line 162) | def copyFromKerasLayers(self, layers): method get_params (line 184) | def get_params(self): FILE: cnn_class2/tf_resnet_convblock_starter.py class ConvBlock (line 14) | class ConvBlock: method __init__ (line 15) | def __init__(self): method predict (line 18) | def predict(self, X): FILE: cnn_class2/tf_resnet_first_layers.py class ReLULayer (line 47) | class ReLULayer: method forward (line 48) | def forward(self, X): method get_params (line 51) | def get_params(self): class MaxPoolLayer (line 54) | class MaxPoolLayer: method __init__ (line 55) | def __init__(self, dim): method forward (line 58) | def forward(self, X): method get_params (line 66) | def get_params(self): class PartialResNet (line 69) | class PartialResNet: method __init__ (line 70) | def __init__(self): method copyFromKerasLayers (line 83) | def copyFromKerasLayers(self, layers): method forward (line 88) | def forward(self, X): method predict (line 93) | def predict(self, X): method set_session (line 100) | def set_session(self, session): method get_params (line 106) | def get_params(self): FILE: cnn_class2/tf_resnet_first_layers_starter.py class PartialResNet (line 26) | class PartialResNet: method __init__ (line 27) | def __init__(self): method copyFromKerasLayers (line 31) | def copyFromKerasLayers(self, layers): method predict (line 35) | def predict(self, X): method set_session (line 39) | def set_session(self, session): method get_params (line 43) | def get_params(self): FILE: cnn_class2/tf_resnet_identity_block.py class IdentityBlock (line 16) | class IdentityBlock: method __init__ (line 17) | def __init__(self, mi, fm_sizes, activation=tf.nn.relu): method forward (line 49) | def forward(self, X): method predict (line 62) | def predict(self, X): method set_session (line 69) | def set_session(self, session): method copyFromKerasLayers (line 80) | def copyFromKerasLayers(self, layers): method get_params (line 99) | def get_params(self): FILE: cnn_class2/tf_resnet_identity_block_starter.py class IdentityBlock (line 16) | class IdentityBlock: method __init__ (line 17) | def __init__(self): method predict (line 22) | def predict(self, X): FILE: cnn_class2/use_pretrained_weights_resnet.py function get_confusion_matrix (line 138) | def get_confusion_matrix(data_path, N): FILE: cnn_class2/use_pretrained_weights_vgg.py function get_confusion_matrix (line 136) | def get_confusion_matrix(data_path, N): FILE: cnn_class2/util.py function plot_confusion_matrix (line 14) | def plot_confusion_matrix(cm, classes, function y2indicator (line 50) | def y2indicator(Y): FILE: hmm_class/frost.py function remove_punctuation_2 (line 23) | def remove_punctuation_2(s): function remove_punctuation_3 (line 26) | def remove_punctuation_3(s): function add2dict (line 35) | def add2dict(d, k, v): function list2pdict (line 68) | def list2pdict(ts): function sample_word (line 86) | def sample_word(d): function generate (line 97) | def generate(): FILE: hmm_class/generate_c.py function simple_init (line 15) | def simple_init(): function big_init (line 26) | def big_init(): function get_signals (line 57) | def get_signals(N=20, T=100, init=big_init): FILE: hmm_class/generate_ht.py function generate_sequence (line 22) | def generate_sequence(N): function main (line 33) | def main(): FILE: hmm_class/hmm_classifier.py class HMMClassifier (line 21) | class HMMClassifier: method __init__ (line 22) | def __init__(self): method fit (line 25) | def fit(self, X, Y, V): method score (line 40) | def score(self, X, Y): function get_tags (line 54) | def get_tags(s): function get_data (line 58) | def get_data(): function main (line 88) | def main(): FILE: hmm_class/hmmc.py function random_normalized (line 18) | def random_normalized(d1, d2): class HMM (line 23) | class HMM: method __init__ (line 24) | def __init__(self, M, K): method fit (line 28) | def fit(self, X, max_iter=30, eps=1e0): method likelihood (line 176) | def likelihood(self, x): method get_state_sequence (line 194) | def get_state_sequence(self, x): method likelihood_multi (line 223) | def likelihood_multi(self, X): method log_likelihood_multi (line 226) | def log_likelihood_multi(self, X): method set (line 229) | def set(self, pi, A, R, mu, sigma): function real_signal (line 240) | def real_signal(): function fake_signal (line 259) | def fake_signal(init=simple_init): FILE: hmm_class/hmmc_concat.py function random_normalized (line 19) | def random_normalized(d1, d2): class HMM (line 24) | class HMM: method __init__ (line 25) | def __init__(self, M, K): method fit (line 29) | def fit(self, X, max_iter=30, eps=1e0): method likelihood (line 177) | def likelihood(self, x): method likelihood_multi (line 195) | def likelihood_multi(self, X): method log_likelihood_multi (line 198) | def log_likelihood_multi(self, X): method set (line 201) | def set(self, pi, A, R, mu, sigma): function real_signal (line 212) | def real_signal(): function fake_signal (line 231) | def fake_signal(init=simple_init): FILE: hmm_class/hmmc_scaled_concat.py function random_normalized (line 17) | def random_normalized(d1, d2): class HMM (line 21) | class HMM: method __init__ (line 22) | def __init__(self, M, K): method fit (line 26) | def fit(self, X, max_iter=25, eps=1e-1): method log_likelihood (line 179) | def log_likelihood(self, x): method log_likelihood_multi (line 200) | def log_likelihood_multi(self, X): method set (line 203) | def set(self, pi, A, R, mu, sigma): function real_signal (line 214) | def real_signal(): function fake_signal (line 234) | def fake_signal(init=big_init): FILE: hmm_class/hmmc_scaled_concat_diag.py function random_normalized (line 18) | def random_normalized(d1, d2): class HMM (line 22) | class HMM: method __init__ (line 23) | def __init__(self, M, K): method fit (line 27) | def fit(self, X, max_iter=25, eps=1e-1): method log_likelihood (line 177) | def log_likelihood(self, x): method get_state_sequence (line 198) | def get_state_sequence(self, x): method log_likelihood_multi (line 234) | def log_likelihood_multi(self, X): method set (line 237) | def set(self, pi, A, R, mu, sigma): function real_signal (line 248) | def real_signal(): function fake_signal (line 268) | def fake_signal(init=big_init): FILE: hmm_class/hmmc_tf.py class HMM (line 20) | class HMM: method __init__ (line 21) | def __init__(self, M, K, D): method set_session (line 26) | def set_session(self, session): method init_random (line 29) | def init_random(self, X): method build (line 46) | def build(self, preSoftmaxPi, preSoftmaxA, preSoftmaxR, mu, logSigma): method set (line 133) | def set(self, preSoftmaxPi, preSoftmaxA, preSoftmaxR, mu, logSigma): method fit (line 143) | def fit(self, X, max_iter=10): method get_cost (line 164) | def get_cost(self, x): method get_cost_multi (line 167) | def get_cost_multi(self, X): function real_signal (line 171) | def real_signal(): function fake_signal (line 201) | def fake_signal(): FILE: hmm_class/hmmc_theano.py function random_normalized (line 20) | def random_normalized(d1, d2): class HMM (line 25) | class HMM: method __init__ (line 26) | def __init__(self, M, K): method fit (line 30) | def fit(self, X, learning_rate=1e-2, max_iter=10): method set (line 94) | def set(self, pi, A, R, mu, sigma): method log_likelihood_multi (line 163) | def log_likelihood_multi(self, X): function real_signal (line 167) | def real_signal(): function fake_signal (line 188) | def fake_signal(): FILE: hmm_class/hmmc_theano2.py class HMM (line 27) | class HMM: method __init__ (line 28) | def __init__(self, M, K): method fit (line 32) | def fit(self, X, learning_rate=1e-2, max_iter=10): method set (line 84) | def set(self, preSoftmaxPi, preSoftmaxA, preSoftmaxR, mu, sigmaFactor): method log_likelihood_multi (line 165) | def log_likelihood_multi(self, X): function real_signal (line 169) | def real_signal(): function fake_signal (line 190) | def fake_signal(): FILE: hmm_class/hmmd.py function random_normalized (line 16) | def random_normalized(d1, d2): class HMM (line 21) | class HMM: method __init__ (line 22) | def __init__(self, M): method fit (line 25) | def fit(self, X, max_iter=30): method likelihood (line 146) | def likelihood(self, x): method likelihood_multi (line 156) | def likelihood_multi(self, X): method log_likelihood_multi (line 159) | def log_likelihood_multi(self, X): method get_state_sequence (line 162) | def get_state_sequence(self, x): function fit_coin (line 181) | def fit_coin(): FILE: hmm_class/hmmd_scaled.py function random_normalized (line 15) | def random_normalized(d1, d2): class HMM (line 20) | class HMM: method __init__ (line 21) | def __init__(self, M): method fit (line 24) | def fit(self, X, max_iter=30): method log_likelihood (line 117) | def log_likelihood(self, x): method log_likelihood_multi (line 132) | def log_likelihood_multi(self, X): method get_state_sequence (line 135) | def get_state_sequence(self, x): function fit_coin (line 155) | def fit_coin(): FILE: hmm_class/hmmd_tf.py class HMM (line 16) | class HMM: method __init__ (line 17) | def __init__(self, M): method set_session (line 20) | def set_session(self, session): method fit (line 23) | def fit(self, X, max_iter=10, print_period=1): method get_cost (line 44) | def get_cost(self, x): method log_likelihood (line 50) | def log_likelihood(self, x): method get_cost_multi (line 53) | def get_cost_multi(self, X): method build (line 56) | def build(self, preSoftmaxPi, preSoftmaxA, preSoftmaxB): method init_random (line 91) | def init_random(self, V): method set (line 98) | def set(self, preSoftmaxPi, preSoftmaxA, preSoftmaxB): function fit_coin (line 105) | def fit_coin(): FILE: hmm_class/hmmd_theano.py function random_normalized (line 17) | def random_normalized(d1, d2): class HMM (line 22) | class HMM: method __init__ (line 23) | def __init__(self, M): method fit (line 26) | def fit(self, X, learning_rate=0.001, max_iter=10, V=None, p_cost=1.0,... method get_cost (line 90) | def get_cost(self, x): method log_likelihood (line 95) | def log_likelihood(self, x): method get_cost_multi (line 98) | def get_cost_multi(self, X, p_cost=1.0): method set (line 102) | def set(self, pi, A, B): function fit_coin (line 131) | def fit_coin(): FILE: hmm_class/hmmd_theano2.py class HMM (line 24) | class HMM: method __init__ (line 25) | def __init__(self, M): method fit (line 28) | def fit(self, X, learning_rate=0.001, max_iter=10, V=None, print_perio... method get_cost (line 80) | def get_cost(self, x): method log_likelihood (line 86) | def log_likelihood(self, x): method get_cost_multi (line 89) | def get_cost_multi(self, X): method set (line 92) | def set(self, preSoftmaxPi, preSoftmaxA, preSoftmaxB): function fit_coin (line 126) | def fit_coin(): FILE: hmm_class/scan1.py function square (line 18) | def square(x): FILE: hmm_class/scan2.py function recurrence (line 18) | def recurrence(n, fn_1, fn_2): FILE: hmm_class/scan3.py function recurrence (line 25) | def recurrence(x, last, decay): FILE: hmm_class/tf_scan1.py function square (line 19) | def square(last, current): FILE: hmm_class/tf_scan2.py function recurrence (line 21) | def recurrence(last_output, current_input): FILE: hmm_class/tf_scan3.py function recurrence (line 27) | def recurrence(last, x): FILE: keras_examples/util.py function getKaggleMNIST (line 13) | def getKaggleMNIST(): function getKaggleFashionMNIST (line 18) | def getKaggleFashionMNIST(): function getMNISTFormat (line 22) | def getMNISTFormat(path): function getKaggleMNIST3D (line 37) | def getKaggleMNIST3D(): function getKaggleFashionMNIST3D (line 43) | def getKaggleFashionMNIST3D(): function getCIFAR10 (line 49) | def getCIFAR10(): FILE: kerascv/pascal2coco.py function get_label2id (line 12) | def get_label2id(labels_path: str) -> Dict[str, int]: function get_annpaths (line 20) | def get_annpaths(ann_dir_path: str = None, function get_image_info (line 38) | def get_image_info(annotation_root, extract_num_from_imgid=True): function get_coco_annotation_from_obj (line 62) | def get_coco_annotation_from_obj(obj, label2id): function convert_xmls_to_cocojson (line 85) | def convert_xmls_to_cocojson(annotation_paths: List[str], function main (line 122) | def main(): FILE: linear_regression_class/gd.py function J (line 7) | def J(x1, x2): function g1 (line 10) | def g1(x1): function g2 (line 13) | def g2(x2): FILE: linear_regression_class/overfitting.py function make_poly (line 15) | def make_poly(X, deg): function fit (line 23) | def fit(X, Y): function fit_and_display (line 27) | def fit_and_display(X, Y, sample, deg): function get_mse (line 50) | def get_mse(Y, Yhat): function plot_train_vs_test_curves (line 55) | def plot_train_vs_test_curves(X, Y, sample=20, max_deg=20): FILE: linear_regression_class/systolic.py function get_r2 (line 41) | def get_r2(X, Y): FILE: logistic_regression_class/bad_xor.py function sigmoid (line 40) | def sigmoid(z): function cross_entropy (line 47) | def cross_entropy(T, Y): FILE: logistic_regression_class/l1_regularization.py function sigmoid (line 15) | def sigmoid(z): FILE: logistic_regression_class/logistic1.py function sigmoid (line 30) | def sigmoid(z): FILE: logistic_regression_class/logistic2.py function sigmoid (line 43) | def sigmoid(z): function cross_entropy (line 49) | def cross_entropy(T, Y): FILE: logistic_regression_class/logistic3.py function sigmoid (line 44) | def sigmoid(z): function cross_entropy (line 51) | def cross_entropy(T, Y): FILE: logistic_regression_class/logistic4.py function sigmoid (line 43) | def sigmoid(z): function cross_entropy (line 50) | def cross_entropy(T, Y): FILE: logistic_regression_class/logistic_donut.py function sigmoid (line 55) | def sigmoid(z): function cross_entropy (line 62) | def cross_entropy(T, Y): FILE: logistic_regression_class/logistic_visualize.py function sigmoid (line 37) | def sigmoid(z): FILE: logistic_regression_class/logistic_xor.py function sigmoid (line 42) | def sigmoid(z): function cross_entropy (line 49) | def cross_entropy(T, Y): FILE: nlp_class/article_spinner.py function random_sample (line 58) | def random_sample(d): function test_spinner (line 68) | def test_spinner(): FILE: nlp_class/lsa.py function my_tokenizer (line 36) | def my_tokenizer(s): function tokens_to_vector (line 78) | def tokens_to_vector(tokens): function main (line 93) | def main(): FILE: nlp_class/sentiment.py function my_tokenizer (line 56) | def my_tokenizer(s): function tokens_to_vector (line 94) | def tokens_to_vector(tokens, label): FILE: nlp_class/spam2.py function visualize (line 61) | def visualize(label): FILE: nlp_class2/bow_classifier.py class GloveVectorizer (line 28) | class GloveVectorizer: method __init__ (line 29) | def __init__(self): method fit (line 53) | def fit(self, data): method transform (line 56) | def transform(self, data): method fit_transform (line 76) | def fit_transform(self, data): class Word2VecVectorizer (line 83) | class Word2VecVectorizer: method __init__ (line 84) | def __init__(self): method fit (line 92) | def fit(self, data): method transform (line 95) | def transform(self, data): method fit_transform (line 125) | def fit_transform(self, data): FILE: nlp_class2/glove.py class Glove (line 31) | class Glove: method __init__ (line 32) | def __init__(self, D, V, context_sz): method fit (line 37) | def fit(self, sentences, cc_matrix=None, learning_rate=1e-4, reg=0.1, ... method save (line 233) | def save(self, fn): function main (line 239) | def main(we_file, w2i_file, use_brown=True, n_files=100): FILE: nlp_class2/glove_svd.py class Glove (line 27) | class Glove: method __init__ (line 28) | def __init__(self, D, V, context_sz): method fit (line 33) | def fit(self, sentences, cc_matrix=None): method save (line 118) | def save(self, fn): function main (line 124) | def main(we_file, w2i_file, use_brown=True, n_files=100): FILE: nlp_class2/glove_tf.py class Glove (line 30) | class Glove: method __init__ (line 31) | def __init__(self, D, V, context_sz): method fit (line 36) | def fit(self, sentences, cc_matrix=None, learning_rate=1e-4, reg=0.1, ... method save (line 156) | def save(self, fn): function main (line 162) | def main(we_file, w2i_file, use_brown=True, n_files=50): FILE: nlp_class2/glove_theano.py function momentum_updates (line 27) | def momentum_updates(cost, params, lr=1e-4, mu=0.9): class Glove (line 41) | class Glove: method __init__ (line 42) | def __init__(self, D, V, context_sz): method fit (line 47) | def fit(self, sentences, cc_matrix=None, learning_rate=1e-4, reg=0.1, ... method save (line 175) | def save(self, fn): function main (line 181) | def main(we_file, w2i_file, use_brown=True, n_files=50): FILE: nlp_class2/logistic.py function softmax (line 56) | def softmax(a): function smoothed_loss (line 113) | def smoothed_loss(x, decay=0.99): FILE: nlp_class2/markov.py function get_bigram_probs (line 19) | def get_bigram_probs(sentences, V, start_idx, end_idx, smoothing=1): function get_score (line 75) | def get_score(sentence): function get_words (line 93) | def get_words(sentence): FILE: nlp_class2/ner_baseline.py function get_data (line 18) | def get_data(split_sequences=False): function main (line 108) | def main(): FILE: nlp_class2/ner_rnn.py function main (line 13) | def main(): FILE: nlp_class2/ner_tf.py function get_data (line 27) | def get_data(split_sequences=False): function flatten (line 73) | def flatten(l): FILE: nlp_class2/neural_network.py function softmax (line 58) | def softmax(a): function smoothed_loss (line 117) | def smoothed_loss(x, decay=0.99): FILE: nlp_class2/neural_network2.py function softmax (line 58) | def softmax(a): function smoothed_loss (line 140) | def smoothed_loss(x, decay=0.99): FILE: nlp_class2/pmi.py function remove_punctuation_2 (line 27) | def remove_punctuation_2(s): function remove_punctuation_3 (line 30) | def remove_punctuation_3(s): function analogy (line 273) | def analogy(pos1, neg1, pos2, neg2): FILE: nlp_class2/pos_baseline.py class LogisticRegression (line 24) | class LogisticRegression: method __init__ (line 25) | def __init__(self): method fit (line 28) | def fit(self, X, Y, V=None, K=None, D=50, lr=1e-1, mu=0.99, batch_sz=1... method score (line 89) | def score(self, X, Y): method f1_score (line 93) | def f1_score(self, X, Y): function get_data (line 98) | def get_data(split_sequences=False): function main (line 171) | def main(): FILE: nlp_class2/pos_hmm.py function accuracy (line 24) | def accuracy(T, Y): function total_f1_score (line 34) | def total_f1_score(T, Y): function main (line 45) | def main(smoothing=1e-1): FILE: nlp_class2/pos_ner_keras.py function get_data_pos (line 33) | def get_data_pos(split_sequences=False): function get_data_ner (line 94) | def get_data_ner(split_sequences=False): FILE: nlp_class2/pos_rnn.py class RNN (line 25) | class RNN: method __init__ (line 26) | def __init__(self, D, hidden_layer_sizes, V, K): method fit (line 32) | def fit(self, X, Y, learning_rate=1e-4, mu=0.99, epochs=30, show_fig=T... method score (line 134) | def score(self, X, Y): method f1_score (line 142) | def f1_score(self, X, Y): function flatten (line 152) | def flatten(l): function main (line 156) | def main(): FILE: nlp_class2/pos_tf.py function get_data (line 27) | def get_data(split_sequences=False): function flatten (line 101) | def flatten(l): FILE: nlp_class2/pretrained_glove.py function dist1 (line 20) | def dist1(a, b): function dist2 (line 22) | def dist2(a, b): function find_analogies (line 54) | def find_analogies(w1, w2, w3): function nearest_neighbors (line 76) | def nearest_neighbors(w, n=5): FILE: nlp_class2/pretrained_w2v.py function find_analogies (line 38) | def find_analogies(w1, w2, w3): function nearest_neighbors (line 42) | def nearest_neighbors(w): FILE: nlp_class2/recursive_tensorflow.py function get_labels (line 24) | def get_labels(tree): class TNN (line 32) | class TNN: method __init__ (line 33) | def __init__(self, V, D, K, activation): method fit (line 60) | def fit(self, trees, lr=1e-1, mu=0.9, reg=0.1, epochs=5): method get_cost (line 140) | def get_cost(self, logits, labels, reg): method get_output_recursive (line 153) | def get_output_recursive(self, tree, list_of_logits, is_root=True): method get_output (line 171) | def get_output(self, tree): method score (line 180) | def score(self, trees): function main (line 218) | def main(): FILE: nlp_class2/recursive_theano.py function adagrad (line 21) | def adagrad(cost, params, lr, eps=1e-10): class RecursiveNN (line 34) | class RecursiveNN: method __init__ (line 35) | def __init__(self, V, D, K): method fit (line 40) | def fit(self, trees, learning_rate=3*1e-3, mu=0.99, reg=1e-4, epochs=1... method score (line 181) | def score(self, trees, idx2word=None): function add_idx_to_tree (line 194) | def add_idx_to_tree(tree, current_idx): function tree2list (line 205) | def tree2list(tree, parent_idx, is_binary=False, is_left=False, is_right... function print_sentence (line 243) | def print_sentence(words, idx2word): function main (line 251) | def main(is_binary=True): FILE: nlp_class2/rntn_tensorflow.py function tensor_mul (line 21) | def tensor_mul(d, x1, A, x2): function get_labels (line 33) | def get_labels(tree): class RNTN (line 41) | class RNTN: method __init__ (line 42) | def __init__(self, V, D, K, activation): method fit (line 77) | def fit(self, trees, lr=1e-2, mu=0.9, reg=1e-1, epochs=5): method get_cost (line 153) | def get_cost(self, logits, labels, reg): method get_output_recursive (line 161) | def get_output_recursive(self, tree, list_of_logits, is_root=True): method get_output (line 186) | def get_output(self, tree): method score (line 195) | def score(self, trees): function main (line 237) | def main(): FILE: nlp_class2/rntn_tensorflow_rnn.py class RecursiveNN (line 25) | class RecursiveNN: method __init__ (line 26) | def __init__(self, V, D, K, activation=tf.tanh): method fit (line 32) | def fit(self, trees, test_trees, reg=1e-3, epochs=8, train_inner_nodes... method predict (line 225) | def predict(self, words, left, right, lab): method score (line 237) | def score(self, trees): method f1_score (line 245) | def f1_score(self, trees): function add_idx_to_tree (line 255) | def add_idx_to_tree(tree, current_idx): function tree2list (line 266) | def tree2list(tree, parent_idx, is_binary=False): function main (line 300) | def main(is_binary=True): FILE: nlp_class2/rntn_theano.py function adagrad (line 71) | def adagrad(cost, params, lr, eps=1e-10): class RecursiveNN (line 84) | class RecursiveNN: method __init__ (line 85) | def __init__(self, V, D, K, activation=T.tanh): method fit (line 91) | def fit(self, trees, test_trees, reg=1e-3, epochs=8, train_inner_nodes... method score (line 232) | def score(self, trees): method f1_score (line 240) | def f1_score(self, trees): function add_idx_to_tree (line 250) | def add_idx_to_tree(tree, current_idx): function tree2list (line 261) | def tree2list(tree, parent_idx, is_binary=False): function main (line 296) | def main(is_binary=True): FILE: nlp_class2/tfidf_tsne.py function main (line 29) | def main(): FILE: nlp_class2/util.py function init_weight (line 17) | def init_weight(Mi, Mo): function find_analogies (line 47) | def find_analogies(w1, w2, w3, We, word2idx, idx2word): class Tree (line 73) | class Tree: method __init__ (line 74) | def __init__(self, word, label): function display_tree (line 81) | def display_tree(t, lvl=0): function str2tree (line 96) | def str2tree(s, word2idx): function get_ptb_data (line 161) | def get_ptb_data(): FILE: nlp_class2/visualize_countries.py function main (line 15) | def main(we_file='glove_model_50.npz', w2i_file='glove_word2idx_50.json'): FILE: nlp_class2/word2vec.py function remove_punctuation_2 (line 33) | def remove_punctuation_2(s): function remove_punctuation_3 (line 36) | def remove_punctuation_3(s): function get_wiki (line 47) | def get_wiki(): function train_model (line 84) | def train_model(savedir): function get_negative_sampling_distribution (line 207) | def get_negative_sampling_distribution(sentences, vocab_size): function get_context (line 229) | def get_context(pos, sentence, window_size): function sgd (line 246) | def sgd(input_, targets, label, learning_rate, W, V): function load_model (line 266) | def load_model(savedir): function analogy (line 276) | def analogy(pos1, neg1, pos2, neg2, word2idx, idx2word, W): function test_model (line 314) | def test_model(word2idx, W, V): FILE: nlp_class2/word2vec_tf.py function remove_punctuation_2 (line 34) | def remove_punctuation_2(s): function remove_punctuation_3 (line 37) | def remove_punctuation_3(s): function download_text8 (line 46) | def download_text8(dst): function get_text8 (line 50) | def get_text8(): function get_wiki (line 69) | def get_wiki(): function train_model (line 106) | def train_model(savedir): function get_negative_sampling_distribution (line 322) | def get_negative_sampling_distribution(sentences): function get_context (line 350) | def get_context(pos, sentence, window_size): function load_model (line 368) | def load_model(savedir): function analogy (line 378) | def analogy(pos1, neg1, pos2, neg2, word2idx, idx2word, W): function test_model (line 414) | def test_model(word2idx, W, V): FILE: nlp_class2/word2vec_theano.py function remove_punctuation_2 (line 33) | def remove_punctuation_2(s): function remove_punctuation_3 (line 36) | def remove_punctuation_3(s): function get_wiki (line 46) | def get_wiki(): function train_model (line 83) | def train_model(savedir): function get_negative_sampling_distribution (line 277) | def get_negative_sampling_distribution(sentences, vocab_size): function get_context (line 299) | def get_context(pos, sentence, window_size): function load_model (line 317) | def load_model(savedir): function analogy (line 327) | def analogy(pos1, neg1, pos2, neg2, word2idx, idx2word, W): function test_model (line 365) | def test_model(word2idx, W, V): FILE: nlp_class3/attention.py function softmax_over_time (line 31) | def softmax_over_time(x): function one_step_attention (line 238) | def one_step_attention(h, st_1): function stack_and_transpose (line 311) | def stack_and_transpose(x): function custom_loss (line 333) | def custom_loss(y_true, y_pred): function acc (line 340) | def acc(y_true, y_pred): function decode_sequence (line 440) | def decode_sequence(input_seq): FILE: nlp_class3/bilstm_mnist.py function get_mnist (line 25) | def get_mnist(limit=None): FILE: nlp_class3/memory_network.py function tokenize (line 40) | def tokenize(sent): function get_stories (line 51) | def get_stories(f): function should_flatten (line 104) | def should_flatten(el): function flatten (line 107) | def flatten(l): function vectorize_stories (line 123) | def vectorize_stories(data, word2idx, story_maxlen, query_maxlen): function stack_inputs (line 142) | def stack_inputs(inputs, story_maxsents, story_maxlen): function get_data (line 159) | def get_data(challenge_type): function embed_and_sum (line 329) | def embed_and_sum(x, axis=2): function hop (line 350) | def hop(query, story): FILE: nlp_class3/poetry.py function sample_line (line 186) | def sample_line(): FILE: nlp_class3/simple_rnn_test.py function lstm1 (line 29) | def lstm1(): function lstm2 (line 41) | def lstm2(): function gru1 (line 54) | def gru1(): function gru2 (line 65) | def gru2(): FILE: nlp_class3/wseq2seq.py function custom_loss (line 226) | def custom_loss(y_true, y_pred): function acc (line 233) | def acc(y_true, y_pred): function decode_sequence (line 326) | def decode_sequence(input_seq): FILE: numpy_class/dot_for.py function slow_dot_product (line 10) | def slow_dot_product(a, b): FILE: numpy_class/exercises/ex2.py function sampleY (line 13) | def sampleY(n=1000): FILE: numpy_class/exercises/ex4.py function rotate1 (line 27) | def rotate1(im): function rotate2 (line 30) | def rotate2(im): FILE: numpy_class/exercises/ex5.py function is_symmetric1 (line 15) | def is_symmetric1(A): function is_symmetric2 (line 19) | def is_symmetric2(A): function check (line 32) | def check(A, b): FILE: numpy_class/exercises/ex7.py function get_donut (line 13) | def get_donut(): FILE: numpy_class/exercises/ex8.py function get_spiral (line 13) | def get_spiral(): FILE: numpy_class/python3/dot_for.py function slow_dot_product (line 17) | def slow_dot_product(a, b): FILE: pytorch/ann_regression.py function full_gd (line 39) | def full_gd(model, criterion, optimizer, X_train, y_train, epochs=1000): FILE: pytorch/rl_trader.py function get_data (line 19) | def get_data(): class ReplayBuffer (line 31) | class ReplayBuffer: method __init__ (line 32) | def __init__(self, obs_dim, act_dim, size): method store (line 40) | def store(self, obs, act, rew, next_obs, done): method sample_batch (line 49) | def sample_batch(self, batch_size=32): function get_scaler (line 61) | def get_scaler(env): function maybe_make_dir (line 80) | def maybe_make_dir(directory): class MLP (line 87) | class MLP(nn.Module): method __init__ (line 88) | def __init__(self, n_inputs, n_action, n_hidden_layers=1, hidden_dim=32): method forward (line 103) | def forward(self, X): method save_weights (line 106) | def save_weights(self, path): method load_weights (line 109) | def load_weights(self, path): function predict (line 114) | def predict(model, np_states): function train_one_step (line 123) | def train_one_step(model, criterion, optimizer, inputs, targets): class MultiStockEnv (line 141) | class MultiStockEnv: method __init__ (line 158) | def __init__(self, data, initial_investment=20000): method reset (line 191) | def reset(self): method step (line 199) | def step(self, action): method _get_obs (line 228) | def _get_obs(self): method _get_val (line 237) | def _get_val(self): method _trade (line 241) | def _trade(self, action): class DQNAgent (line 284) | class DQNAgent(object): method __init__ (line 285) | def __init__(self, state_size, action_size): method update_replay_memory (line 300) | def update_replay_memory(self, state, action, reward, next_state, done): method act (line 304) | def act(self, state): method replay (line 311) | def replay(self, batch_size=32): method load (line 345) | def load(self, name): method save (line 349) | def save(self, name): function play_one_episode (line 353) | def play_one_episode(agent, env, is_train): FILE: recommenders/autorec.py function custom_loss (line 57) | def custom_loss(y_true, y_pred): function generator (line 66) | def generator(A, M): function test_generator (line 80) | def test_generator(A, M, A_test, M_test): FILE: recommenders/itembased.py function predict (line 113) | def predict(i, u): function mse (line 162) | def mse(p, t): FILE: recommenders/mf.py function get_loss (line 55) | def get_loss(d): FILE: recommenders/mf2.py function get_loss (line 79) | def get_loss(m2u): FILE: recommenders/preprocess2dict.py function update_user2movie_and_movie2user (line 35) | def update_user2movie_and_movie2user(row): function update_usermovie2rating_test (line 60) | def update_usermovie2rating_test(row): FILE: recommenders/preprocess2sparse.py function update_train (line 30) | def update_train(row): function update_test (line 50) | def update_test(row): FILE: recommenders/rbm_tf_k.py function one_hot_encode (line 29) | def one_hot_encode(X, K): function one_hot_mask (line 40) | def one_hot_mask(X, K): function convert_probs_to_ratings (line 53) | def convert_probs_to_ratings(probs): function dot1 (line 67) | def dot1(V, W): function dot2 (line 73) | def dot2(H, W): class RBM (line 80) | class RBM(object): method __init__ (line 81) | def __init__(self, D, M, K): method build (line 88) | def build(self, D, M, K): method fit (line 140) | def fit(self, X, mask, X_test, mask_test, epochs=10, batch_sz=256, sho... method free_energy (line 207) | def free_energy(self, V): method forward_hidden (line 216) | def forward_hidden(self, X): method forward_logits (line 219) | def forward_logits(self, X): method forward_output (line 223) | def forward_output(self, X): method transform (line 226) | def transform(self, X): method get_visible (line 232) | def get_visible(self, X): function main (line 236) | def main(): FILE: recommenders/rbm_tf_k_faster.py function dot1 (line 21) | def dot1(V, W): function dot2 (line 27) | def dot2(H, W): class RBM (line 34) | class RBM(object): method __init__ (line 35) | def __init__(self, D, M, K): method build (line 42) | def build(self, D, M, K): method fit (line 117) | def fit(self, X, X_test, epochs=10, batch_sz=256, show_fig=True): method free_energy (line 173) | def free_energy(self, V): method forward_hidden (line 182) | def forward_hidden(self, X): method forward_logits (line 185) | def forward_logits(self, X): method forward_output (line 189) | def forward_output(self, X): method transform (line 192) | def transform(self, X): method get_visible (line 198) | def get_visible(self, X): method get_sse (line 201) | def get_sse(self, X, Xt): function main (line 211) | def main(): FILE: recommenders/tfidf.py function genres_and_keywords_to_string (line 15) | def genres_and_keywords_to_string(row): function recommend (line 42) | def recommend(title): FILE: recommenders/userbased.py function predict (line 111) | def predict(i, m): function mse (line 159) | def mse(p, t): FILE: rl/approx_control.py function epsilon_greedy (line 23) | def epsilon_greedy(model, s, eps=0.1): function one_hot (line 34) | def one_hot(k): function merge_state_action (line 38) | def merge_state_action(s, a): function gather_samples (line 43) | def gather_samples(grid, n_episodes=1000): class Model (line 57) | class Model: method __init__ (line 58) | def __init__(self, grid): method predict (line 69) | def predict(self, s, a): method predict_all_actions (line 74) | def predict_all_actions(self, s): method grad (line 77) | def grad(self, s, a): FILE: rl/approx_prediction.py function epsilon_greedy (line 20) | def epsilon_greedy(greedy, s, eps=0.1): function gather_samples (line 30) | def gather_samples(grid, n_episodes=10000): class Model (line 43) | class Model: method __init__ (line 44) | def __init__(self, grid): method predict (line 55) | def predict(self, s): method grad (line 59) | def grad(self, s): FILE: rl/bayesian_bandit.py class Bandit (line 20) | class Bandit: method __init__ (line 21) | def __init__(self, p): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function experiment (line 49) | def experiment(): FILE: rl/bayesian_normal.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, true_mean): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function run_experiment (line 49) | def run_experiment(): FILE: rl/bayesian_starter.py class Bandit (line 20) | class Bandit: method __init__ (line 21) | def __init__(self, p): method pull (line 27) | def pull(self): method sample (line 30) | def sample(self): method update (line 33) | def update(self, x): function plot (line 39) | def plot(bandits, trial): function experiment (line 49) | def experiment(): FILE: rl/cartpole.py function epsilon_greedy (line 18) | def epsilon_greedy(model, s, eps=0.1): function gather_samples (line 29) | def gather_samples(env, n_episodes=10000): class Model (line 44) | class Model: method __init__ (line 45) | def __init__(self, env): method predict (line 56) | def predict(self, s, a): method predict_all_actions (line 61) | def predict_all_actions(self, s): method grad (line 64) | def grad(self, s, a): function test_agent (line 70) | def test_agent(model, env, n_episodes=20): function watch_agent (line 85) | def watch_agent(model, env, eps): FILE: rl/cartpole_gym0.19.py function epsilon_greedy (line 18) | def epsilon_greedy(model, s, eps=0.1): function gather_samples (line 29) | def gather_samples(env, n_episodes=10000): class Model (line 43) | class Model: method __init__ (line 44) | def __init__(self, env): method predict (line 55) | def predict(self, s, a): method predict_all_actions (line 60) | def predict_all_actions(self, s): method grad (line 63) | def grad(self, s, a): function test_agent (line 69) | def test_agent(model, env, n_episodes=20): function watch_agent (line 83) | def watch_agent(model, env, eps): FILE: rl/comparing_epsilons.py class Bandit (line 12) | class Bandit: method __init__ (line 13) | def __init__(self, m): method pull (line 18) | def pull(self): method update (line 21) | def update(self, x): function run_experiment (line 26) | def run_experiment(m1, m2, m3, eps, N): FILE: rl/comparing_explore_exploit_methods.py class BayesianBandit (line 14) | class BayesianBandit: method __init__ (line 15) | def __init__(self, true_mean): method pull (line 23) | def pull(self): method sample (line 26) | def sample(self): method update (line 29) | def update(self, x): function run_experiment_decaying_epsilon (line 35) | def run_experiment_decaying_epsilon(m1, m2, m3, N): function run_experiment (line 68) | def run_experiment(m1, m2, m3, N): FILE: rl/epsilon_greedy.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: rl/epsilon_greedy_starter.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: rl/grid_world.py class Grid (line 14) | class Grid: # Environment method __init__ (line 15) | def __init__(self, rows, cols, start): method set (line 21) | def set(self, rewards, actions): method set_state (line 27) | def set_state(self, s): method current_state (line 31) | def current_state(self): method is_terminal (line 34) | def is_terminal(self, s): method reset (line 37) | def reset(self): method get_next_state (line 43) | def get_next_state(self, s, a): method move (line 59) | def move(self, action): method undo_move (line 73) | def undo_move(self, action): method game_over (line 87) | def game_over(self): method all_states (line 92) | def all_states(self): function standard_grid (line 99) | def standard_grid(): function negative_grid (line 126) | def negative_grid(step_cost=-0.1): class WindyGrid (line 147) | class WindyGrid: method __init__ (line 148) | def __init__(self, rows, cols, start): method set (line 154) | def set(self, rewards, actions, probs): method set_state (line 161) | def set_state(self, s): method current_state (line 165) | def current_state(self): method is_terminal (line 168) | def is_terminal(self, s): method move (line 171) | def move(self, action): method game_over (line 187) | def game_over(self): method all_states (line 192) | def all_states(self): function windy_grid (line 199) | def windy_grid(): function windy_grid_no_wind (line 258) | def windy_grid_no_wind(): function windy_grid_penalized (line 265) | def windy_grid_penalized(step_cost=-0.1): function grid_5x5 (line 337) | def grid_5x5(step_cost=-0.1): FILE: rl/iterative_policy_evaluation_deterministic.py function print_values (line 15) | def print_values(V, g): function print_policy (line 27) | def print_policy(P, g): FILE: rl/iterative_policy_evaluation_probabilistic.py function print_values (line 15) | def print_values(V, g): function print_policy (line 27) | def print_policy(P, g): FILE: rl/linear_rl_trader.py function get_data (line 16) | def get_data(): function get_scaler (line 29) | def get_scaler(env): function maybe_make_dir (line 48) | def maybe_make_dir(directory): class LinearModel (line 54) | class LinearModel: method __init__ (line 56) | def __init__(self, input_dim, n_action): method predict (line 66) | def predict(self, X): method sgd (line 71) | def sgd(self, X, Y, learning_rate=0.01, momentum=0.9): method load_weights (line 99) | def load_weights(self, filepath): method save_weights (line 104) | def save_weights(self, filepath): class MultiStockEnv (line 110) | class MultiStockEnv: method __init__ (line 127) | def __init__(self, data, initial_investment=20000): method reset (line 160) | def reset(self): method step (line 168) | def step(self, action): method _get_obs (line 197) | def _get_obs(self): method _get_val (line 206) | def _get_val(self): method _trade (line 210) | def _trade(self, action): class DQNAgent (line 253) | class DQNAgent(object): method __init__ (line 254) | def __init__(self, state_size, action_size): method act (line 263) | def act(self, state): method train (line 270) | def train(self, state, action, reward, next_state, done): method load (line 286) | def load(self, name): method save (line 290) | def save(self, name): function play_one_episode (line 294) | def play_one_episode(agent, env, is_train): FILE: rl/monte_carlo.py function play_game (line 17) | def play_game(grid, policy, max_steps=20): FILE: rl/monte_carlo_es.py function play_game (line 21) | def play_game(grid, policy, max_steps=20): function max_dict (line 58) | def max_dict(d): FILE: rl/monte_carlo_no_es.py function epsilon_greedy (line 20) | def epsilon_greedy(policy, s, eps=0.1): function play_game (line 28) | def play_game(grid, policy, max_steps=20): function max_dict (line 61) | def max_dict(d): FILE: rl/optimistic.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: rl/optimistic_initial_values.py class Bandit (line 13) | class Bandit: method __init__ (line 14) | def __init__(self, m, upper_limit): method pull (line 19) | def pull(self): method update (line 22) | def update(self, x): function run_experiment (line 27) | def run_experiment(m1, m2, m3, N, upper_limit=10): FILE: rl/optimistic_starter.py class Bandit (line 19) | class Bandit: method __init__ (line 20) | def __init__(self, p): method pull (line 26) | def pull(self): method update (line 30) | def update(self, x): function experiment (line 35) | def experiment(): FILE: rl/policy_iteration_deterministic.py function get_transition_probs_and_rewards (line 18) | def get_transition_probs_and_rewards(grid): function evaluate_deterministic_policy (line 44) | def evaluate_deterministic_policy(grid, policy, initV=None): FILE: rl/policy_iteration_probabilistic.py function get_transition_probs_and_rewards (line 18) | def get_transition_probs_and_rewards(grid): function evaluate_deterministic_policy (line 39) | def evaluate_deterministic_policy(grid, policy, initV=None): FILE: rl/q_learning.py function epsilon_greedy (line 20) | def epsilon_greedy(Q, s, eps=0.1): FILE: rl/sarsa.py function epsilon_greedy (line 20) | def epsilon_greedy(Q, s, eps=0.1): FILE: rl/td0_prediction.py function epsilon_greedy (line 20) | def epsilon_greedy(policy, s, eps=0.1): FILE: rl/tic_tac_toe.py class Agent (line 31) | class Agent: method __init__ (line 32) | def __init__(self, eps=0.1, alpha=0.5): method setV (line 38) | def setV(self, V): method set_symbol (line 41) | def set_symbol(self, sym): method set_verbose (line 44) | def set_verbose(self, v): method reset_history (line 48) | def reset_history(self): method take_action (line 51) | def take_action(self, env): method update_state_history (line 110) | def update_state_history(self, s): method update (line 117) | def update(self, env): class Environment (line 135) | class Environment: method __init__ (line 136) | def __init__(self): method is_empty (line 144) | def is_empty(self, i, j): method reward (line 147) | def reward(self, sym): method get_state (line 156) | def get_state(self): method game_over (line 176) | def game_over(self, force_recalculate=False): method is_draw (line 223) | def is_draw(self): method draw_board (line 234) | def draw_board(self): class Human (line 250) | class Human: method __init__ (line 251) | def __init__(self): method set_symbol (line 254) | def set_symbol(self, sym): method take_action (line 257) | def take_action(self, env): method update (line 268) | def update(self, env): method update_state_history (line 271) | def update_state_history(self, s): function get_state_hash_and_winner (line 280) | def get_state_hash_and_winner(env, i=0, j=0): function initialV_x (line 339) | def initialV_x(env, state_winner_triples): function initialV_o (line 357) | def initialV_o(env, state_winner_triples): function play_game (line 374) | def play_game(p1, p2, env, draw=False): FILE: rl/ucb1.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, p): method pull (line 25) | def pull(self): method update (line 29) | def update(self, x): function ucb (line 34) | def ucb(mean, n, nj): function run_experiment (line 38) | def run_experiment(): FILE: rl/ucb1_starter.py class Bandit (line 18) | class Bandit: method __init__ (line 19) | def __init__(self, p): method pull (line 25) | def pull(self): method update (line 29) | def update(self, x): function ucb (line 34) | def ucb(mean, n, nj): function run_experiment (line 38) | def run_experiment(): FILE: rl/value_iteration.py function get_transition_probs_and_rewards (line 17) | def get_transition_probs_and_rewards(grid): FILE: rl2/a3c/main.py function Env (line 29) | def Env(): function smooth (line 41) | def smooth(x): FILE: rl2/a3c/nets.py function build_feature_extractor (line 4) | def build_feature_extractor(input_): class PolicyNetwork (line 38) | class PolicyNetwork: method __init__ (line 39) | def __init__(self, num_outputs, reg=0.01): class ValueNetwork (line 84) | class ValueNetwork: method __init__ (line 85) | def __init__(self): function create_networks (line 119) | def create_networks(num_outputs): FILE: rl2/a3c/thread_example.py class Worker (line 8) | class Worker: method __init__ (line 9) | def __init__(self, id_, global_counter): method run (line 14) | def run(self): FILE: rl2/a3c/worker.py class Step (line 10) | class Step: method __init__ (line 11) | def __init__(self, state, action, reward, next_state, done): class ImageTransformer (line 23) | class ImageTransformer: method __init__ (line 24) | def __init__(self): method transform (line 35) | def transform(self, state, sess=None): function repeat_frame (line 41) | def repeat_frame(frame): function shift_frames (line 48) | def shift_frames(state, next_frame): function get_copy_params_op (line 53) | def get_copy_params_op(src_vars, dst_vars): function make_train_op (line 65) | def make_train_op(local_net, global_net): class Worker (line 104) | class Worker: method __init__ (line 105) | def __init__( method run (line 147) | def run(self, sess, coord, t_max): method sample_action (line 171) | def sample_action(self, state, sess): method get_value_prediction (line 178) | def get_value_prediction(self, state, sess): method run_n_steps (line 185) | def run_n_steps(self, n, sess): method update (line 219) | def update(self, steps, sess): FILE: rl2/atari/dqn_tf.py class ImageTransformer (line 45) | class ImageTransformer: method __init__ (line 46) | def __init__(self): method transform (line 57) | def transform(self, state, sess=None): function update_state (line 62) | def update_state(state, obs_small): class ReplayMemory (line 67) | class ReplayMemory: method __init__ (line 68) | def __init__(self, size=MAX_EXPERIENCES, frame_height=IM_SIZE, frame_w... method add_experience (line 99) | def add_experience(self, action, frame, reward, terminal): method _get_state (line 116) | def _get_state(self, index): method _get_valid_indices (line 123) | def _get_valid_indices(self): method get_minibatch (line 136) | def get_minibatch(self): class DQN (line 156) | class DQN: method __init__ (line 157) | def __init__(self, K, conv_layer_sizes, hidden_layer_sizes, scope): method copy_from (line 212) | def copy_from(self, other): method save (line 225) | def save(self): method load (line 231) | def load(self): method set_session (line 240) | def set_session(self, session): method predict (line 243) | def predict(self, states): method update (line 246) | def update(self, states, actions, targets): method sample_action (line 257) | def sample_action(self, x, eps): function learn (line 264) | def learn(model, target_model, experience_replay_buffer, gamma, batch_si... function play_one (line 278) | def play_one( function smooth (line 344) | def smooth(x): FILE: rl2/atari/dqn_theano.py function rgb2gray (line 37) | def rgb2gray(rgb): function downsample_image (line 44) | def downsample_image(A): function update_state (line 56) | def update_state(state, obs): class ReplayMemory (line 61) | class ReplayMemory: method __init__ (line 62) | def __init__(self, size=MAX_EXPERIENCES, frame_height=IM_SIZE, frame_w... method add_experience (line 93) | def add_experience(self, action, frame, reward, terminal): method _get_state (line 110) | def _get_state(self, index): method _get_valid_indices (line 117) | def _get_valid_indices(self): method get_minibatch (line 130) | def get_minibatch(self): function init_filter (line 150) | def init_filter(shape): function adam (line 155) | def adam(cost, params, lr0=1e-5, beta1=0.9, beta2=0.999, eps=1e-8): class ConvLayer (line 182) | class ConvLayer(object): method __init__ (line 183) | def __init__(self, mi, mo, filtsz=5, stride=2, f=T.nnet.relu): method forward (line 196) | def forward(self, X): class HiddenLayer (line 211) | class HiddenLayer: method __init__ (line 212) | def __init__(self, M1, M2, f=T.nnet.relu): method forward (line 219) | def forward(self, X): class DQN (line 223) | class DQN: method __init__ (line 224) | def __init__(self, K, conv_layer_sizes, hidden_layer_sizes): method copy_from (line 302) | def copy_from(self, other): method predict (line 309) | def predict(self, X): method update (line 312) | def update(self, states, actions, targets): method sample_action (line 315) | def sample_action(self, x, eps): function learn (line 324) | def learn(model, target_model, experience_replay_buffer, gamma, batch_si... function play_one (line 338) | def play_one( function smooth (line 399) | def smooth(x): FILE: rl2/cartpole/dqn_tf.py class HiddenLayer (line 31) | class HiddenLayer: method __init__ (line 32) | def __init__(self, M1, M2, f=tf.nn.tanh, use_bias=True): method forward (line 41) | def forward(self, X): class DQN (line 49) | class DQN: method __init__ (line 50) | def __init__(self, D, K, hidden_layer_sizes, gamma, max_experiences=10... method set_session (line 100) | def set_session(self, session): method copy_from (line 103) | def copy_from(self, other): method predict (line 115) | def predict(self, X): method train (line 119) | def train(self, target_network): method add_experience (line 146) | def add_experience(self, s, a, r, s2, done): method sample_action (line 159) | def sample_action(self, x, eps): function play_one (line 167) | def play_one(env, model, tmodel, eps, gamma, copy_period): function main (line 197) | def main(): FILE: rl2/cartpole/dqn_theano.py function adam (line 30) | def adam(cost, params, lr0=1e-2, beta1=0.9, beta2=0.999, eps=1e-8): class HiddenLayer (line 50) | class HiddenLayer: method __init__ (line 51) | def __init__(self, M1, M2, f=T.tanh, use_bias=True): method forward (line 60) | def forward(self, X): class DQN (line 68) | class DQN: method __init__ (line 69) | def __init__(self, D, K, hidden_layer_sizes, gamma, max_experiences=10... method copy_from (line 128) | def copy_from(self, other): method predict (line 135) | def predict(self, X): method train (line 139) | def train(self, target_network): method add_experience (line 159) | def add_experience(self, s, a, r, s2, done): method sample_action (line 172) | def sample_action(self, x, eps): function play_one (line 180) | def play_one(env, model, tmodel, eps, gamma, copy_period): function main (line 210) | def main(): FILE: rl2/cartpole/pg_tf.py class HiddenLayer (line 28) | class HiddenLayer: method __init__ (line 29) | def __init__(self, M1, M2, f=tf.nn.tanh, use_bias=True): method forward (line 36) | def forward(self, X): class PolicyModel (line 45) | class PolicyModel: method __init__ (line 46) | def __init__(self, D, K, hidden_layer_sizes): method set_session (line 93) | def set_session(self, session): method partial_fit (line 96) | def partial_fit(self, X, actions, advantages): method predict (line 109) | def predict(self, X): method sample_action (line 113) | def sample_action(self, X): class ValueModel (line 119) | class ValueModel: method __init__ (line 120) | def __init__(self, D, hidden_layer_sizes): method set_session (line 149) | def set_session(self, session): method partial_fit (line 152) | def partial_fit(self, X, Y): method predict (line 157) | def predict(self, X): function play_one_td (line 162) | def play_one_td(env, pmodel, vmodel, gamma): function play_one_mc (line 193) | def play_one_mc(env, pmodel, vmodel, gamma): function main (line 246) | def main(): FILE: rl2/cartpole/pg_theano.py class HiddenLayer (line 26) | class HiddenLayer: method __init__ (line 27) | def __init__(self, M1, M2, f=T.tanh, use_bias=True): method forward (line 36) | def forward(self, X): class PolicyModel (line 45) | class PolicyModel: method __init__ (line 46) | def __init__(self, D, K, hidden_layer_sizes): method partial_fit (line 99) | def partial_fit(self, X, actions, advantages): method predict (line 105) | def predict(self, X): method sample_action (line 109) | def sample_action(self, X): class ValueModel (line 117) | class ValueModel: method __init__ (line 118) | def __init__(self, D, hidden_layer_sizes): method partial_fit (line 166) | def partial_fit(self, X, Y): method predict (line 171) | def predict(self, X): function play_one_td (line 176) | def play_one_td(env, pmodel, vmodel, gamma): function play_one_mc (line 206) | def play_one_mc(env, pmodel, vmodel, gamma): function main (line 259) | def main(): FILE: rl2/cartpole/q_learning.py class SGDRegressor (line 28) | class SGDRegressor: method __init__ (line 29) | def __init__(self, D): method partial_fit (line 33) | def partial_fit(self, X, Y): method predict (line 36) | def predict(self, X): class FeatureTransformer (line 41) | class FeatureTransformer: method __init__ (line 42) | def __init__(self, env): method transform (line 63) | def transform(self, observations): class Model (line 69) | class Model: method __init__ (line 70) | def __init__(self, env, feature_transformer): method predict (line 78) | def predict(self, s): method update (line 83) | def update(self, s, a, G): method sample_action (line 87) | def sample_action(self, s, eps): function play_one (line 94) | def play_one(env, model, eps, gamma): function main (line 123) | def main(): FILE: rl2/cartpole/q_learning_bins.py function build_state (line 26) | def build_state(features): function to_bin (line 29) | def to_bin(value, bins): class FeatureTransformer (line 33) | class FeatureTransformer: method __init__ (line 34) | def __init__(self): method transform (line 44) | def transform(self, observation): class Model (line 55) | class Model: method __init__ (line 56) | def __init__(self, env, feature_transformer): method predict (line 64) | def predict(self, s): method update (line 68) | def update(self, s, a, G): method sample_action (line 72) | def sample_action(self, s, eps): function play_one (line 80) | def play_one(model, eps, gamma): function plot_running_avg (line 104) | def plot_running_avg(totalrewards): FILE: rl2/cartpole/random_search.py function get_action (line 17) | def get_action(s, w): function play_one_episode (line 21) | def play_one_episode(env, params): function play_multiple_episodes (line 37) | def play_multiple_episodes(env, T, params): function random_search (line 48) | def random_search(env): FILE: rl2/cartpole/save_a_video.py function get_action (line 19) | def get_action(s, w): function play_one_episode (line 23) | def play_one_episode(env, params): function play_multiple_episodes (line 38) | def play_multiple_episodes(env, T, params): function random_search (line 49) | def random_search(env): FILE: rl2/cartpole/td_lambda.py class SGDRegressor (line 24) | class SGDRegressor: method __init__ (line 25) | def __init__(self, D): method partial_fit (line 28) | def partial_fit(self, x, y, e, lr=1e-1): method predict (line 31) | def predict(self, X): class Model (line 37) | class Model: method __init__ (line 38) | def __init__(self, env, feature_transformer): method reset (line 54) | def reset(self): method predict (line 57) | def predict(self, s): method update (line 62) | def update(self, s, a, G, gamma, lambda_): method sample_action (line 77) | def sample_action(self, s, eps): function play_one (line 85) | def play_one(model, env, eps, gamma, lambda_): FILE: rl2/cartpole/tf_warmup.py class SGDRegressor (line 14) | class SGDRegressor: method __init__ (line 15) | def __init__(self, D): method partial_fit (line 40) | def partial_fit(self, X, Y): method predict (line 43) | def predict(self, X): FILE: rl2/cartpole/theano_warmup.py class SGDRegressor (line 12) | class SGDRegressor: method __init__ (line 13) | def __init__(self, D): method partial_fit (line 36) | def partial_fit(self, X, Y): method predict (line 39) | def predict(self, X): FILE: rl2/mountaincar/n_step.py class SGDRegressor (line 28) | class SGDRegressor: method __init__ (line 29) | def __init__(self, **kwargs): method partial_fit (line 33) | def partial_fit(self, X, Y): method predict (line 39) | def predict(self, X): function play_one (line 56) | def play_one(model, eps, gamma, n=5): FILE: rl2/mountaincar/pg_tf.py class HiddenLayer (line 27) | class HiddenLayer: method __init__ (line 28) | def __init__(self, M1, M2, f=tf.nn.tanh, use_bias=True, zeros=False): method forward (line 41) | def forward(self, X): class PolicyModel (line 50) | class PolicyModel: method __init__ (line 51) | def __init__(self, D, ft, hidden_layer_sizes=[]): method set_session (line 93) | def set_session(self, session): method partial_fit (line 96) | def partial_fit(self, X, actions, advantages): method predict (line 111) | def predict(self, X): method sample_action (line 116) | def sample_action(self, X): class ValueModel (line 122) | class ValueModel: method __init__ (line 123) | def __init__(self, D, ft, hidden_layer_sizes=[]): method set_session (line 154) | def set_session(self, session): method partial_fit (line 157) | def partial_fit(self, X, Y): method predict (line 165) | def predict(self, X): function play_one_td (line 171) | def play_one_td(env, pmodel, vmodel, gamma): function main (line 202) | def main(): FILE: rl2/mountaincar/pg_tf_random.py class HiddenLayer (line 27) | class HiddenLayer: method __init__ (line 28) | def __init__(self, M1, M2, f=tf.nn.tanh, use_bias=True, zeros=False): method forward (line 43) | def forward(self, X): class PolicyModel (line 52) | class PolicyModel: method __init__ (line 53) | def __init__(self, ft, D, hidden_layer_sizes_mean=[], hidden_layer_siz... method set_session (line 111) | def set_session(self, session): method init_vars (line 114) | def init_vars(self): method predict (line 133) | def predict(self, X): method sample_action (line 139) | def sample_action(self, X): method copy (line 144) | def copy(self): method copy_from (line 151) | def copy_from(self, other): method perturb_params (line 163) | def perturb_params(self): function play_one (line 178) | def play_one(env, pmodel, gamma): function play_multiple_episodes (line 197) | def play_multiple_episodes(env, T, pmodel, gamma, print_iters=False): function random_search (line 211) | def random_search(env, pmodel, gamma): function main (line 235) | def main(): FILE: rl2/mountaincar/pg_theano.py function adam (line 23) | def adam(cost, params, lr0=1e-3, beta1=0.9, beta2=0.999, eps=1e-8): class HiddenLayer (line 43) | class HiddenLayer: method __init__ (line 44) | def __init__(self, M1, M2, f=T.nnet.relu, use_bias=True, zeros=False): method forward (line 57) | def forward(self, X): class PolicyModel (line 66) | class PolicyModel: method __init__ (line 67) | def __init__(self, D, ft, hidden_layer_sizes=[]): method partial_fit (line 131) | def partial_fit(self, X, actions, advantages): method predict (line 138) | def predict(self, X): method sample_action (line 143) | def sample_action(self, X): class ValueModel (line 152) | class ValueModel: method __init__ (line 153) | def __init__(self, D, ft, hidden_layer_sizes=[]): method partial_fit (line 199) | def partial_fit(self, X, Y): method predict (line 205) | def predict(self, X): function play_one_td (line 211) | def play_one_td(env, pmodel, vmodel, gamma): function main (line 242) | def main(): FILE: rl2/mountaincar/pg_theano_random.py class HiddenLayer (line 26) | class HiddenLayer: method __init__ (line 27) | def __init__(self, M1, M2, f=T.nnet.relu, use_bias=True, zeros=False): method forward (line 40) | def forward(self, X): class PolicyModel (line 49) | class PolicyModel: method __init__ (line 50) | def __init__(self, ft, D, hidden_layer_sizes_mean=[], hidden_layer_siz... method predict (line 111) | def predict(self, X): method sample_action (line 116) | def sample_action(self, X): method copy (line 123) | def copy(self): method copy_from (line 128) | def copy_from(self, other): method perturb_params (line 134) | def perturb_params(self): function play_one (line 145) | def play_one(env, pmodel, gamma): function play_multiple_episodes (line 164) | def play_multiple_episodes(env, T, pmodel, gamma, print_iters=False): function random_search (line 178) | def random_search(env, pmodel, gamma): function main (line 202) | def main(): FILE: rl2/mountaincar/q_learning.py class FeatureTransformer (line 38) | class FeatureTransformer: method __init__ (line 39) | def __init__(self, env, n_components=500): method transform (line 58) | def transform(self, observations): class Model (line 66) | class Model: method __init__ (line 67) | def __init__(self, env, feature_transformer, learning_rate): method predict (line 76) | def predict(self, s): method update (line 82) | def update(self, s, a, G): method sample_action (line 87) | def sample_action(self, s, eps): function play_one (line 101) | def play_one(model, env, eps, gamma): function plot_cost_to_go (line 127) | def plot_cost_to_go(env, estimator, num_tiles=20): function plot_running_avg (line 147) | def plot_running_avg(totalrewards): function main (line 157) | def main(show_plots=True): FILE: rl2/mountaincar/td_lambda.py class BaseModel (line 31) | class BaseModel: method __init__ (line 32) | def __init__(self, D): method partial_fit (line 35) | def partial_fit(self, input_, target, eligibility, lr=1e-2): method predict (line 38) | def predict(self, X): class Model (line 44) | class Model: method __init__ (line 45) | def __init__(self, env, feature_transformer): method predict (line 56) | def predict(self, s): method update (line 63) | def update(self, s, a, G, gamma, lambda_): method sample_action (line 70) | def sample_action(self, s, eps): function play_one (line 78) | def play_one(model, env, eps, gamma, lambda_): FILE: rl3/a2c/a2c.py function set_global_seeds (line 12) | def set_global_seeds(i): function cat_entropy (line 17) | def cat_entropy(logits): function find_trainable_variables (line 25) | def find_trainable_variables(key): function discount_with_dones (line 30) | def discount_with_dones(rewards, dones, gamma): class Agent (line 40) | class Agent: method __init__ (line 41) | def __init__(self, Network, ob_space, ac_space, nenvs, nsteps, nstack, class Runner (line 102) | class Runner: method __init__ (line 103) | def __init__(self, env, agent, nsteps=5, nstack=4, gamma=0.99): method update_state (line 119) | def update_state(self, obs): method run (line 124) | def run(self): function learn (line 168) | def learn(network, env, seed, new_session=True, nsteps=5, nstack=4, tot... FILE: rl3/a2c/atari_wrappers.py class NoopResetEnv (line 9) | class NoopResetEnv(gym.Wrapper): method __init__ (line 10) | def __init__(self, env, noop_max=30): method reset (line 20) | def reset(self, **kwargs): method step (line 35) | def step(self, ac): class FireResetEnv (line 39) | class FireResetEnv(gym.Wrapper): method __init__ (line 40) | def __init__(self, env): method reset (line 46) | def reset(self, **kwargs): method step (line 56) | def step(self, ac): class EpisodicLifeEnv (line 60) | class EpisodicLifeEnv(gym.Wrapper): method __init__ (line 61) | def __init__(self, env): method step (line 69) | def step(self, action): method reset (line 83) | def reset(self, **kwargs): class MaxAndSkipEnv (line 97) | class MaxAndSkipEnv(gym.Wrapper): method __init__ (line 98) | def __init__(self, env, skip=4): method step (line 105) | def step(self, action): method reset (line 124) | def reset(self, **kwargs): class ClipRewardEnv (line 128) | class ClipRewardEnv(gym.RewardWrapper): method reward (line 129) | def reward(self, reward): class WarpFrame (line 146) | class WarpFrame(gym.ObservationWrapper): method __init__ (line 147) | def __init__(self, env, width=84, height=84, grayscale=True): method observation (line 160) | def observation(self, frame): class FrameStack (line 169) | class FrameStack(gym.Wrapper): method __init__ (line 170) | def __init__(self, env, k): method reset (line 185) | def reset(self): method step (line 191) | def step(self, action): method _get_ob (line 196) | def _get_ob(self): class LazyFrames (line 201) | class LazyFrames: method __init__ (line 202) | def __init__(self, frames): method __array__ (line 212) | def __array__(self, dtype=None): function make_atari (line 219) | def make_atari(env_id): function wrap_deepmind (line 227) | def wrap_deepmind(env, episode_life=True, clip_rewards=True, frame_stack... class Monitor (line 246) | class Monitor(gym.Wrapper): method __init__ (line 247) | def __init__(self, env, rank=0): method reset (line 261) | def reset(self): method step (line 274) | def step(self, action): FILE: rl3/a2c/main.py function get_args (line 24) | def get_args(): function train (line 33) | def train(env_id, num_timesteps, num_cpu): function main (line 52) | def main(): FILE: rl3/a2c/neural_network.py function sample (line 6) | def sample(logits): function conv (line 11) | def conv(inputs, nf, ks, strides, gain=1.0): function dense (line 17) | def dense(inputs, n, act=tf.nn.relu, gain=1.0): class CNN (line 22) | class CNN: method __init__ (line 24) | def __init__(self, sess, ob_space, ac_space, nenv, nsteps, nstack, reu... FILE: rl3/a2c/play.py function get_args (line 12) | def get_args(): function get_agent (line 19) | def get_agent(env, nsteps=5, nstack=1, total_timesteps=int(80e6), function main (line 30) | def main(): FILE: rl3/a2c/subproc_vec_env.py function worker (line 6) | def worker(remote, parent_remote, env_fn_wrapper): class CloudpickleWrapper (line 33) | class CloudpickleWrapper(): method __init__ (line 38) | def __init__(self, x): method __getstate__ (line 41) | def __getstate__(self): method __setstate__ (line 45) | def __setstate__(self, ob): class SubprocVecEnv (line 50) | class SubprocVecEnv(): method __init__ (line 51) | def __init__(self, env_fns): method step (line 72) | def step(self, actions): method reset (line 84) | def reset(self): method reset_task (line 89) | def reset_task(self): method close (line 94) | def close(self): method num_envs (line 105) | def num_envs(self): FILE: rl3/ddpg.py function ANN (line 25) | def ANN(x, layer_sizes, hidden_activation=tf.nn.relu, output_activation=... function get_vars (line 32) | def get_vars(scope): function CreateNetworks (line 38) | def CreateNetworks( class ReplayBuffer (line 59) | class ReplayBuffer: method __init__ (line 60) | def __init__(self, obs_dim, act_dim, size): method store (line 68) | def store(self, obs, act, rew, next_obs, done): method sample_batch (line 77) | def sample_batch(self, batch_size=32): function ddpg (line 87) | def ddpg( function smooth (line 299) | def smooth(x): FILE: rl3/es_flappy.py class Env (line 25) | class Env: method __init__ (line 26) | def __init__(self): method step (line 36) | def step(self, action): method reset (line 44) | def reset(self): method get_observation (line 48) | def get_observation(self): method set_display (line 55) | def set_display(self, boolean_value): function softmax (line 70) | def softmax(a): function relu (line 75) | def relu(x): class ANN (line 78) | class ANN: method __init__ (line 79) | def __init__(self, D, M, K, f=relu): method init (line 85) | def init(self): method forward (line 94) | def forward(self, X): method sample_action (line 98) | def sample_action(self, x): method get_params (line 107) | def get_params(self): method get_params_dict (line 111) | def get_params_dict(self): method set_params (line 119) | def set_params(self, params): function evolution_strategy (line 129) | def evolution_strategy( function reward_function (line 178) | def reward_function(params): FILE: rl3/es_mnist.py function softmax (line 40) | def softmax(a): function relu (line 46) | def relu(x): function log_likelihood (line 50) | def log_likelihood(Y, P): class ANN (line 56) | class ANN: method __init__ (line 57) | def __init__(self, D, M, K): method init (line 62) | def init(self): method forward (line 69) | def forward(self, X): method score (line 73) | def score(self, X, Y): method get_params (line 77) | def get_params(self): method set_params (line 81) | def set_params(self, params): function evolution_strategy (line 91) | def evolution_strategy( function reward_function (line 129) | def reward_function(params): FILE: rl3/es_mujoco.py function relu (line 37) | def relu(x): class ANN (line 43) | class ANN: method __init__ (line 44) | def __init__(self, D, M, K, f=relu): method init (line 50) | def init(self): method forward (line 59) | def forward(self, X): method sample_action (line 63) | def sample_action(self, x): method get_params (line 70) | def get_params(self): method get_params_dict (line 74) | def get_params_dict(self): method set_params (line 82) | def set_params(self, params): function evolution_strategy (line 92) | def evolution_strategy( function reward_function (line 141) | def reward_function(params, display=False): FILE: rl3/es_simple.py function evolution_strategy (line 6) | def evolution_strategy( function reward_function (line 36) | def reward_function(params): FILE: rl3/flappy2envs.py class Env (line 19) | class Env: method __init__ (line 20) | def __init__(self): method step (line 30) | def step(self, action): method reset (line 38) | def reset(self): method get_observation (line 42) | def get_observation(self): method set_display (line 49) | def set_display(self, boolean_value): function softmax (line 64) | def softmax(a): function relu (line 69) | def relu(x): class ANN (line 72) | class ANN: method __init__ (line 73) | def __init__(self, D, M, K, f=relu): method init (line 79) | def init(self): method forward (line 88) | def forward(self, X): method sample_action (line 92) | def sample_action(self, x): method score (line 101) | def score(self, X, Y): method get_params (line 105) | def get_params(self): method get_params_dict (line 109) | def get_params_dict(self): method set_params (line 117) | def set_params(self, params): function reward_function (line 133) | def reward_function(params, env): FILE: rl3/gym_review.py function get_action (line 12) | def get_action(s, w): function play_one_episode (line 16) | def play_one_episode(env, params): function play_multiple_episodes (line 31) | def play_multiple_episodes(env, T, params): function random_search (line 42) | def random_search(env): FILE: rl3/plot_ddpg_result.py function smooth (line 6) | def smooth(x): FILE: rl3/plot_es_flappy_results.py function smooth (line 5) | def smooth(x): FILE: rl3/plot_es_mujoco_results.py function smooth (line 5) | def smooth(x): FILE: rl3v2/visualize_es.py function f (line 5) | def f(x, y): function evolution_strategies (line 10) | def evolution_strategies( function visualize_es (line 33) | def visualize_es(history, bounds, f, resolution=100): FILE: rl3v2/visualize_hill_climbing.py function f (line 5) | def f(x, y): function hill_climb (line 10) | def hill_climb( function visualize_es (line 35) | def visualize_es(history, bounds, f, resolution=100): FILE: rnn_class/batch_gru.py class GRU (line 16) | class GRU: method __init__ (line 17) | def __init__(self, Mi, Mo, activation): method get_ht (line 47) | def get_ht(self, xWxr_t, xWxz_t, xWxh_t, h_t1): method recurrence (line 54) | def recurrence(self, xWxr_t, xWxz_t, xWxh_t, is_start, h_t1, h0): method output (line 62) | def output(self, Xflat, startPoints): FILE: rnn_class/batch_parity.py class SimpleRNN (line 18) | class SimpleRNN: method __init__ (line 19) | def __init__(self, M): method fit (line 22) | def fit(self, X, Y, batch_sz=20, learning_rate=1.0, mu=0.99, reg=1.0, ... function parity (line 156) | def parity(B=12, learning_rate=1e-3, epochs=3000): FILE: rnn_class/batch_units.py function init_weight (line 13) | def init_weight(Mi, Mo): class SimpleRecurrentLayer (line 17) | class SimpleRecurrentLayer: method __init__ (line 18) | def __init__(self, Mi, Mo, activation): method get_ht (line 36) | def get_ht(self, xWxh_t, h_t1): method recurrence (line 39) | def recurrence(self, xWxh_t, is_start, h_t1, h0): method output (line 47) | def output(self, Xflat, startPoints): class GRU (line 62) | class GRU: method __init__ (line 63) | def __init__(self, Mi, Mo, activation): method get_ht (line 93) | def get_ht(self, xWxr_t, xWxz_t, xWxh_t, h_t1): method recurrence (line 100) | def recurrence(self, xWxr_t, xWxz_t, xWxh_t, is_start, h_t1, h0): method output (line 108) | def output(self, Xflat, startPoints): class LSTM (line 126) | class LSTM: method __init__ (line 127) | def __init__(self, Mi, Mo, activation): method get_ht_ct (line 189) | def get_ht_ct(self, xWxi_t, xWxf_t, xWxc_t, xWxo_t, h_t1, c_t1): method recurrence (line 197) | def recurrence(self, xWxi_t, xWxf_t, xWxc_t, xWxo_t, is_start, h_t1, c... method output (line 205) | def output(self, Xflat, startPoints): FILE: rnn_class/batch_wiki.py class RNN (line 24) | class RNN: method __init__ (line 25) | def __init__(self, D, hidden_layer_sizes, V): method fit (line 30) | def fit(self, X, learning_rate=1e-4, mu=0.99, epochs=10, batch_sz=100,... function train_wikipedia (line 133) | def train_wikipedia(we_file='word_embeddings.npy', w2i_file='wikipedia_w... function find_analogies (line 150) | def find_analogies(w1, w2, w3, we_file='word_embeddings.npy', w2i_file='... FILE: rnn_class/brown.py function get_sentences (line 19) | def get_sentences(): function get_sentences_with_word2idx (line 25) | def get_sentences_with_word2idx(): function get_sentences_with_word2idx_limit_vocab (line 46) | def get_sentences_with_word2idx_limit_vocab(n_vocab=2000, keep_words=KEE... FILE: rnn_class/gru.py class GRU (line 16) | class GRU: method __init__ (line 17) | def __init__(self, Mi, Mo, activation): method recurrence (line 47) | def recurrence(self, x_t, h_t1): method output (line 54) | def output(self, x): FILE: rnn_class/lstm.py class LSTM (line 15) | class LSTM: method __init__ (line 16) | def __init__(self, Mi, Mo, activation): method recurrence (line 78) | def recurrence(self, x_t, h_t1, c_t1): method output (line 86) | def output(self, x): FILE: rnn_class/mlp_parity.py class HiddenLayer (line 18) | class HiddenLayer(object): method __init__ (line 19) | def __init__(self, M1, M2, an_id): method forward (line 29) | def forward(self, X): class ANN (line 33) | class ANN(object): method __init__ (line 34) | def __init__(self, hidden_layer_sizes): method fit (line 37) | def fit(self, X, Y, learning_rate=1e-2, mu=0.99, reg=1e-12, epochs=400... method forward (line 111) | def forward(self, X): method predict (line 117) | def predict(self, X): function wide (line 122) | def wide(): function deep (line 127) | def deep(): FILE: rnn_class/poetry_classifier.py class SimpleRNN (line 18) | class SimpleRNN: method __init__ (line 19) | def __init__(self, M, V): method fit (line 23) | def fit(self, X, Y, learning_rate=1.0, mu=0.99, reg=1.0, activation=T.... method save (line 93) | def save(self, filename): method load (line 97) | def load(filename, activation): method set (line 111) | def set(self, Wx, Wh, bh, h0, Wo, bo, activation): function train_poetry (line 149) | def train_poetry(): FILE: rnn_class/rrnn_language.py class SimpleRNN (line 19) | class SimpleRNN: method __init__ (line 20) | def __init__(self, D, M, V): method fit (line 25) | def fit(self, X, learning_rate=10., mu=0.9, reg=0., activation=T.tanh,... method save (line 99) | def save(self, filename): method load (line 103) | def load(filename, activation): method set (line 122) | def set(self, We, Wx, Wh, bh, h0, Wxz, Whz, bz, Wo, bo, activation): method generate (line 167) | def generate(self, word2idx): function train_poetry (line 196) | def train_poetry(): function generate_poetry (line 203) | def generate_poetry(): FILE: rnn_class/srn_language.py class SimpleRNN (line 19) | class SimpleRNN: method __init__ (line 20) | def __init__(self, D, M, V): method fit (line 25) | def fit(self, X, learning_rate=1., mu=0.99, reg=1.0, activation=T.tanh... method save (line 124) | def save(self, filename): method load (line 128) | def load(filename, activation): method set (line 144) | def set(self, We, Wx, Wh, bh, h0, Wo, bo, activation): method generate (line 182) | def generate(self, pi, word2idx): function train_poetry (line 211) | def train_poetry(): function generate_poetry (line 217) | def generate_poetry(): function wikipedia (line 230) | def wikipedia(): FILE: rnn_class/srn_language_tf.py class SimpleRNN (line 18) | class SimpleRNN: method __init__ (line 19) | def __init__(self, D, M, V, f, session): method set_session (line 26) | def set_session(self, session): method build (line 29) | def build(self, We, Wx, Wh, bh, h0, Wo, bo): method fit (line 106) | def fit(self, X, epochs=500, show_fig=False): method predict (line 161) | def predict(self, prev_words): method save (line 169) | def save(self, filename): method load (line 174) | def load(filename, activation, session): method generate (line 190) | def generate(self, pi, word2idx): function train_poetry (line 219) | def train_poetry(session, dims, savefile): function generate_poetry (line 226) | def generate_poetry(session, savefile): FILE: rnn_class/srn_parity.py class SimpleRNN (line 18) | class SimpleRNN: method __init__ (line 19) | def __init__(self, M): method fit (line 22) | def fit(self, X, Y, learning_rate=0.1, mu=0.99, reg=1.0, activation=T.... function parity (line 105) | def parity(B=12, learning_rate=1e-4, epochs=200): FILE: rnn_class/srn_parity_tf.py class SimpleRNN (line 17) | class SimpleRNN: method __init__ (line 18) | def __init__(self, M): method fit (line 21) | def fit(self, X, Y, learning_rate=1.0, mu=0.99, reg=1.0, activation=tf... function parity (line 99) | def parity(B=12, learning_rate=1e-4, epochs=200): FILE: rnn_class/tf_parity.py function x2sequence (line 29) | def x2sequence(x, T, D, batch_sz): class SimpleRNN (line 40) | class SimpleRNN: method __init__ (line 41) | def __init__(self, M): method fit (line 45) | def fit(self, X, Y, batch_sz=20, learning_rate=0.1, mu=0.9, activation... function parity (line 125) | def parity(B=12, learning_rate=1., epochs=1000): FILE: rnn_class/util.py function init_weight (line 17) | def init_weight(Mi, Mo): function all_parity_pairs (line 20) | def all_parity_pairs(nbit): function all_parity_pairs_with_sequence_labels (line 38) | def all_parity_pairs_with_sequence_labels(nbit): function remove_punctuation_2 (line 56) | def remove_punctuation_2(s): function remove_punctuation_3 (line 59) | def remove_punctuation_3(s): function get_robert_frost (line 68) | def get_robert_frost(): function my_tokenizer (line 86) | def my_tokenizer(s): function get_wikipedia_data (line 91) | def get_wikipedia_data(n_files, n_vocab, by_paragraph=False): function get_tags (line 172) | def get_tags(s): function get_poetry_classifier_data (line 176) | def get_poetry_classifier_data(samples_per_class, load_cached=True, save... function get_stock_data (line 216) | def get_stock_data(): FILE: rnn_class/visualize_embeddings.py function main (line 16) | def main(we_file='word_embeddings.npy', w2i_file='wikipedia_word2idx.jso... FILE: rnn_class/wiki.py class RNN (line 25) | class RNN: method __init__ (line 26) | def __init__(self, D, hidden_layer_sizes, V): method fit (line 31) | def fit(self, X, learning_rate=1e-5, mu=0.99, epochs=10, show_fig=True... function train_wikipedia (line 139) | def train_wikipedia(we_file='word_embeddings.npy', w2i_file='wikipedia_w... function find_analogies (line 155) | def find_analogies(w1, w2, w3, we_file='word_embeddings.npy', w2i_file='... FILE: supervised_class/app.py class MainHandler (line 22) | class MainHandler(tornado.web.RequestHandler): method get (line 23) | def get(self): class PredictionHandler (line 26) | class PredictionHandler(tornado.web.RequestHandler): method post (line 28) | def post(self): FILE: supervised_class/bayes.py class Bayes (line 18) | class Bayes(object): method fit (line 19) | def fit(self, X, Y, smoothing=1e-2): method score (line 32) | def score(self, X, Y): method predict (line 36) | def predict(self, X): FILE: supervised_class/dt.py function entropy (line 16) | def entropy(y): class TreeNode (line 27) | class TreeNode: method __init__ (line 28) | def __init__(self, depth=1, max_depth=None): method fit (line 35) | def fit(self, X, Y): method find_split (line 96) | def find_split(self, X, Y, col): method information_gain (line 121) | def information_gain(self, x, y, split): method predict_one (line 139) | def predict_one(self, x): method predict (line 158) | def predict(self, X): class DecisionTree (line 167) | class DecisionTree: method __init__ (line 168) | def __init__(self, max_depth=None): method fit (line 171) | def fit(self, X, Y): method predict (line 175) | def predict(self, X): method score (line 178) | def score(self, X, Y): FILE: supervised_class/dt_without_recursion.py function entropy (line 16) | def entropy(y): class DecisionTree (line 28) | class DecisionTree: method __init__ (line 29) | def __init__(self, depth=0, max_depth=None): method fit (line 41) | def fit(self, X, Y): method find_split (line 156) | def find_split(self, X, Y, col): method information_gain (line 185) | def information_gain(self, x, y, split): method predict_one (line 203) | def predict_one(self, x): method predict (line 243) | def predict(self, X): method score (line 250) | def score(self, X, Y): FILE: supervised_class/knn.py class KNN (line 22) | class KNN(object): method __init__ (line 23) | def __init__(self, k): method fit (line 26) | def fit(self, X, y): method predict (line 30) | def predict(self, X): method score (line 62) | def score(self, X, Y): FILE: supervised_class/knn_fail.py function get_data (line 14) | def get_data(): FILE: supervised_class/knn_vectorized.py class KNN (line 19) | class KNN(object): method __init__ (line 20) | def __init__(self, k): method fit (line 23) | def fit(self, X, y): method predict (line 27) | def predict(self, X): method score (line 58) | def score(self, X, Y): FILE: supervised_class/multinomialnb.py class MultinomialNB (line 15) | class MultinomialNB(object): method fit (line 16) | def fit(self, X, Y, smoothing=1.0): method score (line 32) | def score(self, X, Y): method predict (line 36) | def predict(self, X): FILE: supervised_class/nb.py class NaiveBayes (line 17) | class NaiveBayes(object): method fit (line 18) | def fit(self, X, Y, smoothing=1e-2): method score (line 30) | def score(self, X, Y): method predict (line 34) | def predict(self, X): FILE: supervised_class/perceptron.py function get_data (line 16) | def get_data(): function get_simple_xor (line 24) | def get_simple_xor(): class Perceptron (line 30) | class Perceptron: method fit (line 31) | def fit(self, X, Y, learning_rate=1.0, epochs=1000): method predict (line 63) | def predict(self, X): method score (line 66) | def score(self, X, Y): FILE: supervised_class/util.py function get_data (line 12) | def get_data(limit=None): function get_xor (line 23) | def get_xor(): function get_donut (line 32) | def get_donut(): FILE: supervised_class2/adaboost.py class AdaBoost (line 15) | class AdaBoost: method __init__ (line 16) | def __init__(self, M): method fit (line 19) | def fit(self, X, Y): method predict (line 40) | def predict(self, X): method score (line 49) | def score(self, X, Y): FILE: supervised_class2/bagging_classification.py class BaggedTreeClassifier (line 52) | class BaggedTreeClassifier: method __init__ (line 53) | def __init__(self, B): method fit (line 56) | def fit(self, X, Y): method predict (line 68) | def predict(self, X): method score (line 75) | def score(self, X, Y): FILE: supervised_class2/bagging_regression.py class BaggedTreeRegressor (line 38) | class BaggedTreeRegressor: method __init__ (line 39) | def __init__(self, B): method fit (line 42) | def fit(self, X, Y): method predict (line 54) | def predict(self, X): method score (line 60) | def score(self, X, Y): FILE: supervised_class2/bias_variance_demo.py function make_poly (line 23) | def make_poly(x, D): function f (line 32) | def f(X): FILE: supervised_class2/knn_dt_demo.py function plot_decision_boundary (line 95) | def plot_decision_boundary(X, model): FILE: supervised_class2/rf_classification.py class DataTransformer (line 30) | class DataTransformer: method fit (line 31) | def fit(self, df): method transform (line 53) | def transform(self, df): method fit_transform (line 68) | def fit_transform(self, df): function replace_missing (line 73) | def replace_missing(df): function get_data (line 87) | def get_data(): FILE: supervised_class2/rf_regression.py class DataTransformer (line 43) | class DataTransformer: method fit (line 44) | def fit(self, df): method transform (line 51) | def transform(self, df): method fit_transform (line 64) | def fit_transform(self, df): function get_data (line 69) | def get_data(): FILE: supervised_class2/rf_vs_bag2.py class NotAsRandomForest (line 36) | class NotAsRandomForest: method __init__ (line 37) | def __init__(self, n_estimators): method fit (line 40) | def fit(self, X, Y, M=None): method predict (line 62) | def predict(self, X): method score (line 69) | def score(self, X, Y): FILE: supervised_class2/util.py function plot_decision_boundary (line 13) | def plot_decision_boundary(X, model): class BaggedTreeRegressor (line 31) | class BaggedTreeRegressor: method __init__ (line 32) | def __init__(self, n_estimators, max_depth=None): method fit (line 36) | def fit(self, X, Y): method predict (line 48) | def predict(self, X): method score (line 54) | def score(self, X, Y): class BaggedTreeClassifier (line 60) | class BaggedTreeClassifier: method __init__ (line 61) | def __init__(self, n_estimators, max_depth=None): method fit (line 65) | def fit(self, X, Y): method predict (line 77) | def predict(self, X): method score (line 84) | def score(self, X, Y): FILE: svm_class/fake_neural_net.py class SigmoidFeaturizer (line 25) | class SigmoidFeaturizer: method __init__ (line 26) | def __init__(self, gamma=1.0, n_components=100, method='random'): method _subsample_data (line 32) | def _subsample_data(self, X, Y, n=10000): method fit (line 40) | def fit(self, X, Y=None): method transform (line 87) | def transform(self, X): method fit_transform (line 92) | def fit_transform(self, X, Y=None): FILE: svm_class/kernel_svm_gradient_primal.py function linear (line 18) | def linear(X1, X2, c=0): function rbf (line 21) | def rbf(X1, X2, gamma=None): function sigmoid (line 34) | def sigmoid(X1, X2, gamma=0.05, c=1): class KernelSVM (line 38) | class KernelSVM: method __init__ (line 39) | def __init__(self, kernel=linear, C=1.0): method _objective (line 43) | def _objective(self, margins): method fit (line 47) | def fit(self, X, Y, lr=1e-5, n_iters=400): method _decision_function (line 86) | def _decision_function(self, X): method predict (line 89) | def predict(self, X): method score (line 92) | def score(self, X, Y): function plot_decision_boundary (line 97) | def plot_decision_boundary(model, X, Y, resolution=100, colors=('b', 'k'... function clouds (line 139) | def clouds(): function medical (line 145) | def medical(): function xor (line 151) | def xor(): function donut (line 157) | def donut(): function spiral (line 163) | def spiral(): FILE: svm_class/linear_svm_gradient.py class LinearSVM (line 19) | class LinearSVM: method __init__ (line 20) | def __init__(self, C=1.0): method _objective (line 23) | def _objective(self, margins): method fit (line 26) | def fit(self, X, Y, lr=1e-5, n_iters=400): method _decision_function (line 60) | def _decision_function(self, X): method predict (line 63) | def predict(self, X): method score (line 66) | def score(self, X, Y): function plot_decision_boundary (line 71) | def plot_decision_boundary(model, X, Y, resolution=100, colors=('b', 'k'... function clouds (line 113) | def clouds(): function medical (line 119) | def medical(): FILE: svm_class/svm_gradient.py function linear (line 20) | def linear(X1, X2, c=0): function rbf (line 23) | def rbf(X1, X2, gamma=None): function sigmoid (line 36) | def sigmoid(X1, X2, gamma=0.05, c=1): class SVM (line 40) | class SVM: method __init__ (line 41) | def __init__(self, kernel, C=1.0): method _train_objective (line 45) | def _train_objective(self): method fit (line 48) | def fit(self, X, Y, lr=1e-5, n_iters=400): method _decision_function (line 82) | def _decision_function(self, X): method predict (line 85) | def predict(self, X): method score (line 88) | def score(self, X, Y): function medical (line 93) | def medical(): function medical_sigmoid (line 99) | def medical_sigmoid(): function xor (line 105) | def xor(): function donut (line 111) | def donut(): function spiral (line 117) | def spiral(): function clouds (line 123) | def clouds(): FILE: svm_class/svm_smo.py function linear (line 20) | def linear(X1, X2): function rbf (line 23) | def rbf(X1, X2): function sigmoid (line 34) | def sigmoid(X1, X2, gamma=0.05, c=1): class SVM (line 38) | class SVM: method __init__ (line 39) | def __init__(self, kernel, C=1.0): method _loss (line 43) | def _loss(self, X, Y): method _take_step (line 49) | def _take_step(self, i1, i2): method _examine_example (line 165) | def _examine_example(self, i2): method fit (line 198) | def fit(self, X, Y, tol=0.00001, eps=0.01): method _decision_function (line 248) | def _decision_function(self, X): method predict (line 252) | def predict(self, X): method score (line 255) | def score(self, X, Y): function get_data (line 260) | def get_data(): FILE: svm_class/svm_spam.py function visualize (line 56) | def visualize(label): FILE: svm_class/util.py function getKaggleMNIST (line 16) | def getKaggleMNIST(): function get_spiral (line 40) | def get_spiral(): function get_xor (line 75) | def get_xor(): function get_donut (line 85) | def get_donut(): function get_clouds (line 105) | def get_clouds(): function plot_decision_boundary (line 118) | def plot_decision_boundary(model, resolution=100, colors=('b', 'k', 'r')): FILE: tensorflow/input_data.py function maybe_download (line 11) | def maybe_download(filename, work_directory): function _read32 (line 21) | def _read32(bytestream): function extract_images (line 24) | def extract_images(filename): function dense_to_one_hot (line 40) | def dense_to_one_hot(labels_dense, num_classes=10): function extract_labels (line 47) | def extract_labels(filename, one_hot=False): class DataSet (line 62) | class DataSet(object): method __init__ (line 63) | def __init__(self, images, labels, fake_data=False): method images (line 84) | def images(self): method labels (line 87) | def labels(self): method num_examples (line 90) | def num_examples(self): method epochs_completed (line 93) | def epochs_completed(self): method next_batch (line 95) | def next_batch(self, batch_size, fake_data=False): function read_data_sets (line 118) | def read_data_sets(train_dir, fake_data=False, one_hot=False): FILE: tf2.0/fake_util.py function my_useful_function (line 3) | def my_useful_function(): FILE: tf2.0/keras_trader.py function get_data (line 31) | def get_data(): class ReplayBuffer (line 43) | class ReplayBuffer: method __init__ (line 44) | def __init__(self, obs_dim, act_dim, size): method store (line 52) | def store(self, obs, act, rew, next_obs, done): method sample_batch (line 61) | def sample_batch(self, batch_size=32): function get_scaler (line 73) | def get_scaler(env): function maybe_make_dir (line 92) | def maybe_make_dir(directory): function mlp (line 99) | def mlp(input_dim, n_action, n_hidden_layers=1, hidden_dim=32): class MultiStockEnv (line 123) | class MultiStockEnv: method __init__ (line 140) | def __init__(self, data, initial_investment=20000): method reset (line 173) | def reset(self): method step (line 181) | def step(self, action): method _get_obs (line 210) | def _get_obs(self): method _get_val (line 219) | def _get_val(self): method _trade (line 223) | def _trade(self, action): class DQNAgent (line 266) | class DQNAgent(object): method __init__ (line 267) | def __init__(self, state_size, action_size): method update_replay_memory (line 278) | def update_replay_memory(self, state, action, reward, next_state, done): method act (line 282) | def act(self, state): method replay (line 289) | def replay(self, batch_size=32): method load (line 323) | def load(self, name): method save (line 327) | def save(self, name): function play_one_episode (line 332) | def play_one_episode(agent, env, is_train): FILE: tf2.0/mlp_trader.py function get_data (line 16) | def get_data(): class ReplayBuffer (line 28) | class ReplayBuffer: method __init__ (line 29) | def __init__(self, obs_dim, act_dim, size): method store (line 37) | def store(self, obs, act, rew, next_obs, done): method sample_batch (line 46) | def sample_batch(self, batch_size=32): function get_scaler (line 58) | def get_scaler(env): function maybe_make_dir (line 77) | def maybe_make_dir(directory): function mlp (line 84) | def mlp(input_dim, n_action, n_hidden_layers=1, hidden_dim=32): class MultiStockEnv (line 104) | class MultiStockEnv: method __init__ (line 121) | def __init__(self, data, initial_investment=20000): method reset (line 154) | def reset(self): method step (line 162) | def step(self, action): method _get_obs (line 191) | def _get_obs(self): method _get_val (line 200) | def _get_val(self): method _trade (line 204) | def _trade(self, action): class DQNAgent (line 247) | class DQNAgent(object): method __init__ (line 248) | def __init__(self, state_size, action_size): method update_replay_memory (line 259) | def update_replay_memory(self, state, action, reward, next_state, done): method act (line 263) | def act(self, state): method replay (line 269) | def replay(self, batch_size=32): method load (line 303) | def load(self, name): method save (line 308) | def save(self, name): function play_one_episode (line 313) | def play_one_episode(agent, env, is_train): FILE: tf2.0/rl_trader.py function get_data (line 24) | def get_data(): class ReplayBuffer (line 36) | class ReplayBuffer: method __init__ (line 37) | def __init__(self, obs_dim, act_dim, size): method store (line 45) | def store(self, obs, act, rew, next_obs, done): method sample_batch (line 54) | def sample_batch(self, batch_size=32): function get_scaler (line 66) | def get_scaler(env): function maybe_make_dir (line 85) | def maybe_make_dir(directory): function mlp (line 92) | def mlp(input_dim, n_action, n_hidden_layers=1, hidden_dim=32): class MultiStockEnv (line 116) | class MultiStockEnv: method __init__ (line 133) | def __init__(self, data, initial_investment=20000): method reset (line 166) | def reset(self): method step (line 174) | def step(self, action): method _get_obs (line 203) | def _get_obs(self): method _get_val (line 212) | def _get_val(self): method _trade (line 216) | def _trade(self, action): class DQNAgent (line 259) | class DQNAgent(object): method __init__ (line 260) | def __init__(self, state_size, action_size): method update_replay_memory (line 271) | def update_replay_memory(self, state, action, reward, next_state, done): method act (line 275) | def act(self, state): method replay (line 282) | def replay(self, batch_size=32): method load (line 316) | def load(self, name): method save (line 320) | def save(self, name): function play_one_episode (line 325) | def play_one_episode(agent, env, is_train): FILE: tf2.0/xor3d.py function get_label (line 7) | def get_label(x, i1, i2, i3): FILE: unsupervised_class/books.py function my_tokenizer (line 31) | def my_tokenizer(s): function tokens_to_vector (line 68) | def tokens_to_vector(tokens): function d (line 83) | def d(u, v): function cost (line 87) | def cost(X, R, M): function plot_k_means (line 100) | def plot_k_means(X, K, index_word_map, max_iter=20, beta=1.0, show_plots... function annotate1 (line 207) | def annotate1(X, index_word_map, eps=0.1): FILE: unsupervised_class/choose_k.py function main (line 15) | def main(): FILE: unsupervised_class/evolution.py function to_code (line 20) | def to_code(a): function dist (line 25) | def dist(a, b): function generate_offspring (line 30) | def generate_offspring(parent): function maybe_modify (line 35) | def maybe_modify(c): FILE: unsupervised_class/gmm.py function gmm (line 16) | def gmm(X, K, max_iter=20, smoothing=1e-2): function main (line 81) | def main(): FILE: unsupervised_class/gmm_mnist.py function main (line 25) | def main(): FILE: unsupervised_class/hcluster.py function main (line 16) | def main(): FILE: unsupervised_class/kmeans.py function d (line 15) | def d(u, v): function cost (line 20) | def cost(X, R, M): function plot_k_means (line 34) | def plot_k_means(X, K, max_iter=20, beta=3.0, show_plots=False): function get_simple_data (line 92) | def get_simple_data(): function main (line 108) | def main(): FILE: unsupervised_class/kmeans_fail.py function donut (line 14) | def donut(): function main (line 35) | def main(): FILE: unsupervised_class/kmeans_mnist.py function get_data (line 22) | def get_data(limit=None): function purity2 (line 35) | def purity2(Y, R): function purity (line 53) | def purity(Y, R): function DBI2 (line 70) | def DBI2(X, R): function DBI (line 104) | def DBI(X, M, R): function main (line 133) | def main(): FILE: unsupervised_class/kmeans_visualize.py function d (line 14) | def d(u, v): function cost (line 19) | def cost(X, R, M): function plot_k_means (line 27) | def plot_k_means(X, K, max_iter=20, beta=1.0): function main (line 65) | def main(): FILE: unsupervised_class/tweets.py function filter_tweet (line 54) | def filter_tweet(s): function purity (line 123) | def purity(true_labels, cluster_assignments, categories): FILE: unsupervised_class2/autoencoder.py function T_shared_zeros_like32 (line 17) | def T_shared_zeros_like32(p): function momentum_updates (line 21) | def momentum_updates(cost, params, mu, learning_rate): class AutoEncoder (line 36) | class AutoEncoder(object): method __init__ (line 37) | def __init__(self, M, an_id): method fit (line 41) | def fit(self, X, learning_rate=0.5, mu=0.99, epochs=1, batch_sz=100, s... method forward_hidden (line 112) | def forward_hidden(self, X): method forward_output (line 116) | def forward_output(self, X): method createFromArrays (line 122) | def createFromArrays(W, bh, bo, an_id): class DNN (line 132) | class DNN(object): method __init__ (line 133) | def __init__(self, hidden_layer_sizes, UnsupervisedModel=AutoEncoder): method fit (line 142) | def fit(self, X, Y, Xtest, Ytest, method predict (line 216) | def predict(self, X): method forward (line 219) | def forward(self, X): function main (line 230) | def main(): function test_single_autoencoder (line 240) | def test_single_autoencoder(): FILE: unsupervised_class2/autoencoder_tf.py class AutoEncoder (line 19) | class AutoEncoder(object): method __init__ (line 20) | def __init__(self, D, M, an_id): method set_session (line 25) | def set_session(self, session): method build (line 28) | def build(self, D, M): method fit (line 51) | def fit(self, X, epochs=1, batch_sz=100, show_fig=False): method transform (line 70) | def transform(self, X): method predict (line 76) | def predict(self, X): method forward_hidden (line 82) | def forward_hidden(self, X): method forward_logits (line 86) | def forward_logits(self, X): method forward_output (line 90) | def forward_output(self, X): class DNN (line 94) | class DNN(object): method __init__ (line 95) | def __init__(self, D, hidden_layer_sizes, K, UnsupervisedModel=AutoEnc... method set_session (line 106) | def set_session(self, session): method build_final_layer (line 111) | def build_final_layer(self, D, M, K): method fit (line 130) | def fit(self, X, Y, Xtest, Ytest, pretrain=True, epochs=1, batch_sz=100): method forward (line 169) | def forward(self, X): function test_pretraining_dnn (line 180) | def test_pretraining_dnn(): function test_single_autoencoder (line 197) | def test_single_autoencoder(): FILE: unsupervised_class2/gaussian_nb.py class GaussianNB (line 18) | class GaussianNB(object): method fit (line 19) | def fit(self, X, Y, smoothing=1e-2): method score (line 31) | def score(self, X, Y): method predict (line 35) | def predict(self, X): FILE: unsupervised_class2/pca.py function main (line 14) | def main(): FILE: unsupervised_class2/rbm.py class RBM (line 19) | class RBM(object): method __init__ (line 20) | def __init__(self, M, an_id): method fit (line 25) | def fit(self, X, learning_rate=0.1, epochs=1, batch_sz=100, show_fig=F... method free_energy (line 89) | def free_energy(self, V): method sample_h_given_v (line 92) | def sample_h_given_v(self, V): method sample_v_given_h (line 97) | def sample_v_given_h(self, H): method forward_hidden (line 102) | def forward_hidden(self, X): method forward_output (line 105) | def forward_output(self, X): method createFromArrays (line 111) | def createFromArrays(W, c, b, an_id): function main (line 121) | def main(): FILE: unsupervised_class2/rbm_tf.py class RBM (line 16) | class RBM(object): method __init__ (line 17) | def __init__(self, D, M, an_id): method set_session (line 23) | def set_session(self, session): method build (line 26) | def build(self, D, M): method fit (line 73) | def fit(self, X, epochs=1, batch_sz=100, show_fig=False): method free_energy (line 92) | def free_energy(self, V): method forward_hidden (line 105) | def forward_hidden(self, X): method forward_logits (line 108) | def forward_logits(self, X): method forward_output (line 112) | def forward_output(self, X): method transform (line 115) | def transform(self, X): function main (line 122) | def main(): FILE: unsupervised_class2/tsne_books.py function my_tokenizer (line 27) | def my_tokenizer(s): function tokens_to_vector (line 62) | def tokens_to_vector(tokens): function main (line 78) | def main(): FILE: unsupervised_class2/tsne_donut.py function get_donut_data (line 14) | def get_donut_data(): function main (line 34) | def main(): FILE: unsupervised_class2/tsne_mnist.py function main (line 21) | def main(): FILE: unsupervised_class2/tsne_xor.py function get_xor_data (line 14) | def get_xor_data(): function main (line 24) | def main(): FILE: unsupervised_class2/unsupervised.py class DBN (line 22) | class DBN(object): method __init__ (line 23) | def __init__(self, hidden_layer_sizes, UnsupervisedModel=AutoEncoder): method fit (line 31) | def fit(self, X, pretrain_epochs=1): method forward (line 44) | def forward(self, X): method fit_to_input (line 50) | def fit_to_input(self, k, learning_rate=1.0, mu=0.99, epochs=100000): method save (line 100) | def save(self, filename): method load (line 105) | def load(filename, UnsupervisedModel=AutoEncoder): function main (line 124) | def main(): FILE: unsupervised_class2/util.py function relu (line 13) | def relu(x): function error_rate (line 17) | def error_rate(p, t): function getKaggleMNIST (line 21) | def getKaggleMNIST(): function init_weights (line 37) | def init_weights(shape): FILE: unsupervised_class2/vanishing.py class HiddenLayer (line 18) | class HiddenLayer(object): method __init__ (line 19) | def __init__(self, D, M): method forward (line 26) | def forward(self, X): class ANN (line 32) | class ANN(object): method __init__ (line 33) | def __init__(self, hidden_layer_sizes): method fit (line 36) | def fit(self, X, Y, learning_rate=0.01, mu=0.99, epochs=30, batch_sz=1... method predict (line 110) | def predict(self, X): method forward (line 113) | def forward(self, X): function main (line 121) | def main(): FILE: unsupervised_class2/visualize_features.py function main (line 20) | def main(loadfile=None, savefile=None): FILE: unsupervised_class2/xwing.py class Layer (line 24) | class Layer(object): method __init__ (line 25) | def __init__(self, m1, m2): method forward (line 34) | def forward(self, X): method forwardT (line 37) | def forwardT(self, X): class DeepAutoEncoder (line 41) | class DeepAutoEncoder(object): method __init__ (line 42) | def __init__(self, hidden_layer_sizes): method fit (line 45) | def fit(self, X, learning_rate=0.5, mu=0.99, epochs=50, batch_sz=100, ... method forward (line 92) | def forward(self, X): function main (line 108) | def main(): FILE: unsupervised_class3/autoencoder_tf.py class Autoencoder (line 14) | class Autoencoder: method __init__ (line 15) | def __init__(self, D, M): method fit (line 48) | def fit(self, X, epochs=30, batch_sz=64): method predict (line 65) | def predict(self, X): function main (line 69) | def main(): FILE: unsupervised_class3/autoencoder_theano.py class Autoencoder (line 15) | class Autoencoder: method __init__ (line 16) | def __init__(self, D, M): method fit (line 71) | def fit(self, X, epochs=30, batch_sz=64): function main (line 89) | def main(): FILE: unsupervised_class3/bayes_classifier_gaussian.py function clamp_sample (line 14) | def clamp_sample(x): class BayesClassifier (line 20) | class BayesClassifier: method fit (line 21) | def fit(self, X, Y): method sample_given_y (line 37) | def sample_given_y(self, y): method sample (line 41) | def sample(self): FILE: unsupervised_class3/bayes_classifier_gmm.py function clamp_sample (line 14) | def clamp_sample(x): class BayesClassifier (line 20) | class BayesClassifier: method fit (line 21) | def fit(self, X, Y): method sample_given_y (line 37) | def sample_given_y(self, y): method sample (line 50) | def sample(self): FILE: unsupervised_class3/dcgan_tf.py function lrelu (line 30) | def lrelu(x, alpha=0.2): class ConvLayer (line 34) | class ConvLayer: method __init__ (line 35) | def __init__(self, name, mi, mo, apply_batch_norm, filtersz=5, stride=... method forward (line 57) | def forward(self, X, reuse, is_training): class FractionallyStridedConvLayer (line 82) | class FractionallyStridedConvLayer: method __init__ (line 83) | def __init__(self, name, mi, mo, output_shape, apply_batch_norm, filte... method forward (line 107) | def forward(self, X, reuse, is_training): class DenseLayer (line 132) | class DenseLayer(object): method __init__ (line 133) | def __init__(self, name, M1, M2, apply_batch_norm, f=tf.nn.relu): method forward (line 149) | def forward(self, X, reuse, is_training): class DCGAN (line 167) | class DCGAN: method __init__ (line 168) | def __init__(self, img_length, num_colors, d_sizes, g_sizes): method build_discriminator (line 258) | def build_discriminator(self, X, d_sizes): method d_forward (line 301) | def d_forward(self, X, reuse=None, is_training=True): method build_generator (line 313) | def build_generator(self, Z, g_sizes): method g_forward (line 375) | def g_forward(self, Z, reuse=None, is_training=True): method fit (line 407) | def fit(self, X): method sample (line 498) | def sample(self, n): function celeb (line 505) | def celeb(): function mnist (line 542) | def mnist(): FILE: unsupervised_class3/dcgan_theano.py function lrelu (line 38) | def lrelu(x, alpha=0.2): function adam (line 43) | def adam(params, grads): function batch_norm (line 62) | def batch_norm( class ConvLayer (line 101) | class ConvLayer: method __init__ (line 102) | def __init__(self, mi, mo, apply_batch_norm, filtersz=5, stride=2, f=T... method forward (line 124) | def forward(self, X, is_training): class FractionallyStridedConvLayer (line 159) | class FractionallyStridedConvLayer: method __init__ (line 160) | def __init__(self, mi, mo, output_shape, apply_batch_norm, filtersz=5,... method forward (line 184) | def forward(self, X, is_training): class DenseLayer (line 214) | class DenseLayer(object): method __init__ (line 215) | def __init__(self, M1, M2, apply_batch_norm, f=T.nnet.relu): method forward (line 234) | def forward(self, X, is_training): class DCGAN (line 257) | class DCGAN: method __init__ (line 258) | def __init__(self, img_length, num_colors, d_sizes, g_sizes): method build_discriminator (line 336) | def build_discriminator(self, X, d_sizes): method d_forward (line 382) | def d_forward(self, X, is_training): method build_generator (line 394) | def build_generator(self, Z, g_sizes): method g_forward (line 468) | def g_forward(self, Z, is_training): method fit (line 506) | def fit(self, X): method sample (line 587) | def sample(self, n): function celeb (line 593) | def celeb(): function mnist (line 630) | def mnist(): FILE: unsupervised_class3/parameterize_guassian.py function softplus (line 13) | def softplus(x): function forward (line 31) | def forward(x, W1, W2): FILE: unsupervised_class3/util.py function imread (line 20) | def imread(fn): function imsave (line 24) | def imsave(fn, arr): function imresize (line 28) | def imresize(arr, sz): function get_mnist (line 39) | def get_mnist(limit=None): function get_celeb (line 59) | def get_celeb(limit=None): function crop_and_resave (line 104) | def crop_and_resave(inputfile, outputdir): function scale_image (line 120) | def scale_image(im): function files2images_theano (line 125) | def files2images_theano(filenames): function files2images (line 132) | def files2images(filenames): function save_response_content (line 137) | def save_response_content(r, dest): function get_confirm_token (line 153) | def get_confirm_token(response): function download_file (line 160) | def download_file(file_id, dest): FILE: unsupervised_class3/vae_tf.py class DenseLayer (line 27) | class DenseLayer(object): method __init__ (line 28) | def __init__(self, M1, M2, f=tf.nn.relu): method forward (line 36) | def forward(self, X): class VariationalAutoencoder (line 40) | class VariationalAutoencoder: method __init__ (line 41) | def __init__(self, D, hidden_layer_sizes): method fit (line 202) | def fit(self, X, epochs=30, batch_sz=64): method transform (line 219) | def transform(self, X): method prior_predictive_with_input (line 225) | def prior_predictive_with_input(self, Z): method posterior_predictive_sample (line 231) | def posterior_predictive_sample(self, X): method prior_predictive_sample_with_probs (line 235) | def prior_predictive_sample_with_probs(self): function main (line 240) | def main(): FILE: unsupervised_class3/vae_theano.py class DenseLayer (line 17) | class DenseLayer(object): method __init__ (line 18) | def __init__(self, M1, M2, f=T.nnet.relu): method forward (line 24) | def forward(self, X): class VariationalAutoencoder (line 28) | class VariationalAutoencoder: method __init__ (line 29) | def __init__(self, D, hidden_layer_sizes): method fit (line 197) | def fit(self, X, epochs=30, batch_sz=64): function main (line 215) | def main():