public async Task <byte[]> ExecuteAsync(GeoImageData geoImageData, int[] includedBands,
                                                IProgress <ClusteringProgress> progress, CancellationToken cancellationToken)
        {
            if (includedBands.Length == 0 || includedBands.Length > geoImageData.Nbands)
            {
                throw new ArgumentOutOfRangeException(nameof(includedBands), "Array length out of range predefined by the GeoImageData.");
            }

            var imageLoader = new GeoImageLoader(geoImageData, includedBands);

            return(await ExecuteAsync(imageLoader, progress, cancellationToken));
        }
        private RandomForestModel Train(GeoImageData image, int[] includedBands, GeoImageData clustering, int clusteringBand)
        {
            ValidateInputImages(image, clustering);
            HandleBandCountPerSplitValue(includedBands.Length);

            _progress.Report(ClusteringProgress.Initializing(TreeCount));

            var imageLoader = new GeoImageLoader(image, includedBands);

            byte[][] points = imageLoader.LoadJaggedBands();

            var targetLoader = new GeoImageLoader(clustering, clusteringBand);

            byte[] targets = targetLoader.LoadPoints(); //RandomForestUtilities.LoadPoints(clustering, clusteringBand);

            return(TrainForestModel(points, targets, includedBands.Length));
        }