Category: Code samples

Least Squares Linear Fit

Least Squares Linear Fit

It shows how to use minimal least squares method to fit data. We will generate one-dimensional regression sample set. Tree linear regression models will be constructed, their parameters will be tuned according to the...

Indexation demo

Indexation demo

This demo shows how to use indices of sorted sets and how to recover the unsorted set from the sorted one. % A set of values is gven; each value has its index k...

Principal Component Analysis

Principal Component Analysis

Plot the 1st Principal Component of the 2D sample set. The script uses a standard 1PC procedure and do not canter the matrix as it recommnded. Contents Get the data Normalize the matrix Caclulate...

Generalized linear models example

Generalized linear models example

This demo shows how to deal with the different hypothesis on data generation. The data generation hypothesis here is an assumption about the link function. We have a synthetic model and three link functions....

Logistic regression example

Logistic regression example

The Newton-Raphson algorithm is used to obtain the optimal parameters of the regression model Contents Create a demonstration data set Set the constant for iteration convergence Define the initial value of the parameters The...

Examples

Examples

Practical examples of basic methods for data analysis. It is performed in the format of Matlab reports. It collects examples of forecasting, linear and logistic regression, model selection and useful utilities. intro.m An introduction...