Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Reference
    • Extreme
    • Extreme.Collections
    • Extreme.Data
    • Extreme.Data.Json
    • Extreme.Data.Matlab
    • Extreme.Data.R
    • Extreme.Data.Stata
    • Extreme.Data.Text
    • Extreme.DataAnalysis
    • Extreme.DataAnalysis.Linq
    • Extreme.DataAnalysis.Models
    • Extreme.Mathematics
    • Extreme.Mathematics.Algorithms
    • Extreme.Mathematics.Calculus
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations
    • Extreme.Mathematics.Curves
    • Extreme.Mathematics.Curves.Nonlinear
    • Extreme.Mathematics.Distributed
    • Extreme.Mathematics.EquationSolvers
    • Extreme.Mathematics.Generic
    • Extreme.Mathematics.LinearAlgebra
    • Extreme.Mathematics.LinearAlgebra.Implementation
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners
    • Extreme.Mathematics.Optimization
    • Extreme.Mathematics.Optimization.LineSearches
    • Extreme.Mathematics.Random
    • Extreme.Mathematics.SignalProcessing
    • Extreme.Providers
    • Extreme.Providers.InteropServices
    • Extreme.Statistics
    • Extreme.Statistics.Distributions
    • Extreme.Statistics.Multivariate
    • Extreme.Statistics.Tests
    • Extreme.Statistics.TimeSeriesAnalysis
  • Extreme.Statistics
    • AnovaModel Class
    • AnovaModelRow Class
    • AnovaRow Class
    • AnovaRowType Enumeration
    • AnovaTable Class
    • Cell Structure
    • ContingencyTable Class
    • ContingencyTableCell Structure
    • DateTimeInterval Structure
    • Descriptives(T) Class
    • Filter Class
    • GeneralizedLinearModel Class
    • HypothesisTests Class
    • Kernel Class
    • KernelDensity Class
    • KernelDensityBandwidthEstimator Enumeration
    • LinearRegressionModel Class
    • LinkFunction Class
    • LogisticRegressionMethod Enumeration
    • LogisticRegressionModel Class
    • ModelFamily Class
    • NearestCorrelationMatrixAlgorithm Enumeration
    • NonlinearRegressionModel Class
    • OneWayAnovaModel Class
    • OneWayRAnovaModel Class
    • PolynomialRegressionModel Class
    • RegularizedRegressionModel Class
    • ScaleFittingMethod Enumeration
    • SimpleRegressionKind Enumeration
    • SimpleRegressionModel Class
    • Stats Class
    • StepwiseCriterion Enumeration
    • StepwiseOptions Class
    • StepwiseRegressionMethod Enumeration
    • SumsOfSquaresType Enumeration
    • TestOfHomogeneityOfVariances Enumeration
    • TestOfNormality Enumeration
    • TwoWayAnovaModel Class
    • WindowFilter Class
  • LinearRegressionModel Class
    • LinearRegressionModel Constructors
    • Properties
    • Methods

LinearRegressionModel Class

Extreme Optimization Numerical Libraries for .NET Professional
Represents a linear regression model.
Inheritance Hierarchy

SystemObject
  Extreme.DataAnalysis.ModelsModel
    Extreme.DataAnalysis.ModelsRegressionModelDouble
      Extreme.StatisticsLinearRegressionModel
        Extreme.StatisticsPolynomialRegressionModel

Namespace:  Extreme.Statistics
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public class LinearRegressionModel : RegressionModel<double>
Public Class LinearRegressionModel
	Inherits RegressionModel(Of Double)
public ref class LinearRegressionModel : public RegressionModel<double>
type LinearRegressionModel =  
    class
        inherit RegressionModel<float>
    end

The LinearRegressionModel type exposes the following members.

Constructors

  NameDescription
