I use Accord.NET for calculating slope and intercept of linear regression based on this page http://accord-framework.net/docs/html/T_Accord_Statistics_Models_Regression_Linear_SimpleLinearRegression.htm
I want to set a fixed interception value so that Accord will predict the slope only. Can I do that thing in Accord.NET?
Dim inp(10), opt(10) As Double
inp = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
opt = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20}
Dim ols As New OrdinaryLeastSquares
Dim reg As New SimpleLinearRegression
reg.Intercept = 4 'no effect, how can we set the intercept value?
reg = ols.Learn(inp, opt)
Dim hsl As String
hsl = "y=" + reg.Slope.ToString + "X+" + reg.Intercept.ToString