Пример #1
0
        public void Regression_linear_check_rmse_jason_input()
        {
            Init_dataset_jason_linear_regression();

            BuildLinearSimple lm = new BuildLinearSimple();

            Dasmic.MLLib.Algorithms.Regression.ModelBase mb =
                (Dasmic.MLLib.Algorithms.Regression.ModelBase)lm.BuildModel(_trainingData,
                                                                            _attributeHeaders, _indexTargetAttribute);

            double value = mb.GetModelRMSE(_trainingData);

            Assert.IsTrue(value > .68 && value < .70);
        }
Пример #2
0
        public void Regression_linear_gd_check_rmse_power_input()
        {
            initData_Power();

            BuildLinearSGD lm = new BuildLinearSGD();

            Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase)
                                                              lm.BuildModel(_trainingData,
                                                                            _attributeHeaders,
                                                                            _indexTargetAttribute);

            double value = mb.GetModelRMSE(_trainingData);

            //Some issues were seen earlier maybe with parrelization
            Assert.IsTrue(SupportFunctions.DoubleCompare(value, 3.18));
        }
Пример #3
0
        public void Regression_linear_gd_check_rmse_power_param()
        {
            initData_Power();

            BuildLinearSGD lm = new BuildLinearSGD();

            lm.SetParameters(.02, 20);

            Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase)
                                                              lm.BuildModel(_trainingData,
                                                                            _attributeHeaders,
                                                                            _indexTargetAttribute);

            double value = mb.GetModelRMSE(_trainingData);

            Assert.IsTrue(SupportFunctions.DoubleCompare(value, 3.16));
        }