public function columnType(int $index) : int
    {
        if (empty($this->samples)) {
            throw new RuntimeException('Cannot determine data type'
                . ' of an empty data frame.');
        }

        $sample = reset($this->samples);

        if (!isset($sample[$index])) {
            throw new InvalidArgumentException("Column $index does"
             . ' not exist.');
        }

        return DataType::determine($sample[$index]);
    }
public function columnType(int $index) : int
    {
        if (empty($this->samples)) {
            throw new RuntimeException('Cannot determine data type'
                . ' of an empty data frame.');
        }

        $sample = reset($this->samples);

        if (!isset($sample[$index])) {
            throw new InvalidArgumentException("Column $index does"
             . ' not exist.');
        }

        return DataType::determine($sample[$index]);
    }
public function columnType ( int $ index ) : int { if ( empty ( $ this -> samples ) ) { throw new RuntimeException ( 'Cannot determine data type' . ' of an empty data frame.' ) ; } $ sample = reset ( $ this -> samples ) ; if ( ! isset ( $ sample [ $ index ] ) ) { throw new InvalidArgumentException ( "Column $index does" . ' not exist.' ) ; } return DataType :: determine ( $ sample [ $ index ] ) ; }
Get the datatype for a feature column given a column index.

@param int $index
@throws \InvalidArgumentException
@throws \RuntimeException
@return int
Get the datatype for a feature column given a column index .