MCPcopy Create free account

hub / github.com/christopherjenness/ML-lib / functions

Functions201 in github.com/christopherjenness/ML-lib

↓ 19 callersFunctiongradient
()
tests/test_descentmethods.py:9
↓ 8 callersMethodpredict
Args: X (np.ndarray): Training data of shape[n_samples, n_features] Returns: np.ndarray: shape[n_samples 1),
ML/svm.py:156
↓ 7 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] Returns: an instance of self
ML/pca.py:29
↓ 6 callersMethodpredict
Args: x (np.array): Training data of shape[1, n_features] Currently, only vector of single sample is supported
ML/discriminantanalysis.py:74
↓ 5 callersMethodfit
For Kernel Methods, data is stored in memory and fitting is done at prediction time. Args: X (np.ndarray): Train
ML/kernelmethods.py:28
↓ 5 callersFunctionhessian
()
tests/test_descentmethods.py:18
↓ 4 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] iterations (int): number of EM interations until
ML/gaussianmixture.py:32
↓ 4 callersMethodfit
Currently, only L2 regularization is implemented. Args: X (np.ndarray): Training data of shape[n_samples, n_features]
ML/regression.py:79
↓ 4 callersMethodlogistic_function
Args: logistic_input (np.ndarray): array of shape[n_samples, 1] Returns: np.ndarray: shape[n_samples, 1], lo
ML/kernelmethods.py:116
↓ 4 callersMethodpredict
Args: x (np.array): Training data of shape[n_features,] Returns: float: predicted value Raises:
ML/treemethods.py:54
↓ 4 callersMethodpredict
Args: X (np.ndarray): Training data of shape[n_samples, n_features] Returns: np.ndarray: shape[n_samples, 1]
ML/svm.py:110
↓ 4 callersMethodpredict
Args: X (np.ndarray): Test data of shape[n_samples, n_features] Returns: np.ndarray: shape[n_samples, 1], pr
ML/regression.py:42
↓ 3 callersMethod__init__
Attributes: graph (nx.DiGraph): Directed graph which stores tree nodes (int): Current number of nodes in tree
ML/treemethods.py:18
↓ 3 callersMethodepanechnikovkernel
Epanechnikov Kernel
ML/kernelmethods.py:43
↓ 3 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/treemethods.py:34
↓ 3 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/discriminantanalysis.py:47
↓ 3 callersMethodgaussiankernel
Gaussian Kernel
ML/kernelmethods.py:59
↓ 3 callersMethodget_leaves
Used by add_layer() to get the leaves of the tree.
ML/treemethods.py:95
↓ 3 callersMethodpartition_data
Partitions the training data at a given node. Traverses the entire down to the indicated node. Args: node_numbe
ML/treemethods.py:123
↓ 3 callersMethodpredict
Note: currenly only works on single vector and not matrices Args: x (np.ndarray): Training data of shape[1, n_features]
ML/gaussianmixture.py:93
↓ 3 callersMethodpredict
Args: x (np.array): Training data of shape[n_features,] Returns: float: predicted value Raises:
ML/treemethods.py:706
↓ 3 callersMethodtricubekernel
Tricube Kernel
ML/kernelmethods.py:51
↓ 2 callersMethodfit
Fits Naive Bayes classifier Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarra
ML/naivebayes.py:68
↓ 2 callersMethodfit
Fits Naive Bayes classifier Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarra
ML/naivebayes.py:143
↓ 2 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/prototypemethods.py:25
↓ 2 callersMethodfit
Randomly initializes clusers, uses LLyod's algorithm to find optimal clusters. Args: X (np.ndarray): Training da
ML/prototypemethods.py:88
↓ 2 callersMethodfit
Randomly initializes clusers, iteratively update cluster center Args: X (np.ndarray): Training data of shape[n_samples,
ML/prototypemethods.py:175
↓ 2 callersMethodfit
Randomly initializes clusers, uses LLyod's algorithm to find optimal clusters. Args: X (np.ndarray): Trainin
ML/prototypemethods.py:271
↓ 2 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samples]
ML/prototypemethods.py:384
↓ 2 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/svm.py:57
↓ 2 callersMethodfit
Currently, only L2 regularization is implemented. Args: X (np.ndarray): Training data of shape[n_samples, n_features]
ML/regression.py:165
↓ 2 callersMethodget_predecessors
Used by parition_data() to get predecessors of a given node (to walk down the tree).
ML/treemethods.py:158
↓ 2 callersFunctiongradientdescent
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples, 1]
ML/descentmethods.py:7
↓ 2 callersMethodkerneldensityestimate
Provides a gaussian kernel density at point given a sample. If the KDE of the entire sample space is required, this method can
ML/kernelmethods.py:203
↓ 2 callersMethodlogistic_function
Args: logistic_input (np.ndarray): array of shape[n_samples, 1] Returns: np.ndarray: shape[n_samples, 1], lo
ML/regression.py:115
↓ 2 callersMethodpredict
Args: x (np.array): Training data of shape[n_features,] Returns: float: predicted value Raises:
ML/treemethods.py:408
↓ 2 callersMethodpredict
Args: x (np.array): Training data of shape[n_features,] Returns: float: predicted value Raises:
ML/treemethods.py:606
↓ 2 callersMethodpredict
Args: x (np.array): Training data of shape[n_features,] Returns: float: predicted value Raises:
ML/treemethods.py:807
↓ 2 callersMethodpredict
Args: x (np.array): Training data of shape[1, n_features] Currently, only vector of single sample is supported
ML/naivebayes.py:93
↓ 2 callersMethodpredict
Args: x (np.array): Training data of shape[1, n_features] Currently, only vector of single sample is supported
ML/naivebayes.py:168
↓ 2 callersMethodpredict
Note: currenly only works on single vector and not matrices Args: x (np.ndarray): Training data of shape[1, n_features]
ML/prototypemethods.py:38
↓ 2 callersMethodpredict
Note: currenly only works on single vector (one data instance) and not matrices Args: x (np.array): sample d
ML/prototypemethods.py:331
↓ 2 callersMethodpredict
Args: x1 (np.array): query point of shape[n_features] k (int): number of nearest neighbors to consider Retur
ML/prototypemethods.py:403
↓ 2 callersMethodpredict
Args: X (np.ndarray): Training data of shape[n_samples, n_features] probability (bool): If True, return probabilities
ML/regression.py:141
↓ 1 callersMethodDANN_distance
Computes the distance between x0 and x1 using the DANN metric which is adaptively defined at query locus Args: x1
ML/prototypemethods.py:453
↓ 1 callersMethod_expectation
(self)
ML/gaussianmixture.py:69
↓ 1 callersMethod_maximization
(self)
ML/gaussianmixture.py:72
↓ 1 callersMethodadd_layer
Used by Fit() to add a single layer at the bottom of the tree
ML/treemethods.py:84
↓ 1 callersMethodadd_split
Used by add_layer() to add two children at a leaf in the tree Args: node_number (int): Node in tree which a new split is
ML/treemethods.py:105
↓ 1 callersMethodadd_stump
weights (np.array): array of weights of shape[n_samples,] to weight each sample in current stump Notes: Meth
ML/treemethods.py:572
↓ 1 callersMethodadd_tree
residuals (np.array): array of residuals of shape[n_samples,] calculated from the current model Notes: Metho
ML/treemethods.py:690
↓ 1 callersMethodadd_tree
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/treemethods.py:790
↓ 1 callersMethodcompute_class_averages
Method to compute average value for all nodes in the tree
ML/treemethods.py:171
↓ 1 callersMethodcross_entropy_error
Cross Entropy Error
ML/modelselection.py:188
↓ 1 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samples]
ML/treemethods.py:549
↓ 1 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samples]
ML/treemethods.py:662
↓ 1 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samples]
ML/treemethods.py:755
↓ 1 callersMethodfit
Args: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.ndarray): Target values of shape[n_samples,
ML/svm.py:175
↓ 1 callersMethodkerneldensitypredict
Kernel density calssification prediction based on KDE of each class x (np.array): Test data of shape [n_features] gamma: gau
ML/kernelmethods.py:227
↓ 1 callersMethodlearn_split
Method to learn split given a data set (inputs) with target values (values)
ML/treemethods.py:178
↓ 1 callersMethodlearn_split
PRIM algorithm to learn split at node in tree. Maximizes response mean after "boxing off" 90% of data. Args: dat
ML/treemethods.py:355
↓ 1 callersMethodlocallinearregression
Local linear regression eliminates bias at boundries of domain. It uses weighted least squares, determining weights from the
ML/kernelmethods.py:87
↓ 1 callersMethodlocallogisticHessian
Hessian for regulatrized local logistic regression L2 loss Args: theta (np.array): Current lwlr parameters of shape
ML/kernelmethods.py:126
↓ 1 callersMethodmean_classification_error
Average classiication error
ML/modelselection.py:181
↓ 1 callersMethodmean_normalize
Normalizes input data (subtracts mean from each sample)
ML/pca.py:48
↓ 1 callersMethodmse
Mean Square Error
ML/modelselection.py:174
↓ 1 callersMethodnadarayaaverage
Regression estimate of the target value by weighted averaging of nearby training examples Args: x (np.array): Tr
ML/kernelmethods.py:64
↓ 1 callersMethodpartition_data
Partitions the training data at a given node. Traverses the entire down to the indicated node. Args: node_numbe
ML/treemethods.py:460
↓ 1 callersMethodpartition_data_nodeless
Partitions inputs based off of a cutoff dictionary which can contain cutoffs for many varialbes (although this feature is currently u
ML/treemethods.py:498
↓ 1 callersMethodpredict
Note: currenly only works on single vector and not matrices Args: x (np.ndarray): Training data of shape[1, n_features]
ML/prototypemethods.py:130
↓ 1 callersMethodpredict
Note: currenly only works on single vector and not matrices Args: x (np.ndarray): Training data of shape[1, n_features]
ML/prototypemethods.py:227
Method__init__
Attributes: X (np.ndarray): Training data of shape[n_samples, n_features] X_normalized (np.ndarray): Mean normalized
ML/pca.py:14
Method__init__
Attributes: X (np.ndarray): Training data of shape[n_samples, n_features] X_intercept (np.ndarray): Training data of
ML/kernelmethods.py:13
Method__init__
Attributes: samples (np.ndarray): Data to determine gaussian mixtures for mus (dict): class means {class: [mean1, mea
ML/gaussianmixture.py:13
Method__init__
(self)
ML/treemethods.py:191
Method__init__
(self)
ML/treemethods.py:260
Method__init__
(self)
ML/treemethods.py:335
Method__init__
Attributes: stump_count (int): current number of stumps generated for model stumps (list): list to hold stumps genera
ML/treemethods.py:526
Method__init__
Attributes: tree_count (int): current number of trees generated for model trees (list): list to hold trees generated
ML/treemethods.py:639
Method__init__
Attributes: tree_count (int): current number of trees generated for model trees (list): list to hold trees generated
ML/treemethods.py:734
Method__init__
Attributes: learned (bool): Keeps track of if classifier has been fit class_names (np.ndarray): array of class names.
ML/naivebayes.py:18
Method__init__
Attributes: samples (np.ndarray): Data of known target values values (np.ndarray): Known target values for data
ML/prototypemethods.py:14
Method__init__
Attributes: samples (np.ndarray): Data to be clusters sample_assignments (np.array): cluster assignments for each sam
ML/prototypemethods.py:75
Method__init__
Attributes: samples (np.ndarray): Data to be clusters sample_assignments (np.array): cluster assignments for each sam
ML/prototypemethods.py:162
Method__init__
Attributes: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samp
ML/prototypemethods.py:258
Method__init__
Attributes: X (np.ndarray): Training data of shape[n_samples, n_features] y (np.array): Target values of shape[n_samp
ML/prototypemethods.py:370
Method__init__
Args: C (float): weight of penalty for misclassified points in soft-margin error if C == 0, then hard-margin SVM
ML/svm.py:28
Method__init__
Args: max_iter (int): Maximum number of iterations through PLA before stoping learning_rate (float): PLA step size
ML/svm.py:135
Method__init__
Attributes:: _learned (bool): Keeps track of if Linear Regression has been fit _weights (np.ndarray): vector of weigh
ML/regression.py:13
Method__init__
Args: alpha (float): degree of regularization, in range(0, 1) Attributes: learned (bool): Keeps track of if
ML/discriminantanalysis.py:19
Method_expectations
(self, point)
ML/gaussianmixture.py:57
Methodadd_split
Used by add_layer() to add two children at a leaf in the tree Args: node_number (int): Node in tree which a new split is
ML/treemethods.py:338
Functionbest_subset
Function for selecting a subset of parameters from X, which minimize the in sample error measure. Algorithm acts in a greedy manner, eit
ML/modelselection.py:7
Functioncategorical_2Dmatrix_bernoulli_data
()
tests/data.py:70
Functioncategorical_2Dmatrix_data
()
tests/data.py:41
Functioncategorical_2Dmatrix_data_big
()
tests/data.py:53
Functioncategorical_data
()
tests/data.py:17
Methodcompute_class_averages
Computes the class average of each node in the tree. Class average is mean of training data that partitions to the node.
ML/treemethods.py:240
Methodcompute_class_averages
Computes the class average of each node in the tree. Class average is the mode of training data that partitions to the node.
ML/treemethods.py:309
Methodcompute_class_averages
Computes the class average of each node in the tree. Class average is the mean of training data that partitions to the node.
ML/treemethods.py:443
next →1–100 of 201, ranked by callers