public static function split(Dataset $dataset) : self
    {
        $column = rand(0, $dataset->numColumns() - 1);

        $sample = $dataset[rand(0, count($dataset) - 1)];

        $value = $sample[$column];

        $groups = $dataset->partition($column, $value);

        return new self($column, $value, $groups);
    }
public static function split(Dataset $dataset) : self
    {
        $column = rand(0, $dataset->numColumns() - 1);

        $sample = $dataset[rand(0, count($dataset) - 1)];

        $value = $sample[$column];

        $groups = $dataset->partition($column, $value);

        return new self($column, $value, $groups);
    }
public static function split ( Dataset $ dataset ) : self { $ column = rand ( 0 , $ dataset -> numColumns ( ) - 1 ) ; $ sample = $ dataset [ rand ( 0 , count ( $ dataset ) - 1 ) ] ; $ value = $ sample [ $ column ] ; $ groups = $ dataset -> partition ( $ column , $ value ) ; return new self ( $ column , $ value , $ groups ) ; }
Factory method to build a isolator node from a dataset
using a random split of the dataset.

@param \Rubix\ML\Datasets\Dataset $dataset
@return self
Factory method to build a isolator node from a dataset using a random split of the dataset .