Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Algo-Phantoms/Algo-ScriptML
/ functions
Functions
183 in github.com/Algo-Phantoms/Algo-ScriptML
⨍
Functions
183
◇
Types & classes
31
↓ 4 callers
Method
hypothetical_function
(self)
Logistic Regression/Logistic_Regression_base.py:41
↓ 4 callers
Method
predict
(self, x)
Bayesian Regression/bayessian_regression.py:28
↓ 3 callers
Function
entropy
(y)
Random Forest/randomForest.py:4
↓ 3 callers
Method
fit
(self, X)
K-Means/kmeans.py:58
↓ 3 callers
Method
gini
(self, rows)
Decision Tree/decision_tree_implementation.py:86
↓ 3 callers
Method
learn
(self, x, y)
Bayesian Regression/bayessian_regression.py:14
↓ 3 callers
Function
prettify_ax
(ax)
Bayesian Regression/bayessian_regression.py:99
↓ 2 callers
Function
I
(flag)
Adaboost/adaboost_base_35.py:32
↓ 2 callers
Method
__remove_outlier_by_zero
(self, x)
Preprocessing/standard_scaler.py:69
↓ 2 callers
Method
_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 callers
Method
_mutate
Randomly change the individual's characters with probability self.mutation_rate
Genetic Algorithm/genetic_algorithm.py:44
↓ 2 callers
Method
_split
(self, X_column, split_thresh)
Random Forest/randomForest.py:96
↓ 2 callers
Method
fit
(self, X, y)
Random Forest/randomForest.py:31
↓ 2 callers
Method
forward
(x, w, b)
Linear Regression/Linear_Regression.py:23
↓ 2 callers
Method
generate_Lk_from_Ck
(self, Ck)
Apriori/apriori.py:77
↓ 2 callers
Method
initialize
(m)
Linear Regression/Linear_Regression.py:56
↓ 2 callers
Method
is_numeric
(self, value)
Decision Tree/decision_tree_implementation.py:215
↓ 2 callers
Method
match
(self, example)
Decision Tree/decision_tree_implementation.py:197
↓ 2 callers
Method
normalize
(df)
Linear Regression/Linear_Regression.py:47
↓ 2 callers
Method
normalize_array
(array)
Lowess Regression/lowessregression.py:61
↓ 2 callers
Function
pairwise_distances
(X, Y)
Spectral Clustering/spectral_clustering.py:25
↓ 2 callers
Method
partition
(self, rows, question)
Decision Tree/decision_tree_implementation.py:13
↓ 2 callers
Method
predict
(self, X)
Random Forest/randomForest.py:35
↓ 2 callers
Function
sample
(n)
Bayesian Regression/bayessian_regression.py:74
↓ 1 callers
Method
Gaussian_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 callers
Method
__remove_outlier_by_one
(self, x)
Preprocessing/min_max_scaler.py:81
↓ 1 callers
Method
__remove_outlier_by_zero
(self, x)
Preprocessing/min_max_scaler.py:78
↓ 1 callers
Method
_best_criteria
(self, X, y, feat_idxs)
Random Forest/randomForest.py:60
↓ 1 callers
Method
_calculate_fitness
Calculates the fitness of each individual in the population
Genetic Algorithm/genetic_algorithm.py:31
↓ 1 callers
Method
_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 callers
Method
_crossover
Create children from parents by crossover
Genetic Algorithm/genetic_algorithm.py:53
↓ 1 callers
Method
_denormalize_y
(self, value)
Lowess Regression/lowessregression.py:57
↓ 1 callers
Method
_get_min_range
(self, distances)
Lowess Regression/lowessregression.py:20
↓ 1 callers
Method
_get_weights
(self, distances, min_range)
Lowess Regression/lowessregression.py:49
↓ 1 callers
Method
_grow_tree
(self, X, y, depth=0)
Random Forest/randomForest.py:38
↓ 1 callers
Method
_information_gain
(self, y, X_column, split_thresh)
Random Forest/randomForest.py:76
↓ 1 callers
Method
_initialize
Initialize population with random strings
Genetic Algorithm/genetic_algorithm.py:24
↓ 1 callers
Method
_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 callers
Method
_most_common_label
(self, y)
Random Forest/randomForest.py:109
↓ 1 callers
Method
_normalize_x
(self, value)
Lowess Regression/lowessregression.py:54
↓ 1 callers
Method
_traverse_tree
(self, x, node)
Random Forest/randomForest.py:101
↓ 1 callers
Function
accuracy
(y_true, y_pred)
Random Forest/randomForestTest.py:7
↓ 1 callers
Method
accuracy
(y_true, y_pred)
Perceptron/perceptron_training.py:41
↓ 1 callers
Method
backward
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 callers
Method
backward
(y_pred, y, x, n)
Linear Regression/Linear_Regression.py:33
↓ 1 callers
Function
bootstrap_sample
(X, y)
Random Forest/randomForest.py:114
↓ 1 callers
Method
build_tree
(self, rows)
Decision Tree/decision_tree_implementation.py:22
↓ 1 callers
Function
capitalized_word
(first_word)
Markov's Chain/Markov's-Chain.py:87
↓ 1 callers
Method
class_counts
(self, rows)
Decision Tree/decision_tree_implementation.py:149
↓ 1 callers
Method
class_counts
(self, rows)
Decision Tree/decision_tree_implementation.py:168
↓ 1 callers
Method
classify
See the 'rules of recursion' above.
Decision Tree/decision_tree_implementation.py:129
↓ 1 callers
Function
cluster_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 callers
Method
compute_cost
(self)
Logistic Regression/Logistic_Regression_base.py:47
↓ 1 callers
Method
compute_cost
(y_pred, y, n)
Linear Regression/Linear_Regression.py:28
↓ 1 callers
Function
compute_laplacian
(W)
Spectral Clustering/spectral_clustering.py:73
↓ 1 callers
Method
create_C1
(self)
Apriori/apriori.py:36
↓ 1 callers
Method
create_Ck
(self, Lksub1, k)
Apriori/apriori.py:46
↓ 1 callers
Function
dist
(x1,x2)
K Nearest Neighbors/k-nearest neighbors (KNN).py:5
↓ 1 callers
Method
distance
(self, point)
K-Means/kmeans.py:47
↓ 1 callers
Method
divide_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 callers
Method
expectation_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 callers
Method
find_best_split
(self, rows)
Decision Tree/decision_tree_implementation.py:51
↓ 1 callers
Method
fit
(self,x,y)
Adaboost/adaboost_base_35.py:49
↓ 1 callers
Method
fit
(self, x, *args)
Preprocessing/min_max_scaler.py:34
↓ 1 callers
Method
fit
(self, x, *args)
Preprocessing/standard_scaler.py:26
↓ 1 callers
Method
fit
(self, X, y)
Perceptron/perceptron_training.py:19
↓ 1 callers
Method
forward
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 callers
Method
gaussian
here we implement the Gaussian Density function
Gaussian Mixture Model/GaussianMixtureModel.py:11
↓ 1 callers
Method
generate_L
(self)
Apriori/apriori.py:102
↓ 1 callers
Function
get_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 callers
Method
get_likelihood
(self, X, clusters)
Gaussian Mixture Model/GaussianMixtureModel.py:97
↓ 1 callers
Method
gradient_descent
(self)
stochastic gradient descent/stochastic_gradient_descent_algo.py:42
↓ 1 callers
Method
gradient_descent
(self)
Logistic Regression/Logistic_Regression_base.py:56
↓ 1 callers
Method
info
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 callers
Method
info_gain
(self, left, right, current_uncertainty)
Decision Tree/decision_tree_implementation.py:97
↓ 1 callers
Method
initialize_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 callers
Method
is_leaf_node
(self)
Random Forest/randomForest.py:19
↓ 1 callers
Function
k_means_clustering
(X, k)
Spectral Clustering/spectral_clustering.py:141
↓ 1 callers
Function
k_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 callers
Function
make_pairs
(corpus)
Markov's Chain/Markov's-Chain.py:46
↓ 1 callers
Method
maximization_step
Here the value of parameters μk, πk and Σk are updated
Gaussian Mixture Model/GaussianMixtureModel.py:70
↓ 1 callers
Function
most_common_label
(y)
Random Forest/randomForest.py:119
↓ 1 callers
Function
nearest_neighbor_graph
Calculates nearest neighbor adjacency graph.
Spectral Clustering/spectral_clustering.py:39
↓ 1 callers
Method
predict
X.shape = (m,n) where, m = number of training examples n = number of features
Lasso Regression/Lasso_Regression.py:57
↓ 1 callers
Method
predict
(self,x)
Adaboost/adaboost_base_35.py:67
↓ 1 callers
Method
predict
(self,x)
Elastic Net/Elastic_Net_Regression.py:58
↓ 1 callers
Method
predict
(self, X)
Perceptron/perceptron_training.py:33
↓ 1 callers
Method
print_leaf
A nicer way to print the predictions at a leaf.
Decision Tree/decision_tree_implementation.py:121
↓ 1 callers
Method
print_model_info
Prints the model in a readable manner.
Hidden Markov Model/hmm.py:39
↓ 1 callers
Method
print_tree
World's most elegant tree printing function.
Decision Tree/decision_tree_implementation.py:102
↓ 1 callers
Method
transform
(self, x, *args)
Preprocessing/min_max_scaler.py:44
↓ 1 callers
Method
transform
(self, x, *args)
Preprocessing/standard_scaler.py:36
↓ 1 callers
Method
tricubic
(x)
Lowess Regression/lowessregression.py:43
↓ 1 callers
Method
update
(w, b, dw, db, lr)
Linear Regression/Linear_Regression.py:41
↓ 1 callers
Method
update_weights
(self)
Elastic Net/Elastic_Net_Regression.py:42
↓ 1 callers
Method
updating_weights
updating weights using gradient descent
Lasso Regression/Lasso_Regression.py:39
↓ 1 callers
Method
visualize_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 callers
Method
viterbi
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 callers
Method
weight_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