Accord.Tests.MachineLearning.BootstrapTest.BootstrapConstructorTest C# (CSharp) Method

BootstrapConstructorTest() private method

private BootstrapConstructorTest ( ) : void
return void
        public void BootstrapConstructorTest()
        {
            // Example from Masters, 1995

            // Assume a small dataset
            double[] data = { 3, 5, 2, 1, 7 };

            int size = data.Length;
            int resamplings = 3;
            int subsampleSize = data.Length;


            Bootstrap target = new Bootstrap(size, resamplings, subsampleSize);

            Assert.AreEqual(3, target.B);
            Assert.AreEqual(3, target.Subsamples.Length);

            for (int i = 0; i < target.Subsamples.Length; i++)
                Assert.AreEqual(5, target.Subsamples[i].Length);
        }