Public methodLinearRegressionModel(VectorDouble, VectorDouble)
Constructs a new LinearRegressionModel.
Public methodLinearRegressionModel(IDataFrame, String, String)
Constructs a new LinearRegressionModel.
Public methodLinearRegressionModel(IDataFrame, String, String)
Constructs a new LinearRegressionModel.
Public methodLinearRegressionModel(VectorDouble, MatrixDouble, Boolean, VectorDouble)
Constructs a new LinearRegressionModel.
Public methodLinearRegressionModel(IDataFrame, String, String, Boolean, String)
Constructs a new LinearRegressionModel.
Public methodLinearRegressionModel(ModelInput, VectorDouble, SymmetricMatrixDouble, Int32, Double)
Constructs a fitted linear regression model.
Top
Properties

  NameDescription
Public propertyAdjustedRSquared
Gets the adjusted R Squared value for the regression.
(Inherited from RegressionModelT.)
Public propertyAnovaTable
Gets the AnovaTable that summarizes the results of this model.
(Inherited from RegressionModelT.)
Public propertyBaseFeatureIndex
Gets an index containing the keys of the columns that are required inputs to the model.
(Inherited from Model.)
Public propertyCoefficientOfVariation
Gets the coefficient of variation for the regression.
Public propertyComputed Obsolete.
Gets whether the model has been computed.
(Inherited from Model.)
Public propertyCovarianceMatrix
Gets the covariance matrix of the model parameters.
(Inherited from RegressionModelT.)
Public propertyData
Gets an object that contains all the data used as input to the model.
(Inherited from Model.)
Public propertyDegreesOfFreedom
Gets the total degrees of freedom of the data.
(Inherited from RegressionModelT.)
Public propertyDependentVariable
Gets a vector that contains the dependent variable that is to be fitted.
(Inherited from RegressionModelT.)
Public propertyFitted
Gets whether the model has been computed.
(Inherited from Model.)
Public propertyFStatistic
Gets the F statistic for the regression.
(Inherited from RegressionModelT.)
Public propertyIndependentVariables
Gets a matrix whose columns contain the independent variables in the model.
(Inherited from RegressionModelT.)
Public propertyInputSchema
Gets the schema for the features used for fitting the model.
(Inherited from Model.)
Public propertyLeverage
Returns the leverage of each observation.
Public propertyLogLikelihood
Gets the log-likelihood that the model generated the data.
(Inherited from RegressionModelT.)
Public propertyMaxDegreeOfParallelism
Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from Model.)
Public propertyModelSchema
Gets the collection of variables used in the model.
(Inherited from Model.)
Public propertyNoIntercept
Gets or sets whether to include the intercept or constant term in the regression model.
Public propertyNumberOfObservations
Gets the number of observations the model is based on.
(Inherited from Model.)
Protected propertyParallelOptions
Gets or sets an object that specifies how the calculation of the model should be parallelized.
(Inherited from Model.)
Public propertyParameters
Gets the collection of parameters associated with this model.
(Inherited from RegressionModelT.)
Public propertyParameterValues
Gets the values of the parameters associated with this model.
(Inherited from RegressionModelT.)
Public propertyPredictions
Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from RegressionModelT.)
Public propertyPValue
Gets the probability corresponding to the F statistic for the regression.
(Inherited from RegressionModelT.)
Public propertyResiduals
Gets a vector containing the residuals of the model.
(Inherited from RegressionModelT.)
Public propertyResidualSumOfSquares
Gets the sum of squares of the residuals of the model.
(Inherited from RegressionModelT.)
Public propertyRidgeParameter
Gets or sets the coefficient of the squared norm of the regression parameters for ridge regression.
Public propertyRSquared
Gets the R Squared value for the regression.
(Inherited from RegressionModelT.)
Public propertyStandardError
Gets the standard error of the regression.
(Inherited from RegressionModelT.)
Public propertyStandardize Obsolete.
Gets or sets whether the variables should be standardized prior to computing the regression.
Public propertyStatus
Gets the status of the model, which determines which information is available.
(Inherited from Model.)
Public propertyStepwiseOptions
Gets or sets an object that specifies options for performing stepwise regression.
Public propertySupportsWeights
Indicates whether the model supports case weights.
(Overrides ModelSupportsWeights.)
Public propertyVarianceInflationFactors
Returns the Variance Inflation Factor (VIF) for each variable in the model.
Public propertyWeights
Gets or sets the actual weights.
(Inherited from Model.)
Top
Methods

  NameDescription
