Example #1
0
        /// <summary>
        /// Randomly permute it so that we train in random order
        /// </summary>
        public void Shuffle()
        {
            bool randomize = PGetb("randomize");

            if (randomize)
            {
                Intarray permutation = new Intarray(all_lines.Dim(0));
                for (int i = 0; i < all_lines.Dim(0); i++)
                {
                    permutation[i] = i;
                }
                NarrayUtil.RandomlyPermute(permutation);
                NarrayRowUtil.RowPermute(all_lines, permutation);
            }
        }