Code for programming assignments in Octave from the Coursera course Machine Learning, given by Andrew Ng for Stanford University.
- computeCost.m - Compute cost for linear regression.
- computeCostMulti.m - Compute cost for linear regression with multiple variables.
- featureNormalize.m - Normalizes the features in a vector.
- gradientDescent.m - Performs gradient descent to learn parameters.
- gradientDescentMulti.m - Performs gradient descent to learn parameters with multiple variables.
- normalEqn.m - Computes the closed-form solution to linear regression.
- warmUpExercise.m - Example function in octave.
- costFunction.m - Compute cost and gradient for logistic regression.
- costFunctionReg.m - Compute cost and gradient for logistic regression with regularization.
- predict.m - Predict whether the label is 0 or 1 using learned logistic.
- sigmoid.m - Compute sigmoid function.
- lrCostFunction.m - Compute cost and gradient for logistic regression with regularization.
- oneVsAll.m - Trains multiple logistic regression classifiers and returns.
- predict.m - Predict the label of an input given a trained neural network.
- predictOneVsAll.m - Predict the label for a trained one-vs-all classifier.
- nnCostFunction.m - Implements the neural network cost function for a two layer neural network which performs classification.
- sigmoidGradient.m - Returns the gradient of the sigmoid function.
- learningCurve.m - Generates the train and cross validation set errors needed to plot a learning curve.
- linearRegCostFunction.m - Compute cost and gradient for regularized linear regression with multiple variables.
- polyFeatures.m - Maps X (1D vector) into the p-th power.
- validationCurve.m - Generate the train and validation errors needed to plot a validation curve that we can use to select lambda.
- dataset3Params.m - Returns your choice of C and sigma for Part 3 of the exercise.
- emailFeatures.m - Takes in a word_indices vector and produces a feature vector from the word indices.
- gaussianKernel.m - Returns a radial basis function kernel between two points.
- processEmail.m - Preprocesses a the body of an email and returns a list of word indices.
- computeCentroids.m - Returs the new centroids by computing the means of the data points assigned to each centroid.
- findClosestCentroids.m - Computes the centroid memberships for every example.
- pca.m - Run principal component analysis on the dataset X.
- projectData.m - Computes the reduced data representation when projecting on eigenvectors.
- recoverData.m - Recovers an approximation of the original data when using the projected data.
- cofiCostFunc.m - Collaborative filtering cost function.
- estimateGaussian.m - Estimates the parameters of a Gaussian distribution using the data in X.
- selectThreshold.m - Find the best threshold to use for selecting outliers.