Public methodCompute Obsolete.
Computes the model.
(Inherited from Model.)
Public methodCompute(ParallelOptions) Obsolete.
Computes the model.
(Inherited from Model.)
Public methodContains
Returns whether another RegressionModelT is nested within this instance.
(Inherited from RegressionModelT.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFit
Fits the model to the data.
(Inherited from Model.)
Public methodFit(ParallelOptions)
Fits the model to the data.
(Inherited from Model.)
Protected methodFitCore
Computes the model to the specified input using the specified parallelization options.
(Overrides ModelFitCore(ModelInput, ParallelOptions).)
Public methodGetAkaikeInformationCriterion
Returns the Akaike information criterion (AIC) value for the model.
(Inherited from RegressionModelT.)
Public methodGetBayesianInformationCriterion
Returns the Bayesian information criterion (BIC) value for the model.
(Inherited from RegressionModelT.)
Public methodGetBreuschGodfreyTest
Gets the Breusch-Godfrey test for serial correlation in the residuals of the regression model.
Public methodGetConfidenceBandwidth(VectorDouble)
Gets the width of the 95% confidence band around the best-fit curve at the specified point.
Public methodGetConfidenceBandwidth(VectorDouble, Double)
Gets the width of the confidence band around the best-fit curve at the specified point.
Public methodGetCooksDistance
Returns Cook's distance for each of the observations.
Public methodGetDeletedResiduals
Returns the deleted residual for each observation
Public methodGetDffits
Returns the DFFITS value for each of the observations.
Public methodGetDurbinWatsonStatistic
Gets the Durbin-Watson statistic for the residuals of the regression.
Public methodGetExternallyStudentizedResiduals
Returns the externally studentized residual for each observation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNormalityOfResidualsTest
Returns a test to verify that the residuals follow a normal distribution.
Public methodGetNormalityOfResidualsTest(TestOfNormality)
Returns a test to verify that the residuals follow a normal distribution.
Public methodGetPredictionBandwidth(VectorDouble)
Gets the width of the prediction band around the best-fit curve at the specified point.
Public methodGetPredictionBandwidth(VectorDouble, Double)
Gets the width of the prediction band around the best-fit curve at the specified point.
Public methodGetStudentizedDeletedResiduals
Returns the studentized deleted residual for each observation
Public methodGetStudentizedResiduals
Returns the studentized residual for each observation.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPredict(IDataFrame, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from RegressionModelT.)
Public methodPredict(MatrixT, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from RegressionModelT.)
Public methodPredict(VectorT, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from RegressionModelT.)
Protected methodPredictCore(MatrixT, Boolean)
Predicts the value of the dependent variable based on the specified values of the features.
(Inherited from RegressionModelT.)
Protected methodPredictCore(VectorT, Boolean)
Predicts the value of the dependent variable based on the specified values of the features.
(Inherited from RegressionModelT.)
Public methodResetComputation Obsolete.
Clears all fitted model parameters.
(Inherited from Model.)
Public methodResetFit
Clears all fitted model parameters.
(Inherited from Model.)
Public methodSetDataSource
Uses the specified data frame as the source for all input variables.
(Inherited from Model.)
Public methodSummarize
Returns a string containing a human-readable summary of the object using default options.
(Inherited from Model.)
Public methodSummarize(SummaryOptions)
Returns a string containing a human-readable summary of the object using the specified options.
(Inherited from RegressionModelT.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Model.)
Top
Remarks

Use the LinearRegressionModel class to analyze a linear relationship between two or more numerical variables. A multiple linear regression model tries to express one variable, called the dependent variable, as a linear combination of one or more other variables called independent variables or predictors.

Two derived classes provide convenient interfaces for specific kinds of regression.

  • The SimpleRegressionModel class represents a linear regression model with one independent variable, including linearized models like exponential and logarithmic regression.
  • The PolynomialRegressionModel class represents a linear regression model where the independent variables are all powers of the same variable.
See Also

Reference

Extreme.Statistics Namespace
Extreme.StatisticsSimpleRegressionModel

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, 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.