public void LinearRegressionModelVariableImpactMibaTest()
        {
            IRegressionProblemData problemData = LoadDefaultMibaProblem();
            double rmsError;
            double cvRmsError;
            var    solution = LinearRegression.CreateSolution(problemData, out rmsError, out cvRmsError);
            Dictionary <string, double> expectedImpacts = GetExpectedValuesForLRMiba();

            CheckDefaultAsserts(solution, expectedImpacts);
        }
        public void WrongDataSetVariableImpactRegressionTest()
        {
            IRegressionProblemData problemData = LoadDefaultTowerProblem();
            double rmsError;
            double cvRmsError;
            var    solution = LinearRegression.CreateSolution(problemData, out rmsError, out cvRmsError);

            solution.ProblemData = LoadDefaultMibaProblem();
            RegressionSolutionVariableImpactsCalculator.CalculateImpacts(solution);
        }
        public void PerformanceVariableImpactRegressionTest()
        {
            int rows    = 20000;
            int columns = 77;
            var dataSet = OnlineCalculatorPerformanceTest.CreateRandomDataset(new MersenneTwister(1234), rows, columns);
            IRegressionProblemData problemData = new RegressionProblemData(dataSet, dataSet.VariableNames.Except("y".ToEnumerable()), "y");
            double rmsError;
            double cvRmsError;
            var    solution = LinearRegression.CreateSolution(problemData, out rmsError, out cvRmsError);

            Stopwatch watch = new Stopwatch();

            watch.Start();
            var results = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(solution);

            watch.Stop();

            TestContext.WriteLine("");
            TestContext.WriteLine("Calculated cells per millisecond: {0}.", rows * columns / watch.ElapsedMilliseconds);
        }