Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devAmoghS/Machine-Learning-with-Python
/ functions
Functions
274 in github.com/devAmoghS/Machine-Learning-with-Python
⨍
Functions
274
◇
Types & classes
2
↓ 21 callers
Function
dot
v_1 * w_1 + ... + v_n * w_n
helpers/linear_algebra.py:35
↓ 12 callers
Function
normal_cdf
(x, mu=0, sigma=1.0)
helpers/probabilty.py:40
↓ 10 callers
Function
shape
(A)
helpers/linear_algebra.py:62
↓ 9 callers
Function
random_normal
returns a random draw from a standard normal distribution
working_with_data/utils.py:42
↓ 8 callers
Function
mean
(x)
helpers/stats.py:40
↓ 7 callers
Function
get_column
(A, j)
helpers/linear_algebra.py:72
↓ 7 callers
Function
make_matrix
returns a num_rows x num_cols matrix whose (i,j)-th entry is entry_fn(i, j)
helpers/linear_algebra.py:76
↓ 7 callers
Function
standard_deviation
(x)
helpers/stats.py:94
↓ 7 callers
Function
train_test_split
(x, y, test_pct)
helpers/machine_learning.py:16
↓ 6 callers
Function
correlation
(x, y)
helpers/stats.py:130
↓ 6 callers
Function
describe_data
(data, name)
hparams_grid_search_keras_nn.py:20
↓ 6 callers
Function
logistic
(x)
logistic_regression/utils.py:7
↓ 6 callers
Function
quantile
returns the pth-percentile value in x
helpers/stats.py:60
↓ 5 callers
Function
classify
classify the input using the given decision tree
decision_trees/utils.py:53
↓ 5 callers
Function
de_mean
translate x by subtracting its mean (so the result has mean 0)
helpers/stats.py:81
↓ 5 callers
Function
distance
(v, w)
helpers/linear_algebra.py:53
↓ 5 callers
Function
picker
returns a function that picks a field out of a dict
working_with_data/utils.py:165
↓ 5 callers
Function
scalar_multiply
(c, v)
helpers/linear_algebra.py:24
↓ 5 callers
Function
to_terminal
Create a terminal node value
sonar_clf_rf.py:149
↓ 4 callers
Function
direction
(w)
working_with_data/utils.py:240
↓ 4 callers
Function
error
(alpha, beta, x_i, y_i)
simple_linear_regression/utils.py:8
↓ 4 callers
Function
error
(x_i, y_i, beta)
multiple_regression/utils.py:14
↓ 4 callers
Function
get_values
returns the value in this cluster (if it's a leaf cluster) or all the values in the leaf clusters below it (if it's not)
k_means_clustering/utils.py:87
↓ 4 callers
Function
inverse_normal_cdf
find approximate inverse using binary search
helpers/probabilty.py:54
↓ 4 callers
Function
minimize_stochastic
(target_fn, gradient_fn, x, y, theta_0, alpha_0=0.01)
helpers/gradient_descent.py:129
↓ 4 callers
Function
normal_pdf
(x, mu=0, sigma=1.0)
helpers/probabilty.py:25
↓ 4 callers
Function
p_value
(beta_hat_j, sigma_hat_j)
multiple_regression/utils.py:64
↓ 4 callers
Method
train
choose k random points as the initial means
k_means_clustering/utils.py:19
↓ 4 callers
Function
two_sided_p_value
(x, mu=0, sigma=1)
hypothesis_inference.py:68
↓ 3 callers
Function
bootstrap_statistic
evaluates stats_fn on num_samples bootstrap samples from data
multiple_regression/utils.py:53
↓ 3 callers
Function
estimate_beta
(x, y)
multiple_regression/utils.py:33
↓ 3 callers
Function
feed_forward
takes in a neural network (represented as a list of lists of lists of weights) and returns the output from forward-propagating the input
neural_network/utils.py:26
↓ 3 callers
Function
get_split
This method selects the best split for the dataset
sonar_clf_rf.py:127
↓ 3 callers
Function
is_leaf
a cluster is a leaf if it has length 1
k_means_clustering/utils.py:73
↓ 3 callers
Function
predict
(input)
neural_network/model.py:41
↓ 3 callers
Function
roll_a_die
()
natural_language_processing/utils.py:116
↓ 3 callers
Function
scale
(data_matrix)
working_with_data/utils.py:207
↓ 3 callers
Function
squared_distance
(v, w)
helpers/linear_algebra.py:49
↓ 3 callers
Function
sum_of_squares
v_1 * v_1 + ... + v_n * v_n
helpers/linear_algebra.py:40
↓ 3 callers
Function
vector_subtract
subtracts two vectors componentwise
helpers/linear_algebra.py:15
↓ 2 callers
Function
a_b_test_statistic
(N_A, n_A, N_B, n_B)
hypothesis_inference.py:121
↓ 2 callers
Function
accuracy_score
This method predicts the accuracy percentage
sonar_clf_rf.py:56
↓ 2 callers
Function
bottom_up_cluster
(inputs, distance_agg=min)
k_means_clustering/utils.py:113
↓ 2 callers
Function
cosine_similarity
(v, w)
recommender_systems/utils.py:7
↓ 2 callers
Function
covariance
(x, y)
helpers/stats.py:125
↓ 2 callers
Function
directional_variance_gradient_i
the contribution of row x_i to the gradient of the direction-w variance
working_with_data/utils.py:255
↓ 2 callers
Function
directional_variance_i
the variance of the row x_i in the direction w
working_with_data/utils.py:245
↓ 2 callers
Function
display_topics
(model, feature_names, num_top_words)
LDA scikit-learn/displaytopics.py:5
↓ 2 callers
Function
estimated_parameters
(N, n)
hypothesis_inference.py:115
↓ 2 callers
Function
generate_clusters
(base_cluster, num_clusters)
k_means_clustering/utils.py:138
↓ 2 callers
Function
get_children
returns the two children of this cluster if it's a merged cluster; raises an Exception if this is a leaf cluster
k_means_clustering/utils.py:78
↓ 2 callers
Function
group_by
(grouper, rows, value_transform=None)
working_with_data/utils.py:175
↓ 2 callers
Function
intersection_over_union
(gt_box, pred_box)
prec_rec_curve.py:111
↓ 2 callers
Function
is_terminal
(token)
natural_language_processing/utils.py:83
↓ 2 callers
Function
knn_classify
each labeled point should be a pair (point, label)
k_nearest_neighbors/utils.py:30
↓ 2 callers
Function
magnitude
(v)
helpers/linear_algebra.py:45
↓ 2 callers
Function
maximize_batch
(target_fn, gradient_fn, theta_0, tolerance=0.000001)
helpers/gradient_descent.py:109
↓ 2 callers
Function
maximize_stochastic
(target_fn, gradient_fn, x, y, theta_0, alpha_0=0.01)
helpers/gradient_descent.py:159
↓ 2 callers
Function
minimize_batch
use gradient descent to find theta that minimizes target function
helpers/gradient_descent.py:74
↓ 2 callers
Function
most_similar_interests_to
(interest_similarities, interest_id, unique_interests)
recommender_systems/utils.py:25
↓ 2 callers
Function
most_similar_users_to
(user_similarities, user_id)
recommender_systems/utils.py:16
↓ 2 callers
Function
multiple_r_squared
(x, y, beta)
multiple_regression/utils.py:42
↓ 2 callers
Function
negate
return a function that for any input x returns -f(x)
helpers/gradient_descent.py:99
↓ 2 callers
Function
negate_all
the same when f returns a list of numbers
helpers/gradient_descent.py:104
↓ 2 callers
Function
normal_approximation_to_binomial
finds mu and sigma corresponding to a Binomial(n, p)
hypothesis_inference.py:5
↓ 2 callers
Function
normal_probability_between
(lo, hi, mu=0, sigma=1)
hypothesis_inference.py:28
↓ 2 callers
Function
normal_two_sided_bounds
returns the symmetric (about the mean) bounds that contain the specified probability
hypothesis_inference.py:54
↓ 2 callers
Function
normal_upper_bound
returns the z for which P(Z <= z) = probability
hypothesis_inference.py:44
↓ 2 callers
Function
not_the_same
(user, other_user)
friendster_network.py:63
↓ 2 callers
Function
number_of_friends
(user)
friendster_network.py:32
↓ 2 callers
Function
partition_by
returns a dict of inputs partitioned by the attribute each input is a pair (attribute_dict, label)
decision_trees/utils.py:41
↓ 2 callers
Function
partition_entropy_by
computes the entropy corresponding to the given partition
decision_trees/utils.py:47
↓ 2 callers
Function
patch
return a matplotlib 'patch' object with the specified location, crosshatch pattern, and color
neural_network/utils.py:68
↓ 2 callers
Function
plot_histogram
(points, bucket_size, title="")
working_with_data/utils.py:23
↓ 2 callers
Function
plot_state_borders
(plt)
k_nearest_neighbors/utils.py:44
↓ 2 callers
Function
precision
(tp, fp)
helpers/machine_learning.py:34
↓ 2 callers
Function
precision_recall_curve
(y_true, pred_scores, thresholds)
prec_rec_curve.py:47
↓ 2 callers
Function
random_kid
()
helpers/probabilty.py:7
↓ 2 callers
Function
random_point
(dim)
k_nearest_neighbors/utils.py:102
↓ 2 callers
Function
recall
(tp, fn)
helpers/machine_learning.py:38
↓ 2 callers
Function
rescale
rescales the input data so that each column has mean 0 and standard deviation 1 ignores columns with no deviation
working_with_data/utils.py:216
↓ 2 callers
Function
step
move step_size in the direction from v
helpers/gradient_descent.py:46
↓ 2 callers
Function
sum_of_squares
computes the sum of squared elements in v
helpers/gradient_descent.py:6
↓ 2 callers
Function
tokenise
Tokenise message into distinct words
naive_bayes_classfier/utils.py:6
↓ 2 callers
Function
transform_vector
(v, components)
working_with_data/utils.py:311
↓ 2 callers
Function
try_or_none
wraps f to return None if f raises an exception assumes f takes only one input
working_with_data/utils.py:131
↓ 2 callers
Function
variance
assumes x has at least two elements
helpers/stats.py:87
↓ 2 callers
Function
vector_sum
(vectors)
helpers/linear_algebra.py:20
↓ 1 callers
Function
B
a normalizing constant so that the total probability is 1
hypothesis_inference.py:133
↓ 1 callers
Function
accuracy
(tp, fp, fn, tn)
helpers/machine_learning.py:28
↓ 1 callers
Function
backpropagate
(network, input_vector, target)
neural_network/utils.py:45
↓ 1 callers
Function
bagging_predict
This method makes a prediction a list of bagged trees
sonar_clf_rf.py:214
↓ 1 callers
Function
bernoulli_trial
(p)
helpers/probabilty.py:79
↓ 1 callers
Function
binomial
(p, n)
helpers/probabilty.py:83
↓ 1 callers
Function
bootstrap_sample
randomly samples len(data) elements with replacement
multiple_regression/utils.py:48
↓ 1 callers
Function
bucketize
floor the point to the next lower multiple of bucket_size
working_with_data/utils.py:13
↓ 1 callers
Function
build_tree
This method builds a decision tree
sonar_clf_rf.py:183
↓ 1 callers
Function
build_tree_id3
(inputs, split_candidates=None)
decision_trees/utils.py:72
↓ 1 callers
Function
choose_new_topic
(d, word)
natural_language_processing/utils.py:200
↓ 1 callers
Function
class_probabilities
(labels)
decision_trees/utils.py:11
next →
1–100 of 274, ranked by callers