Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cdipaolo/goml
/ types & classes
Types & classes
31 in github.com/cdipaolo/goml
⨍
Functions
339
◇
Types & classes
31
↓ 3 callers
TypeAlias
OptimizationMethod
OptimizationMethod defines a type enum which (using constants declared below) lets a user pass in a optimization method to use when creating a new mod
base/model.go:13
↓ 2 callers
TypeAlias
TFIDF
* TFIDF is a Term Frequency- Inverse Document Frequency model that is created from a trained NaiveBayes model (they are very similar so you can just t
text/tfidf.go:37
Interface
Ascendable
Ascendable is an interface that can be used with batch gradient descent where the parameter vector theta is in one dimension only (so softmax regressi
base/model.go:124
Struct
Datapoint
Datapoint is used in some models where it is cleaner to pass data as a struct rather than just as 1D and 2D arrays like Generalized Linear Models are
base/model.go:187
FuncType
DistanceMeasure
DistanceMeasure is any function that maps two vectors of float64s to a float64. Used for vector distance calculations
base/distance.go:9
TypeAlias
Frequencies
Frequencies is an array of word frequencies (stored as separate type to be able to sort)
text/tfidf.go:50
Struct
Frequency
Frequency holds word frequency information so you don't have to hold a map[string]float64 and can, then, sort
text/tfidf.go:42
Struct
KMeans
* KMeans implements the k-means unsupervised clustering algorithm. The batch version of the model used k=means++ as the instantiation of the model. Th
cluster/kmeans.go:110
Struct
KNN
* KNN implements the KNN algorithm for classification, where an input is classified by finding the K nearest (by some distance metric) data points, an
cluster/knn.go:53
Struct
KernelPerceptron
KernelPerceptron represents the perceptron online learning model, where you input features and the model's state reacts to the input and changes weigh
perceptron/kernel_perceptron.go:50
Struct
LeastSquares
LeastSquares implements a standard linear regression model with a Least Squares cost function. https://en.wikipedia.org/wiki/Least_squares The model
linear/linear.go:70
Struct
LocalLinear
LocalLinear implements a locally weighted linear least squares regression. https://en.wikipedia.org/wiki/Least_squares http://cs229.stanford.edu/note
linear/local_linear.go:78
Struct
Logistic
Logistic represents the logistic classification model with a sigmoidal hypothesis https://en.wikipedia.org/wiki/Logistic_regression The model is cur
linear/logistic.go:27
Interface
Model
Model is an interface that can Train based on a 2D array of data (called x) and an array (y) of solution data. Model trains in a supervised manor. Pre
base/model.go:28
Struct
NaiveBayes
* NaiveBayes is a general classification model that calculates the probability that a datapoint is part of a class by using Bayes Rule: P(y|x) = P(x|
text/bayes.go:131
Interface
OnlineModel
OnlineModel differs from Model because the learning can take place in a goroutine because the data is passed through a channel, ending when the channe
base/model.go:52
Struct
OnlineParams
OnlineParams is used to pass optional parameters in to creating a new K-Means model if you want to learn using the online version of the model
cluster/kmeans.go:148
Interface
OnlineTextModel
OnlineTextModel holds the interface for text classifiers. They have the refular learn & predict functions, but don't include an updating callback func
base/model.go:91
Struct
Perceptron
Perceptron represents the perceptron online learning model, where you input features and the model's state reacts to the input and changes weights (pa
perceptron/perceptron.go:140
Struct
SimpleTokenizer
SimpleTokenizer splits sentences into tokens delimited by its SplitOn string – space, for example
text/bayes.go:179
Struct
Softmax
Softmax represents a softmax classification model in 'k' demensions. It is generally thought of as a generalization of the Logistic Regression model.
linear/softmax.go:29
Interface
StochasticAscendable
StochasticAscendable is an interface that can be used with stochastic gradient descent where the parameter vector theta is in one dimension only (so s
base/model.go:151
Struct
TextDatapoint
TextDatapoint is the data structure expected for text classification models. The passed types, therefore, are inherently different from the other stru
base/model.go:201
Interface
Tokenizer
Tokenizer accepts a sentence as input and breaks it down into a slice of tokens
text/bayes.go:172
Struct
TriangleKMeans
* TriangleKMeans implements the k-means unsupervised clustering algorithm sped up to use the Triangle Inequality to reduce the number of reduntant dis
cluster/triangle_kmeans.go:109
Struct
Word
Word holds the structural information needed to calculate the probability of
text/bayes.go:232
Struct
concurrentMap
concurrentMap allows concurrency-friendly map access via its exported Get and Set methods
text/bayes.go:194
Struct
nn
nn represents an encapsulation of the Nearest Neighbor data for each datapoint to facilitate easy sorting
cluster/knn.go:79
Struct
pointInfo
pointInfo stores information needed to use the Triangle Inequality to reduce the number of distance calculations.
cluster/triangle_kmeans.go:159
Struct
test
text/bayes_test.go:362
Struct
testCase
base/sanitize_test.go:9