SYMBOL INDEX (465 symbols across 74 files) FILE: mlfromscratch/deep_learning/activation_functions.py class Sigmoid (line 6) | class Sigmoid(): method __call__ (line 7) | def __call__(self, x): method gradient (line 10) | def gradient(self, x): class Softmax (line 13) | class Softmax(): method __call__ (line 14) | def __call__(self, x): method gradient (line 18) | def gradient(self, x): class TanH (line 22) | class TanH(): method __call__ (line 23) | def __call__(self, x): method gradient (line 26) | def gradient(self, x): class ReLU (line 29) | class ReLU(): method __call__ (line 30) | def __call__(self, x): method gradient (line 33) | def gradient(self, x): class LeakyReLU (line 36) | class LeakyReLU(): method __init__ (line 37) | def __init__(self, alpha=0.2): method __call__ (line 40) | def __call__(self, x): method gradient (line 43) | def gradient(self, x): class ELU (line 46) | class ELU(): method __init__ (line 47) | def __init__(self, alpha=0.1): method __call__ (line 50) | def __call__(self, x): method gradient (line 53) | def gradient(self, x): class SELU (line 56) | class SELU(): method __init__ (line 59) | def __init__(self): method __call__ (line 63) | def __call__(self, x): method gradient (line 66) | def gradient(self, x): class SoftPlus (line 69) | class SoftPlus(): method __call__ (line 70) | def __call__(self, x): method gradient (line 73) | def gradient(self, x): FILE: mlfromscratch/deep_learning/layers.py class Layer (line 10) | class Layer(object): method set_input_shape (line 12) | def set_input_shape(self, shape): method layer_name (line 17) | def layer_name(self): method parameters (line 21) | def parameters(self): method forward_pass (line 25) | def forward_pass(self, X, training): method backward_pass (line 29) | def backward_pass(self, accum_grad): method output_shape (line 36) | def output_shape(self): class Dense (line 41) | class Dense(Layer): method __init__ (line 52) | def __init__(self, n_units, input_shape=None): method initialize (line 60) | def initialize(self, optimizer): method parameters (line 69) | def parameters(self): method forward_pass (line 72) | def forward_pass(self, X, training=True): method backward_pass (line 76) | def backward_pass(self, accum_grad): method output_shape (line 94) | def output_shape(self): class RNN (line 98) | class RNN(Layer): method __init__ (line 118) | def __init__(self, n_units, activation='tanh', bptt_trunc=5, input_sha... method initialize (line 128) | def initialize(self, optimizer): method parameters (line 141) | def parameters(self): method forward_pass (line 144) | def forward_pass(self, X, training=True): method backward_pass (line 163) | def backward_pass(self, accum_grad): method output_shape (line 197) | def output_shape(self): class Conv2D (line 200) | class Conv2D(Layer): method __init__ (line 219) | def __init__(self, n_filters, filter_shape, input_shape=None, padding=... method initialize (line 227) | def initialize(self, optimizer): method parameters (line 238) | def parameters(self): method forward_pass (line 241) | def forward_pass(self, X, training=True): method backward_pass (line 256) | def backward_pass(self, accum_grad): method output_shape (line 282) | def output_shape(self): class BatchNormalization (line 290) | class BatchNormalization(Layer): method __init__ (line 293) | def __init__(self, momentum=0.99): method initialize (line 300) | def initialize(self, optimizer): method parameters (line 308) | def parameters(self): method forward_pass (line 311) | def forward_pass(self, X, training=True): method backward_pass (line 336) | def backward_pass(self, accum_grad): method output_shape (line 361) | def output_shape(self): class PoolingLayer (line 365) | class PoolingLayer(Layer): method __init__ (line 368) | def __init__(self, pool_shape=(2, 2), stride=1, padding=0): method forward_pass (line 374) | def forward_pass(self, X, training=True): method backward_pass (line 392) | def backward_pass(self, accum_grad): method output_shape (line 405) | def output_shape(self): class MaxPooling2D (line 414) | class MaxPooling2D(PoolingLayer): method _pool_forward (line 415) | def _pool_forward(self, X_col): method _pool_backward (line 421) | def _pool_backward(self, accum_grad): class AveragePooling2D (line 427) | class AveragePooling2D(PoolingLayer): method _pool_forward (line 428) | def _pool_forward(self, X_col): method _pool_backward (line 432) | def _pool_backward(self, accum_grad): class ConstantPadding2D (line 438) | class ConstantPadding2D(Layer): method __init__ (line 452) | def __init__(self, padding, padding_value=0): method forward_pass (line 461) | def forward_pass(self, X, training=True): method backward_pass (line 468) | def backward_pass(self, accum_grad): method output_shape (line 474) | def output_shape(self): class ZeroPadding2D (line 480) | class ZeroPadding2D(ConstantPadding2D): method __init__ (line 492) | def __init__(self, padding): class Flatten (line 501) | class Flatten(Layer): method __init__ (line 503) | def __init__(self, input_shape=None): method forward_pass (line 508) | def forward_pass(self, X, training=True): method backward_pass (line 512) | def backward_pass(self, accum_grad): method output_shape (line 515) | def output_shape(self): class UpSampling2D (line 519) | class UpSampling2D(Layer): method __init__ (line 528) | def __init__(self, size=(2,2), input_shape=None): method forward_pass (line 534) | def forward_pass(self, X, training=True): method backward_pass (line 540) | def backward_pass(self, accum_grad): method output_shape (line 545) | def output_shape(self): class Reshape (line 550) | class Reshape(Layer): method __init__ (line 558) | def __init__(self, shape, input_shape=None): method forward_pass (line 564) | def forward_pass(self, X, training=True): method backward_pass (line 568) | def backward_pass(self, accum_grad): method output_shape (line 571) | def output_shape(self): class Dropout (line 575) | class Dropout(Layer): method __init__ (line 584) | def __init__(self, p=0.2): method forward_pass (line 592) | def forward_pass(self, X, training=True): method backward_pass (line 599) | def backward_pass(self, accum_grad): method output_shape (line 602) | def output_shape(self): class Activation (line 616) | class Activation(Layer): method __init__ (line 625) | def __init__(self, name): method layer_name (line 630) | def layer_name(self): method forward_pass (line 633) | def forward_pass(self, X, training=True): method backward_pass (line 637) | def backward_pass(self, accum_grad): method output_shape (line 640) | def output_shape(self): function determine_padding (line 646) | def determine_padding(filter_shape, output_shape="same"): function get_im2col_indices (line 668) | def get_im2col_indices(images_shape, filter_shape, padding, stride=1): function image_to_column (line 692) | def image_to_column(images, filter_shape, stride, output_shape='same'): function column_to_image (line 716) | def column_to_image(cols, images_shape, filter_shape, stride, output_sha... FILE: mlfromscratch/deep_learning/loss_functions.py class Loss (line 6) | class Loss(object): method loss (line 7) | def loss(self, y_true, y_pred): method gradient (line 10) | def gradient(self, y, y_pred): method acc (line 13) | def acc(self, y, y_pred): class SquareLoss (line 16) | class SquareLoss(Loss): method __init__ (line 17) | def __init__(self): pass method loss (line 19) | def loss(self, y, y_pred): method gradient (line 22) | def gradient(self, y, y_pred): class CrossEntropy (line 25) | class CrossEntropy(Loss): method __init__ (line 26) | def __init__(self): pass method loss (line 28) | def loss(self, y, p): method acc (line 33) | def acc(self, y, p): method gradient (line 36) | def gradient(self, y, p): FILE: mlfromscratch/deep_learning/neural_network.py class NeuralNetwork (line 9) | class NeuralNetwork(): method __init__ (line 22) | def __init__(self, optimizer, loss, validation_data=None): method set_trainable (line 34) | def set_trainable(self, trainable): method add (line 39) | def add(self, layer): method test_on_batch (line 53) | def test_on_batch(self, X, y): method train_on_batch (line 61) | def train_on_batch(self, X, y): method fit (line 73) | def fit(self, X, y, n_epochs, batch_size): method _forward_pass (line 90) | def _forward_pass(self, X, training=True): method _backward_pass (line 98) | def _backward_pass(self, loss_grad): method summary (line 103) | def summary(self, name="Model Summary"): method predict (line 121) | def predict(self, X): FILE: mlfromscratch/deep_learning/optimizers.py class StochasticGradientDescent (line 9) | class StochasticGradientDescent(): method __init__ (line 10) | def __init__(self, learning_rate=0.01, momentum=0): method update (line 15) | def update(self, w, grad_wrt_w): class NesterovAcceleratedGradient (line 24) | class NesterovAcceleratedGradient(): method __init__ (line 25) | def __init__(self, learning_rate=0.001, momentum=0.4): method update (line 30) | def update(self, w, grad_func): class Adagrad (line 41) | class Adagrad(): method __init__ (line 42) | def __init__(self, learning_rate=0.01): method update (line 47) | def update(self, w, grad_wrt_w): class Adadelta (line 56) | class Adadelta(): method __init__ (line 57) | def __init__(self, rho=0.95, eps=1e-6): method update (line 64) | def update(self, w, grad_wrt_w): class RMSprop (line 88) | class RMSprop(): method __init__ (line 89) | def __init__(self, learning_rate=0.01, rho=0.9): method update (line 95) | def update(self, w, grad_wrt_w): class Adam (line 106) | class Adam(): method __init__ (line 107) | def __init__(self, learning_rate=0.001, b1=0.9, b2=0.999): method update (line 116) | def update(self, w, grad_wrt_w): FILE: mlfromscratch/examples/adaboost.py function main (line 11) | def main(): FILE: mlfromscratch/examples/apriori.py function main (line 6) | def main(): FILE: mlfromscratch/examples/bayesian_regression.py function main (line 10) | def main(): FILE: mlfromscratch/examples/convolutional_neural_network.py function main (line 21) | def main(): FILE: mlfromscratch/examples/dbscan.py function main (line 12) | def main(): FILE: mlfromscratch/examples/decision_tree_classifier.py function main (line 13) | def main(): FILE: mlfromscratch/examples/decision_tree_regressor.py function main (line 10) | def main(): FILE: mlfromscratch/examples/deep_q_network.py function main (line 11) | def main(): FILE: mlfromscratch/examples/elastic_net.py function main (line 11) | def main(): FILE: mlfromscratch/examples/fp_growth.py function main (line 5) | def main(): FILE: mlfromscratch/examples/gaussian_mixture_model.py function main (line 13) | def main(): FILE: mlfromscratch/examples/genetic_algorithm.py function main (line 4) | def main(): FILE: mlfromscratch/examples/gradient_boosting_classifier.py function main (line 12) | def main(): FILE: mlfromscratch/examples/gradient_boosting_regressor.py function main (line 14) | def main(): FILE: mlfromscratch/examples/k_means.py function main (line 9) | def main(): FILE: mlfromscratch/examples/k_nearest_neighbors.py function main (line 10) | def main(): FILE: mlfromscratch/examples/lasso_regression.py function main (line 11) | def main(): FILE: mlfromscratch/examples/linear_discriminant_analysis.py function main (line 11) | def main(): FILE: mlfromscratch/examples/linear_regression.py function main (line 10) | def main(): FILE: mlfromscratch/examples/logistic_regression.py function main (line 12) | def main(): FILE: mlfromscratch/examples/multi_class_lda.py function main (line 8) | def main(): FILE: mlfromscratch/examples/multilayer_perceptron.py function main (line 17) | def main(): FILE: mlfromscratch/examples/naive_bayes.py function main (line 7) | def main(): FILE: mlfromscratch/examples/neuroevolution.py function main (line 14) | def main(): FILE: mlfromscratch/examples/particle_swarm_optimization.py function main (line 14) | def main(): FILE: mlfromscratch/examples/partitioning_around_medoids.py function main (line 8) | def main(): FILE: mlfromscratch/examples/perceptron.py function main (line 13) | def main(): FILE: mlfromscratch/examples/polynomial_regression.py function main (line 11) | def main(): FILE: mlfromscratch/examples/principal_component_analysis.py function main (line 8) | def main(): FILE: mlfromscratch/examples/random_forest.py function main (line 7) | def main(): FILE: mlfromscratch/examples/recurrent_neural_network.py function main (line 14) | def main(): FILE: mlfromscratch/examples/restricted_boltzmann_machine.py function main (line 12) | def main(): FILE: mlfromscratch/examples/ridge_regression.py function main (line 11) | def main(): FILE: mlfromscratch/examples/support_vector_machine.py function main (line 10) | def main(): FILE: mlfromscratch/examples/xgboost.py function main (line 10) | def main(): FILE: mlfromscratch/reinforcement_learning/deep_q_network.py class DeepQNetwork (line 8) | class DeepQNetwork(): method __init__ (line 28) | def __init__(self, env_name='CartPole-v1', epsilon=1, gamma=0.9, decay... method set_model (line 41) | def set_model(self, model): method _select_action (line 44) | def _select_action(self, state): method _memorize (line 54) | def _memorize(self, state, action, reward, new_state, done): method _construct_training_set (line 60) | def _construct_training_set(self, replay): method train (line 89) | def train(self, n_epochs=500, batch_size=32): method play (line 132) | def play(self, n_epochs): FILE: mlfromscratch/supervised_learning/adaboost.py class DecisionStump (line 12) | class DecisionStump(): method __init__ (line 13) | def __init__(self): class Adaboost (line 23) | class Adaboost(): method __init__ (line 33) | def __init__(self, n_clf=5): method fit (line 36) | def fit(self, X, y): method predict (line 96) | def predict(self, X): function main (line 117) | def main(): FILE: mlfromscratch/supervised_learning/bayesian_regression.py class BayesianRegression (line 8) | class BayesianRegression(object): method __init__ (line 36) | def __init__(self, n_draws, mu0, omega0, nu0, sigma_sq0, poly_degree=0... method _draw_scaled_inv_chi_sq (line 53) | def _draw_scaled_inv_chi_sq(self, n, df, scale): method fit (line 58) | def fit(self, X, y): method predict (line 99) | def predict(self, X, eti=False): FILE: mlfromscratch/supervised_learning/decision_tree.py class DecisionNode (line 7) | class DecisionNode(): method __init__ (line 24) | def __init__(self, feature_i=None, threshold=None, class DecisionTree (line 34) | class DecisionTree(object): method __init__ (line 48) | def __init__(self, min_samples_split=2, min_impurity=1e-7, method fit (line 66) | def fit(self, X, y, loss=None): method _build_tree (line 72) | def _build_tree(self, X, y, current_depth=0): method predict_value (line 137) | def predict_value(self, x, tree=None): method predict (line 162) | def predict(self, X): method print_tree (line 167) | def print_tree(self, tree=None, indent=" "): class XGBoostRegressionTree (line 188) | class XGBoostRegressionTree(DecisionTree): method _split (line 195) | def _split(self, y): method _gain (line 202) | def _gain(self, y, y_pred): method _gain_by_taylor (line 207) | def _gain_by_taylor(self, y, y1, y2): method _approximate_update (line 218) | def _approximate_update(self, y): method fit (line 228) | def fit(self, X, y): class RegressionTree (line 234) | class RegressionTree(DecisionTree): method _calculate_variance_reduction (line 235) | def _calculate_variance_reduction(self, y, y1, y2): method _mean_of_y (line 247) | def _mean_of_y(self, y): method fit (line 251) | def fit(self, X, y): class ClassificationTree (line 256) | class ClassificationTree(DecisionTree): method _calculate_information_gain (line 257) | def _calculate_information_gain(self, y, y1, y2): method _majority_vote (line 267) | def _majority_vote(self, y): method fit (line 278) | def fit(self, X, y): FILE: mlfromscratch/supervised_learning/gradient_boosting.py class GradientBoosting (line 13) | class GradientBoosting(object): method __init__ (line 34) | def __init__(self, n_estimators, learning_rate, min_samples_split, method fit (line 60) | def fit(self, X, y): method predict (line 70) | def predict(self, X): class GradientBoostingRegressor (line 86) | class GradientBoostingRegressor(GradientBoosting): method __init__ (line 87) | def __init__(self, n_estimators=200, learning_rate=0.5, min_samples_sp... class GradientBoostingClassifier (line 96) | class GradientBoostingClassifier(GradientBoosting): method __init__ (line 97) | def __init__(self, n_estimators=200, learning_rate=.5, min_samples_spl... method fit (line 106) | def fit(self, X, y): FILE: mlfromscratch/supervised_learning/k_nearest_neighbors.py class KNN (line 5) | class KNN(): method __init__ (line 14) | def __init__(self, k=5): method _vote (line 17) | def _vote(self, neighbor_labels): method predict (line 22) | def predict(self, X_test, X_train, y_train): FILE: mlfromscratch/supervised_learning/linear_discriminant_analysis.py class LDA (line 5) | class LDA(): method __init__ (line 9) | def __init__(self): method transform (line 12) | def transform(self, X, y): method fit (line 18) | def fit(self, X, y): method predict (line 37) | def predict(self, X): FILE: mlfromscratch/supervised_learning/logistic_regression.py class LogisticRegression (line 8) | class LogisticRegression(): method __init__ (line 19) | def __init__(self, learning_rate=.1, gradient_descent=True): method _initialize_parameters (line 25) | def _initialize_parameters(self, X): method fit (line 31) | def fit(self, X, y, n_iterations=4000): method predict (line 47) | def predict(self, X): FILE: mlfromscratch/supervised_learning/multi_class_lda.py class MultiClassLDA (line 7) | class MultiClassLDA(): method __init__ (line 19) | def __init__(self, solver="svd"): method _calculate_scatter_matrices (line 22) | def _calculate_scatter_matrices(self, X, y): method transform (line 45) | def transform(self, X, y, n_components): method plot_in_2d (line 66) | def plot_in_2d(self, X, y, title=None): FILE: mlfromscratch/supervised_learning/multilayer_perceptron.py class MultilayerPerceptron (line 10) | class MultilayerPerceptron(): method __init__ (line 23) | def __init__(self, n_hidden, n_iterations=3000, learning_rate=0.01): method _initialize_weights (line 31) | def _initialize_weights(self, X, y): method fit (line 43) | def fit(self, X, y): method predict (line 83) | def predict(self, X): function main (line 92) | def main(): FILE: mlfromscratch/supervised_learning/naive_bayes.py class NaiveBayes (line 7) | class NaiveBayes(): method fit (line 9) | def fit(self, X, y): method _calculate_likelihood (line 23) | def _calculate_likelihood(self, mean, var, x): method _calculate_prior (line 30) | def _calculate_prior(self, c): method _classify (line 36) | def _classify(self, sample): method predict (line 67) | def predict(self, X): FILE: mlfromscratch/supervised_learning/neuroevolution.py class Neuroevolution (line 5) | class Neuroevolution(): method __init__ (line 17) | def __init__(self, population_size, mutation_rate, model_builder): method _build_model (line 22) | def _build_model(self, id): method _initialize_population (line 31) | def _initialize_population(self): method _mutate (line 38) | def _mutate(self, individual, var=1): method _inherit_weights (line 50) | def _inherit_weights(self, child, parent): method _crossover (line 58) | def _crossover(self, parent1, parent2): method _calculate_fitness (line 78) | def _calculate_fitness(self): method evolve (line 85) | def evolve(self, X, y, n_generations): FILE: mlfromscratch/supervised_learning/particle_swarm_optimization.py class ParticleSwarmOptimizedNN (line 5) | class ParticleSwarmOptimizedNN(): method __init__ (line 24) | def __init__(self, population_size, method _build_model (line 40) | def _build_model(self, id): method _initialize_population (line 60) | def _initialize_population(self): method _update_weights (line 67) | def _update_weights(self, individual): method _calculate_fitness (line 92) | def _calculate_fitness(self, individual): method evolve (line 98) | def evolve(self, X, y, n_generations): FILE: mlfromscratch/supervised_learning/perceptron.py class Perceptron (line 13) | class Perceptron(): method __init__ (line 29) | def __init__(self, n_iterations=20000, activation_function=Sigmoid, lo... method fit (line 36) | def fit(self, X, y): method predict (line 59) | def predict(self, X): FILE: mlfromscratch/supervised_learning/random_forest.py class RandomForest (line 15) | class RandomForest(): method __init__ (line 33) | def __init__(self, n_estimators=100, max_features=None, min_samples_sp... method fit (line 51) | def fit(self, X, y): method predict (line 72) | def predict(self, X): FILE: mlfromscratch/supervised_learning/regression.py class l1_regularization (line 6) | class l1_regularization(): method __init__ (line 8) | def __init__(self, alpha): method __call__ (line 11) | def __call__(self, w): method grad (line 14) | def grad(self, w): class l2_regularization (line 17) | class l2_regularization(): method __init__ (line 19) | def __init__(self, alpha): method __call__ (line 22) | def __call__(self, w): method grad (line 25) | def grad(self, w): class l1_l2_regularization (line 28) | class l1_l2_regularization(): method __init__ (line 30) | def __init__(self, alpha, l1_ratio=0.5): method __call__ (line 34) | def __call__(self, w): method grad (line 39) | def grad(self, w): class Regression (line 44) | class Regression(object): method __init__ (line 54) | def __init__(self, n_iterations, learning_rate): method initialize_weights (line 58) | def initialize_weights(self, n_features): method fit (line 63) | def fit(self, X, y): method predict (line 80) | def predict(self, X): class LinearRegression (line 86) | class LinearRegression(Regression): method __init__ (line 98) | def __init__(self, n_iterations=100, learning_rate=0.001, gradient_des... method fit (line 105) | def fit(self, X, y): class LassoRegression (line 118) | class LassoRegression(Regression): method __init__ (line 135) | def __init__(self, degree, reg_factor, n_iterations=3000, learning_rat... method fit (line 141) | def fit(self, X, y): method predict (line 145) | def predict(self, X): class PolynomialRegression (line 149) | class PolynomialRegression(Regression): method __init__ (line 161) | def __init__(self, degree, n_iterations=3000, learning_rate=0.001): method fit (line 169) | def fit(self, X, y): method predict (line 173) | def predict(self, X): class RidgeRegression (line 177) | class RidgeRegression(Regression): method __init__ (line 191) | def __init__(self, reg_factor, n_iterations=1000, learning_rate=0.001): class PolynomialRidgeRegression (line 196) | class PolynomialRidgeRegression(Regression): method __init__ (line 211) | def __init__(self, degree, reg_factor, n_iterations=3000, learning_rat... method fit (line 217) | def fit(self, X, y): method predict (line 221) | def predict(self, X): class ElasticNet (line 225) | class ElasticNet(Regression): method __init__ (line 242) | def __init__(self, degree=1, reg_factor=0.05, l1_ratio=0.5, n_iteratio... method fit (line 249) | def fit(self, X, y): method predict (line 253) | def predict(self, X): FILE: mlfromscratch/supervised_learning/support_vector_machine.py class SupportVectorMachine (line 12) | class SupportVectorMachine(object): method __init__ (line 30) | def __init__(self, C=1, kernel=rbf_kernel, power=4, gamma=None, coef=4): method fit (line 41) | def fit(self, X, y): method predict (line 100) | def predict(self, X): FILE: mlfromscratch/supervised_learning/xgboost.py class LogisticLoss (line 13) | class LogisticLoss(): method __init__ (line 14) | def __init__(self): method loss (line 19) | def loss(self, y, y_pred): method gradient (line 25) | def gradient(self, y, y_pred): method hess (line 30) | def hess(self, y, y_pred): class XGBoost (line 35) | class XGBoost(object): method __init__ (line 54) | def __init__(self, n_estimators=200, learning_rate=0.001, min_samples_... method fit (line 78) | def fit(self, X, y): method predict (line 90) | def predict(self, X): FILE: mlfromscratch/unsupervised_learning/apriori.py class Rule (line 6) | class Rule(): method __init__ (line 7) | def __init__(self, antecedent, concequent, confidence, support): class Apriori (line 14) | class Apriori(): method __init__ (line 27) | def __init__(self, min_sup=0.3, min_conf=0.81): method _calculate_support (line 34) | def _calculate_support(self, itemset): method _get_frequent_itemsets (line 43) | def _get_frequent_itemsets(self, candidates): method _has_infrequent_itemsets (line 55) | def _has_infrequent_itemsets(self, candidate): method _generate_candidates (line 70) | def _generate_candidates(self, freq_itemset): method _transaction_contains_items (line 102) | def _transaction_contains_items(self, transaction, items): method find_frequent_itemsets (line 115) | def find_frequent_itemsets(self, transactions): method _rules_from_itemset (line 141) | def _rules_from_itemset(self, initial_itemset, itemset): method generate_rules (line 179) | def generate_rules(self, transactions): FILE: mlfromscratch/unsupervised_learning/autoencoder.py class Autoencoder (line 16) | class Autoencoder(): method __init__ (line 21) | def __init__(self): method build_encoder (line 40) | def build_encoder(self, optimizer, loss_function): method build_decoder (line 53) | def build_decoder(self, optimizer, loss_function): method train (line 67) | def train(self, n_epochs, batch_size=128, save_interval=50): method save_imgs (line 93) | def save_imgs(self, epoch, X): FILE: mlfromscratch/unsupervised_learning/dbscan.py class DBSCAN (line 6) | class DBSCAN(): method __init__ (line 18) | def __init__(self, eps=1, min_samples=5): method _get_neighbors (line 22) | def _get_neighbors(self, sample_i): method _expand_cluster (line 34) | def _expand_cluster(self, sample_i, neighbors): method _get_cluster_labels (line 57) | def _get_cluster_labels(self): method predict (line 69) | def predict(self, X): FILE: mlfromscratch/unsupervised_learning/dcgan.py class DCGAN (line 13) | class DCGAN(): method __init__ (line 14) | def __init__(self): method build_generator (line 39) | def build_generator(self, optimizer, loss_function): method build_discriminator (line 60) | def build_discriminator(self, optimizer, loss_function): method train (line 86) | def train(self, epochs, batch_size=128, save_interval=50): method save_imgs (line 149) | def save_imgs(self, epoch): FILE: mlfromscratch/unsupervised_learning/fp_growth.py class FPTreeNode (line 6) | class FPTreeNode(): method __init__ (line 7) | def __init__(self, item=None, support=1): class FPGrowth (line 17) | class FPGrowth(): method __init__ (line 29) | def __init__(self, min_sup=0.3): method _calculate_support (line 38) | def _calculate_support(self, item, transactions): method _get_frequent_items (line 47) | def _get_frequent_items(self, transactions): method _insert_tree (line 65) | def _insert_tree(self, node, children): method _construct_tree (line 82) | def _construct_tree(self, transactions, frequent_items=None): method print_tree (line 99) | def print_tree(self, node=None, indent_times=0): method _is_prefix (line 110) | def _is_prefix(self, itemset, node): method _determine_prefixes (line 120) | def _determine_prefixes(self, itemset, node, prefixes=None): method _get_itemset_key (line 141) | def _get_itemset_key(self, itemset): method _determine_frequent_itemsets (line 150) | def _determine_frequent_itemsets(self, conditional_database, suffix): method find_frequent_itemsets (line 185) | def find_frequent_itemsets(self, transactions, suffix=None, show_tree=... FILE: mlfromscratch/unsupervised_learning/gaussian_mixture_model.py class GaussianMixtureModel (line 10) | class GaussianMixtureModel(): method __init__ (line 24) | def __init__(self, k=2, max_iterations=2000, tolerance=1e-8): method _init_random_gaussians (line 33) | def _init_random_gaussians(self, X): method multivariate_gaussian (line 43) | def multivariate_gaussian(self, X, params): method _get_likelihoods (line 59) | def _get_likelihoods(self, X): method _expectation (line 69) | def _expectation(self, X): method _maximization (line 82) | def _maximization(self, X): method _converged (line 96) | def _converged(self, X): method predict (line 105) | def predict(self, X): FILE: mlfromscratch/unsupervised_learning/generative_adversarial_network.py class GAN (line 16) | class GAN(): method __init__ (line 22) | def __init__(self): method build_generator (line 46) | def build_generator(self, optimizer, loss_function): method build_discriminator (line 64) | def build_discriminator(self, optimizer, loss_function): method train (line 79) | def train(self, n_epochs, batch_size=128, save_interval=50): method save_imgs (line 143) | def save_imgs(self, epoch): FILE: mlfromscratch/unsupervised_learning/genetic_algorithm.py class GeneticAlgorithm (line 5) | class GeneticAlgorithm(): method __init__ (line 19) | def __init__(self, target_string, population_size, mutation_rate): method _initialize (line 25) | def _initialize(self): method _calculate_fitness (line 33) | def _calculate_fitness(self): method _mutate (line 48) | def _mutate(self, individual): method _crossover (line 59) | def _crossover(self, parent1, parent2): method run (line 67) | def run(self, iterations): FILE: mlfromscratch/unsupervised_learning/k_means.py class KMeans (line 6) | class KMeans(): method __init__ (line 20) | def __init__(self, k=2, max_iterations=500): method _init_random_centroids (line 24) | def _init_random_centroids(self, X): method _closest_centroid (line 33) | def _closest_centroid(self, sample, centroids): method _create_clusters (line 44) | def _create_clusters(self, centroids, X): method _calculate_centroids (line 53) | def _calculate_centroids(self, clusters, X): method _get_cluster_labels (line 62) | def _get_cluster_labels(self, clusters, X): method predict (line 71) | def predict(self, X): FILE: mlfromscratch/unsupervised_learning/partitioning_around_medoids.py class PAM (line 7) | class PAM(): method __init__ (line 19) | def __init__(self, k=2): method _init_random_medoids (line 22) | def _init_random_medoids(self, X): method _closest_medoid (line 31) | def _closest_medoid(self, sample, medoids): method _create_clusters (line 42) | def _create_clusters(self, X, medoids): method _calculate_cost (line 50) | def _calculate_cost(self, X, clusters, medoids): method _get_non_medoids (line 61) | def _get_non_medoids(self, X, medoids): method _get_cluster_labels (line 69) | def _get_cluster_labels(self, clusters, X): method predict (line 79) | def predict(self, X): FILE: mlfromscratch/unsupervised_learning/principal_component_analysis.py class PCA (line 6) | class PCA(): method transform (line 12) | def transform(self, X, n_components): FILE: mlfromscratch/unsupervised_learning/restricted_boltzmann_machine.py class RBM (line 11) | class RBM(): method __init__ (line 29) | def __init__(self, n_hidden=128, learning_rate=0.1, batch_size=10, n_i... method _initialize_weights (line 36) | def _initialize_weights(self, X): method fit (line 42) | def fit(self, X, y=None): method _sample (line 74) | def _sample(self, X): method reconstruct (line 77) | def reconstruct(self, X): FILE: mlfromscratch/utils/data_manipulation.py function shuffle_data (line 8) | def shuffle_data(X, y, seed=None): function batch_iterator (line 17) | def batch_iterator(X, y=None, batch_size=64): function divide_on_feature (line 28) | def divide_on_feature(X, feature_i, threshold): function polynomial_features (line 43) | def polynomial_features(X, degree): function get_random_subsets (line 61) | def get_random_subsets(X, y, n_subsets, replacements=True): function normalize (line 85) | def normalize(X, axis=-1, order=2): function standardize (line 92) | def standardize(X): function train_test_split (line 104) | def train_test_split(X, y, test_size=0.5, shuffle=True, seed=None): function k_fold_cross_validation_sets (line 117) | def k_fold_cross_validation_sets(X, y, k, shuffle=True): function to_categorical (line 148) | def to_categorical(x, n_col=None): function to_nominal (line 157) | def to_nominal(x): function make_diagonal (line 162) | def make_diagonal(x): FILE: mlfromscratch/utils/data_operation.py function calculate_entropy (line 7) | def calculate_entropy(y): function mean_squared_error (line 19) | def mean_squared_error(y_true, y_pred): function calculate_variance (line 25) | def calculate_variance(X): function calculate_std_dev (line 34) | def calculate_std_dev(X): function euclidean_distance (line 40) | def euclidean_distance(x1, x2): function accuracy_score (line 49) | def accuracy_score(y_true, y_pred): function calculate_covariance_matrix (line 55) | def calculate_covariance_matrix(X, Y=None): function calculate_correlation_matrix (line 65) | def calculate_correlation_matrix(X, Y=None): FILE: mlfromscratch/utils/kernels.py function linear_kernel (line 4) | def linear_kernel(**kwargs): function polynomial_kernel (line 10) | def polynomial_kernel(power, coef, **kwargs): function rbf_kernel (line 16) | def rbf_kernel(gamma, **kwargs): FILE: mlfromscratch/utils/misc.py class Plot (line 17) | class Plot(): method __init__ (line 18) | def __init__(self): method _transform (line 21) | def _transform(self, X, dim): method plot_regression (line 34) | def plot_regression(self, lines, title, axis_labels=None, mse=None, sc... method plot_in_2d (line 67) | def plot_in_2d(self, X, y=None, title=None, accuracy=None, legend_labe... method plot_in_3d (line 104) | def plot_in_3d(self, X, y=None):