public function stratify() : array
    {
        $strata = [];

        foreach ($this->_stratify() as $label => $stratum) {
            $labels = array_fill(0, count($stratum), $label);

            $strata[$label] = self::quick($stratum, $labels);
        }

        return $strata;
    }
public function stratify() : array
    {
        $strata = [];

        foreach ($this->_stratify() as $label => $stratum) {
            $labels = array_fill(0, count($stratum), $label);

            $strata[$label] = self::quick($stratum, $labels);
        }

        return $strata;
    }
public function stratify ( ) : array { $ strata = [ ] ; foreach ( $ this -> _stratify ( ) as $ label => $ stratum ) { $ labels = array_fill ( 0 , count ( $ stratum ) , $ label ) ; $ strata [ $ label ] = self :: quick ( $ stratum , $ labels ) ; } return $ strata ; }
Group samples by label and return an array of stratified datasets. i.e.
n datasets consisting of samples with the same label where n is equal to
the number of unique labels.

@return self[]
Group samples by label and return an array of stratified datasets . i . e . n datasets consisting of samples with the same label where n is equal to the number of unique labels .