MCPcopy Create free account

hub / github.com/Algo-Phantoms/Algo-ScriptML / functions

Functions183 in github.com/Algo-Phantoms/Algo-ScriptML

↓ 4 callersMethodhypothetical_function
(self)
Logistic Regression/Logistic_Regression_base.py:41
↓ 4 callersMethodpredict
(self, x)
Bayesian Regression/bayessian_regression.py:28
↓ 3 callersFunctionentropy
(y)
Random Forest/randomForest.py:4
↓ 3 callersMethodfit
(self, X)
K-Means/kmeans.py:58
↓ 3 callersMethodgini
(self, rows)
Decision Tree/decision_tree_implementation.py:86
↓ 3 callersMethodlearn
(self, x, y)
Bayesian Regression/bayessian_regression.py:14
↓ 3 callersFunctionprettify_ax
(ax)
Bayesian Regression/bayessian_regression.py:99
↓ 2 callersFunctionI
(flag)
Adaboost/adaboost_base_35.py:32
↓ 2 callersMethod__remove_outlier_by_zero
(self, x)
Preprocessing/standard_scaler.py:69
↓ 2 callersMethod_get_markov_edges
Returns the edges between two states. Args: matrix (pd.DataFrame): A matrix attribute of the model. Returns:
Hidden Markov Model/hmm.py:220
↓ 2 callersMethod_mutate
Randomly change the individual's characters with probability self.mutation_rate
Genetic Algorithm/genetic_algorithm.py:44
↓ 2 callersMethod_split
(self, X_column, split_thresh)
Random Forest/randomForest.py:96
↓ 2 callersMethodfit
(self, X, y)
Random Forest/randomForest.py:31
↓ 2 callersMethodforward
(x, w, b)
Linear Regression/Linear_Regression.py:23
↓ 2 callersMethodgenerate_Lk_from_Ck
(self, Ck)
Apriori/apriori.py:77
↓ 2 callersMethodinitialize
(m)
Linear Regression/Linear_Regression.py:56
↓ 2 callersMethodis_numeric
(self, value)
Decision Tree/decision_tree_implementation.py:215
↓ 2 callersMethodmatch
(self, example)
Decision Tree/decision_tree_implementation.py:197
↓ 2 callersMethodnormalize
(df)
Linear Regression/Linear_Regression.py:47
↓ 2 callersMethodnormalize_array
(array)
Lowess Regression/lowessregression.py:61
↓ 2 callersFunctionpairwise_distances
(X, Y)
Spectral Clustering/spectral_clustering.py:25
↓ 2 callersMethodpartition
(self, rows, question)
Decision Tree/decision_tree_implementation.py:13
↓ 2 callersMethodpredict
(self, X)
Random Forest/randomForest.py:35
↓ 2 callersFunctionsample
(n)
Bayesian Regression/bayessian_regression.py:74
↓ 1 callersMethodGaussian_distribution
X: value of feature mean: the average value of feature stdev: the standard deviation of feature The function retu
Naive Bayes/naive_bayes.py:65
↓ 1 callersMethod__remove_outlier_by_one
(self, x)
Preprocessing/min_max_scaler.py:81
↓ 1 callersMethod__remove_outlier_by_zero
(self, x)
Preprocessing/min_max_scaler.py:78
↓ 1 callersMethod_best_criteria
(self, X, y, feat_idxs)
Random Forest/randomForest.py:60
↓ 1 callersMethod_calculate_fitness
Calculates the fitness of each individual in the population
Genetic Algorithm/genetic_algorithm.py:31
↓ 1 callersMethod_calculate_stationary_distribution
Calculates the initial stationary distribution for the model. Returns: stationary (np.array): The stationary distribution.
Hidden Markov Model/hmm.py:206
↓ 1 callersMethod_crossover
Create children from parents by crossover
Genetic Algorithm/genetic_algorithm.py:53
↓ 1 callersMethod_denormalize_y
(self, value)
Lowess Regression/lowessregression.py:57
↓ 1 callersMethod_get_min_range
(self, distances)
Lowess Regression/lowessregression.py:20
↓ 1 callersMethod_get_weights
(self, distances, min_range)
Lowess Regression/lowessregression.py:49
↓ 1 callersMethod_grow_tree
(self, X, y, depth=0)
Random Forest/randomForest.py:38
↓ 1 callersMethod_information_gain
(self, y, X_column, split_thresh)
Random Forest/randomForest.py:76
↓ 1 callersMethod_initialize
Initialize population with random strings
Genetic Algorithm/genetic_algorithm.py:24
↓ 1 callersMethod_mean_squared_error
Input parameters: y --> array, true values y_hat --> array, predicted values Returns: float, error
Multiple Linear Regression/multiple_linear_regression_implementation.py:18
↓ 1 callersMethod_most_common_label
(self, y)
Random Forest/randomForest.py:109
↓ 1 callersMethod_normalize_x
(self, value)
Lowess Regression/lowessregression.py:54
↓ 1 callersMethod_traverse_tree
(self, x, node)
Random Forest/randomForest.py:101
↓ 1 callersFunctionaccuracy
(y_true, y_pred)
Random Forest/randomForestTest.py:7
↓ 1 callersMethodaccuracy
(y_true, y_pred)
Perceptron/perceptron_training.py:41
↓ 1 callersMethodbackward
Runs the Backward Algorithm. Args: input_seq (list): A list of the observed input sequence. Returns: beta (n
Hidden Markov Model/hmm.py:122
↓ 1 callersMethodbackward
(y_pred, y, x, n)
Linear Regression/Linear_Regression.py:33
↓ 1 callersFunctionbootstrap_sample
(X, y)
Random Forest/randomForest.py:114
↓ 1 callersMethodbuild_tree
(self, rows)
Decision Tree/decision_tree_implementation.py:22
↓ 1 callersFunctioncapitalized_word
(first_word)
Markov's Chain/Markov's-Chain.py:87
↓ 1 callersMethodclass_counts
(self, rows)
Decision Tree/decision_tree_implementation.py:149
↓ 1 callersMethodclass_counts
(self, rows)
Decision Tree/decision_tree_implementation.py:168
↓ 1 callersMethodclassify
See the 'rules of recursion' above.
Decision Tree/decision_tree_implementation.py:129
↓ 1 callersFunctioncluster_distance_metric
Metric to evaluate how close points in the clusters are to their centroid Returns sum of all distances of points to their corresponding cen
Spectral Clustering/spectral_clustering.py:134
↓ 1 callersMethodcompute_cost
(self)
Logistic Regression/Logistic_Regression_base.py:47
↓ 1 callersMethodcompute_cost
(y_pred, y, n)
Linear Regression/Linear_Regression.py:28
↓ 1 callersFunctioncompute_laplacian
(W)
Spectral Clustering/spectral_clustering.py:73
↓ 1 callersMethodcreate_C1
(self)
Apriori/apriori.py:36
↓ 1 callersMethodcreate_Ck
(self, Lksub1, k)
Apriori/apriori.py:46
↓ 1 callersFunctiondist
(x1,x2)
K Nearest Neighbors/k-nearest neighbors (KNN).py:5
↓ 1 callersMethoddistance
(self, point)
K-Means/kmeans.py:47
↓ 1 callersMethoddivide_classes
X: list of features Y: list consisting of target The function returns: A dictionary with Y as keys and assigned X as value
Naive Bayes/naive_bayes.py:14
↓ 1 callersMethodexpectation_step
Here we calculate the value of ⲅ. For simplicity, we just calculate the denominator as a sum over all terms in the numerator, and then as
Gaussian Mixture Model/GaussianMixtureModel.py:43
↓ 1 callersMethodfind_best_split
(self, rows)
Decision Tree/decision_tree_implementation.py:51
↓ 1 callersMethodfit
(self,x,y)
Adaboost/adaboost_base_35.py:49
↓ 1 callersMethodfit
(self, x, *args)
Preprocessing/min_max_scaler.py:34
↓ 1 callersMethodfit
(self, x, *args)
Preprocessing/standard_scaler.py:26
↓ 1 callersMethodfit
(self, X, y)
Perceptron/perceptron_training.py:19
↓ 1 callersMethodforward
Runs the Forward Algorithm. Args: input_seq (list): A list of the observed input sequence. Returns: alpha (n
Hidden Markov Model/hmm.py:91
↓ 1 callersMethodgaussian
here we implement the Gaussian Density function
Gaussian Mixture Model/GaussianMixtureModel.py:11
↓ 1 callersMethodgenerate_L
(self)
Apriori/apriori.py:102
↓ 1 callersFunctionget_eigvecs
Calculate Eigenvalues and EigenVectors of the Laplacian Matrix. Return k eigenvectors corresponding to the smallest k eigenvalues. Use
Spectral Clustering/spectral_clustering.py:82
↓ 1 callersMethodget_likelihood
(self, X, clusters)
Gaussian Mixture Model/GaussianMixtureModel.py:97
↓ 1 callersMethodgradient_descent
(self)
stochastic gradient descent/stochastic_gradient_descent_algo.py:42
↓ 1 callersMethodgradient_descent
(self)
Logistic Regression/Logistic_Regression_base.py:56
↓ 1 callersMethodinfo
X: list of features The function returns: A dictionary with standard deviation and mean as keys and assigned features as values.
Naive Bayes/naive_bayes.py:33
↓ 1 callersMethodinfo_gain
(self, left, right, current_uncertainty)
Decision Tree/decision_tree_implementation.py:97
↓ 1 callersMethodinitialize_clusters
This is the initialization step of the GMM. At this point, we must initialise our parameters μk, πk and Σk. Here we'll be using results of KMeans as
Gaussian Mixture Model/GaussianMixtureModel.py:19
↓ 1 callersMethodis_leaf_node
(self)
Random Forest/randomForest.py:19
↓ 1 callersFunctionk_means_clustering
(X, k)
Spectral Clustering/spectral_clustering.py:141
↓ 1 callersFunctionk_means_pass
Run a single pass of K-Means X: Input data nxm matrix. n samples, m features per sample. k: Number of required clusters.
Spectral Clustering/spectral_clustering.py:98
↓ 1 callersFunctionmake_pairs
(corpus)
Markov's Chain/Markov's-Chain.py:46
↓ 1 callersMethodmaximization_step
Here the value of parameters μk, πk and Σk are updated
Gaussian Mixture Model/GaussianMixtureModel.py:70
↓ 1 callersFunctionmost_common_label
(y)
Random Forest/randomForest.py:119
↓ 1 callersFunctionnearest_neighbor_graph
Calculates nearest neighbor adjacency graph.
Spectral Clustering/spectral_clustering.py:39
↓ 1 callersMethodpredict
X.shape = (m,n) where, m = number of training examples n = number of features
Lasso Regression/Lasso_Regression.py:57
↓ 1 callersMethodpredict
(self,x)
Adaboost/adaboost_base_35.py:67
↓ 1 callersMethodpredict
(self,x)
Elastic Net/Elastic_Net_Regression.py:58
↓ 1 callersMethodpredict
(self, X)
Perceptron/perceptron_training.py:33
↓ 1 callersMethodprint_leaf
A nicer way to print the predictions at a leaf.
Decision Tree/decision_tree_implementation.py:121
↓ 1 callersMethodprint_model_info
Prints the model in a readable manner.
Hidden Markov Model/hmm.py:39
↓ 1 callersMethodprint_tree
World's most elegant tree printing function.
Decision Tree/decision_tree_implementation.py:102
↓ 1 callersMethodtransform
(self, x, *args)
Preprocessing/min_max_scaler.py:44
↓ 1 callersMethodtransform
(self, x, *args)
Preprocessing/standard_scaler.py:36
↓ 1 callersMethodtricubic
(x)
Lowess Regression/lowessregression.py:43
↓ 1 callersMethodupdate
(w, b, dw, db, lr)
Linear Regression/Linear_Regression.py:41
↓ 1 callersMethodupdate_weights
(self)
Elastic Net/Elastic_Net_Regression.py:42
↓ 1 callersMethodupdating_weights
updating weights using gradient descent
Lasso Regression/Lasso_Regression.py:39
↓ 1 callersMethodvisualize_model
Creates a transition and emission graph of the model. Args: output_dir (str): A directory will be created with this name. If the
Hidden Markov Model/hmm.py:49
↓ 1 callersMethodviterbi
Runs the Viterbi Algorithm. Args: input_seq (list): A list of the observed input sequence. Returns: path (np
Hidden Markov Model/hmm.py:155
↓ 1 callersMethodweight_updation
(self)
Elastic Net/Elastic_Net_Regression.py:38
Method__init__
(self,input_size,layers,output_size)
Neural Network/neural_network.py:14
next →1–100 of 183, ranked by callers