Solutions

# Regression

Whether you're using C#, Visual Basic (VB.NET), F#, IronPython, the *Extreme Optimization Numerical Libraries
for .NET* make it easy to include regression functionality in your .NET applications.
The *Extreme Optimization Numerical Libraries for .NET* are a complete math,
vector/matrix and statistics package
for the Microsoft .NET framework. The statistics functionality extends to probability distributions,
random number generation, hypothesis testing, time series analysis, and multivariate models.

Many types of regression are supported, including:

- Simple linear, multi-linear and polynomial regression.
- Logistic regression.
- Nonlinear regression.
- Poisson regression.
- Logit and probit regression.
- Generalized linear models.

In addition, you can take advantage of the following:

- Remove outliers and impose other filter conditions.
- Create indicator or dummy variables from categorical data.
- Assign weights to observations.
- Compute significance tests and confidence intervals for parameters.
- Run validation tests.

## Regression classes

The classes that implement the regression functionality live in the Extreme.Statistics namespace. The main classes are:

### Regression Models

- SimpleRegressionModel Represents a model where the dependent variable is a linear function of the independent variable.
- LinearRegressionModel Represents a model where the dependent variable is a linear combination of multiple independent variables.
- PolynomialRegressionModel Represents a model where the dependent variable is a polynomial of the independent variable.
- LogisticRegressionModel Represents a model that predicts the probability of two or more outcomes occurring.
- NonlinearRegressionModel Represents a model where the relationship between the dependent variable and the independent variables is nonlinear.
- GeneralizedLinearModel Represents a generalization of a regression model where the dependent variable is related to the independent variables through a link function, and the variance of each observation is dependent on the predicted value. Logistic, Poisson and probit regression are specific examples.

The Curve Fitting section of the Mathematics Library User's Guide explains their use in detail.

## Regression Sample Application

With only a few lines of code, you can include advanced regression functions in your applications. This sample shows you how. For more information, click on the image to the right. This sample is also part of our trial version. |

## Regression QuickStart Samples

Our library comes with a large number of QuickStart samples that help you to get started in minutes. The following samples illustrate how to use the curve fitting functionality:

Project | Description |
---|---|

Simple Regression in C# Simple Regression in VB.NET |
Illustrates the use of the SimpleRegressionModel class to perform simple linear regression. |

Multiple Regression in C# Multiple Regression in VB.NET |
Illustrates the use of the LinearRegressionModel class to perform multiple linear regression. |

Polynomial Regression in C# Polynomial Regression in VB.NET |
Illustrates how to use the PolynomialRegressionModel class (Extreme.Statistics namespace) to perform a polynomial regression. |

Logistic Regression in C# Logistic Regression in VB.NET |
Illustrates how to use the LogisticRegressionModel class (Extreme.Statistics namespace) to perform logistic regression. |

Generalized Linear Models C# Generalized Linear Models VB.NET |
Illustrates how to use the GeneralizedLinearModel class to create generalized linear models used in Poisson regression and probit regression. |

## Trial version

If you would like to evaluate the *Extreme Optimization Numerical Libraries for .NET*,
you can download a free, fully functional 60-day trial version.
In addition to the code samples discussed here, it includes about 70 other samples
as well as complete documentation for the entire library.

Copyright Â© 2003-2018, Extreme Optimization. All rights reserved.

*Extreme Optimization,* *Complexity made simple*, *M#*, and *M Sharp* are trademarks of ExoAnalytics Inc.

*Microsoft*, *Visual C#, Visual Basic, Visual Studio*, *Visual Studio.NET*, and the *Optimized for Visual Studio* logo

are registered trademarks of Microsoft Corporation.