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
↓ 1 callers
Method
classify
return the index of cluster closest to the input
k_means_clustering/utils.py:14
↓ 1 callers
Method
classify
(self, message)
naive_bayes_classfier/naivebayesclassifier.py:22
↓ 1 callers
Function
cluster_distance
finds the aggregate distance between elements of cluster1 and elements of cluster2
k_means_clustering/utils.py:98
↓ 1 callers
Function
count_words
training set consists of parts (meesage, is_spam)
naive_bayes_classfier/utils.py:13
↓ 1 callers
Function
cross_validation_split
This method splits a dataset into k folds
sonar_clf_rf.py:40
↓ 1 callers
Function
data_entropy
(labeled_data)
decision_trees/utils.py:17
↓ 1 callers
Function
data_range
(x)
helpers/stats.py:77
↓ 1 callers
Function
de_mean_matrix
returns the result of subtracting from every value in A the mean value of its column. the resulting matrix has mean 0 in every column
working_with_data/utils.py:232
↓ 1 callers
Function
difference_quotient
(f, x, h)
helpers/gradient_descent.py:11
↓ 1 callers
Function
direct_sample
()
natural_language_processing/utils.py:120
↓ 1 callers
Function
entropy
given a list of class probabilities, compute the entropy
decision_trees/utils.py:6
↓ 1 callers
Function
entry_fn
(i, j)
helpers/linear_algebra.py:110
↓ 1 callers
Function
estimate_beta_ridge
use gradient descent to fit a ridge regression with penalty alpha
multiple_regression/utils.py:99
↓ 1 callers
Function
evaluate_algorithm
This method evaluates the algorithm using a cross validation split
sonar_clf_rf.py:66
↓ 1 callers
Function
expand
(grammar, tokens)
natural_language_processing/utils.py:87
↓ 1 callers
Function
f1_score
(tp, fp, fn)
helpers/machine_learning.py:42
↓ 1 callers
Function
farness
the sum of the lengths of the shortest paths to each other user
network_analysis/utils.py:83
↓ 1 callers
Function
find_eigenvector
(A, tolerance=0.00001)
network_analysis/utils.py:125
↓ 1 callers
Function
first_principal_component
(X)
working_with_data/utils.py:266
↓ 1 callers
Function
fix_unicode
(text)
natural_language_processing/utils.py:34
↓ 1 callers
Function
friends_of_friend_ids
(user)
friendster_network.py:73
↓ 1 callers
Function
friends_of_friend_ids_bad
(user)
friendster_network.py:52
↓ 1 callers
Function
get_row
(A, i)
helpers/linear_algebra.py:68
↓ 1 callers
Function
get_subject_data
(path)
naive_bayes_classfier/model.py:16
↓ 1 callers
Function
gibbs_sampling
(num_iters=100)
natural_language_processing/utils.py:137
↓ 1 callers
Function
gini_index
This method calculates the gini index for a split dataset
sonar_clf_rf.py:105
↓ 1 callers
Function
group_by
returns a defaultdict(list), where each input item is in the list whose key is key_fn(item)
decision_trees/utils.py:31
↓ 1 callers
Function
in_random_order
generator that returns the elements of data in random order
helpers/gradient_descent.py:121
↓ 1 callers
Function
interquartile_range
(x)
helpers/stats.py:98
↓ 1 callers
Function
item_based_suggestions
(interest_similarities, users_interests, user_interest_matrix, unique_interests, user_id, include_current_inte
recommender_systems/utils.py:50
↓ 1 callers
Function
least_squares_fit
(x, y)
simple_linear_regression/utils.py:17
↓ 1 callers
Function
load_csv
This method loads a csv file
sonar_clf_rf.py:6
↓ 1 callers
Function
load_data
(filepath)
hparams_grid_search_keras_nn.py:15
↓ 1 callers
Function
logistic_log_gradient_i
the gradient of the log likelihood corresponding to the i-th data point
logistic_regression/utils.py:34
↓ 1 callers
Function
logistic_log_likelihood_i
(x_i, y_i, beta)
logistic_regression/utils.py:15
↓ 1 callers
Function
logistic_log_partial_ij
here i is the index of the data point, j the index of the derivative
logistic_regression/utils.py:27
↓ 1 callers
Function
majority_vote
assumes that labels are ordered from nearest to farthest
k_nearest_neighbors/utils.py:16
↓ 1 callers
Function
make_histogram
buckets the points and counts how many in each bucket
working_with_data/utils.py:18
↓ 1 callers
Function
matrix_multiply
(A, B)
network_analysis/utils.py:99
↓ 1 callers
Function
matrix_operation
(A, v)
network_analysis/utils.py:119
↓ 1 callers
Function
median
finds the 'middle-most' value of v
helpers/stats.py:44
↓ 1 callers
Function
mode
returns a list, might be more than one mode
helpers/stats.py:66
↓ 1 callers
Function
most_common_interests_with
(user)
friendster_network.py:122
↓ 1 callers
Function
neuron_output
(weights, inputs)
neural_network/utils.py:22
↓ 1 callers
Function
normal_lower_bound
returns the z for which P(Z >= z) = probability
hypothesis_inference.py:49
↓ 1 callers
Function
normal_probability_above
(lo, mu=0, sigma=1)
hypothesis_inference.py:23
↓ 1 callers
Function
not_friends
(user, other_user)
friendster_network.py:68
↓ 1 callers
Function
p_topic_given_document
the fraction of words in document 'd' that are assigned to 'topic' (plus some smoothing)
natural_language_processing/utils.py:182
↓ 1 callers
Function
p_word_given_topic
the fraction of words in document 'd' that are assigned to 'topic' (plus some smoothing)
natural_language_processing/utils.py:188
↓ 1 callers
Function
page_rank
(users, damping=0.85, num_iters=100)
network_analysis/utils.py:163
↓ 1 callers
Function
parse_dict
(input_dict, parser_dict)
working_with_data/utils.py:154
↓ 1 callers
Function
parse_row
given a list of parsers (some of which may be None) apply the appropriate one to each element of the input_row
working_with_data/utils.py:118
↓ 1 callers
Function
parse_rows_with
wrap a reader to apply the parsers to each of its rows
working_with_data/utils.py:125
↓ 1 callers
Function
partial_difference_quotient
(f, v, i, h)
helpers/gradient_descent.py:33
↓ 1 callers
Function
partition_entropy
find the entropy from this partition of data into subsets
decision_trees/utils.py:23
↓ 1 callers
Function
percent_price_change
(yesterday, today)
working_with_data/utils.py:187
↓ 1 callers
Function
pluck
turn a list of dicts into the list of field_name values
working_with_data/utils.py:170
↓ 1 callers
Function
predict
This method makes a prediction with a decision tree
sonar_clf_rf.py:190
↓ 1 callers
Function
predict
(alpha, beta, x_i)
simple_linear_regression/utils.py:4
↓ 1 callers
Function
predict
(x_i, beta)
multiple_regression/utils.py:10
↓ 1 callers
Function
principal_component_analysis
(X, num_components)
working_with_data/utils.py:301
↓ 1 callers
Function
project
return the projection of v onto w
working_with_data/utils.py:284
↓ 1 callers
Function
r_squared
the fraction of variation in y captured by the model
simple_linear_regression/utils.py:28
↓ 1 callers
Function
random_distances
(dim, num_pairs)
k_nearest_neighbors/utils.py:106
↓ 1 callers
Function
random_row
()
working_with_data/utils.py:79
↓ 1 callers
Function
random_x_given_y
(y)
natural_language_processing/utils.py:130
↓ 1 callers
Function
random_y_given_x
(x)
natural_language_processing/utils.py:126
↓ 1 callers
Function
recolor
(pixel)
k_means_clustering/utils.py:60
↓ 1 callers
Function
reject_fairness
using the 5% significance levels
hypothesis_inference.py:103
↓ 1 callers
Function
remove_projection
for each row of X projects the row onto w, and subtracts the result from the row
working_with_data/utils.py:295
↓ 1 callers
Function
remove_projection_from_vector
projects v onto w and subtracts the result from v
working_with_data/utils.py:290
↓ 1 callers
Function
ridge_penalty
(beta, alpha)
multiple_regression/utils.py:78
↓ 1 callers
Function
ridge_penalty_gradient
gradient of just the ridge penalty
multiple_regression/utils.py:87
↓ 1 callers
Function
run_experiment
flip a fair coin 1000 times, True = heads, False = tails
hypothesis_inference.py:98
↓ 1 callers
Function
safe
define a new function that wraps f and return it
helpers/gradient_descent.py:56
↓ 1 callers
Function
sample_from
returns i with probability weights[i] / sum(weights)
natural_language_processing/utils.py:156
↓ 1 callers
Function
shortest_paths_from
(from_user)
network_analysis/utils.py:18
↓ 1 callers
Function
sigmoid
(t)
neural_network/utils.py:18
↓ 1 callers
Function
spam_probability
assigns word probabilities to messages
naive_bayes_classfier/utils.py:30
↓ 1 callers
Function
split
(node, max_depth, min_size, n_features, depth)
sonar_clf_rf.py:155
↓ 1 callers
Function
split_data
split data into fractions [prob, 1 - prob]
helpers/machine_learning.py:8
↓ 1 callers
Function
split_data
split data into fractions [prob, 1 - prob]
naive_bayes_classfier/model.py:8
↓ 1 callers
Function
squared_error_gradient
the gradient corresponding to the ith squared error term
multiple_regression/utils.py:22
↓ 1 callers
Function
step_function
(x)
neural_network/utils.py:9
↓ 1 callers
Function
str_columm_to_int
This method converts a string column to int
sonar_clf_rf.py:25
↓ 1 callers
Function
str_column_to_float
This method converts a string column to float
sonar_clf_rf.py:19
↓ 1 callers
Function
subsample
This method creates a random subsample from the dataset with replacement
sonar_clf_rf.py:204
↓ 1 callers
Function
sum_of_squared_errors
(alpha, beta, x, y)
simple_linear_regression/utils.py:12
↓ 1 callers
Function
sum_of_squares_gradient
(v)
helpers/gradient_descent.py:52
↓ 1 callers
Function
tenure_bucket
(tenure)
friendster_network.py:165
↓ 1 callers
Function
test_split
This method split a dataset based on an attribute and an attribute value
sonar_clf_rf.py:92
↓ 1 callers
Function
text_size
(total)
natural_language_processing/utils.py:14
↓ 1 callers
Function
topic_weight
given a document and a word in that document, return the weight for the k-th topic
natural_language_processing/utils.py:194
↓ 1 callers
Function
total_sum_of_squares
The total squared variation of y_i's from their mean
simple_linear_regression/utils.py:23
↓ 1 callers
Function
total_sum_of_squares
The total squared variation of y_i's from their mean
multiple_regression/utils.py:28
↓ 1 callers
Method
train
(self, training_set)
naive_bayes_classfier/naivebayesclassifier.py:10
↓ 1 callers
Function
train_and_test_model
(path)
naive_bayes_classfier/model.py:41
↓ 1 callers
Function
try_parse_field
try to parse value using the appropriate function from parser_dict
working_with_data/utils.py:145
↓ 1 callers
Function
user_based_suggestions
(user_similarities, users_interests, user_id, include_current_interests=False)
recommender_systems/utils.py:34
↓ 1 callers
Function
vector_add
adds two vectors componentwise
helpers/linear_algebra.py:10
← previous
next →
101–200 of 274, ranked by callers