public function sortByLabel(bool $descending = false) : Dataset
    {
        array_multisort(
            $this->labels,
            $this->samples,
            $descending ? SORT_DESC : SORT_ASC
        );

        return $this;
    }
public function sortByLabel(bool $descending = false) : Dataset
    {
        array_multisort(
            $this->labels,
            $this->samples,
            $descending ? SORT_DESC : SORT_ASC
        );

        return $this;
    }
public function sortByLabel ( bool $ descending = false ) : Dataset { array_multisort ( $ this -> labels , $ this -> samples , $ descending ? SORT_DESC : SORT_ASC ) ; return $ this ; }
Sort the dataset in place by its labels.

@param bool $descending
@return \Rubix\ML\Datasets\Dataset
Sort the dataset in place by its labels .