Пример #1
0
        public override IRegressionModel Build(IRegressionProblemData pd, IRandom random, CancellationToken cancellationToken, out int numberOfParameters)
        {
            if (pd.Dataset.Rows < MinLeafSize(pd))
            {
                throw new ArgumentException("The number of training instances is too small to create a linear model");
            }
            double rmse, cvRmse;

            numberOfParameters = pd.AllowedInputVariables.Count() + 1;
            var res = LinearRegression.CreateSolution(pd, out rmse, out cvRmse);

            return(res.Model);
        }
Пример #2
0
 private LinearRegression(LinearRegression original, Cloner cloner)
     : base(original, cloner)
 {
 }