PHP Class Phpml\CrossValidation\Split

显示文件 Open project: php-ai/php-ml

Protected Properties

Property Type Description
$testLabels array
$testSamples array
$trainLabels array
$trainSamples array

Public Methods

Method Description
__construct ( Phpml\Dataset\Dataset $dataset, float $testSize = 0.3, integer $seed = null )
getTestLabels ( ) : array
getTestSamples ( ) : array
getTrainLabels ( ) : array
getTrainSamples ( ) : array

Protected Methods

Method Description
seedGenerator ( integer $seed = null )
splitDataset ( Phpml\Dataset\Dataset $dataset, float $testSize )

Method Details

__construct() public method

public __construct ( Phpml\Dataset\Dataset $dataset, float $testSize = 0.3, integer $seed = null )
$dataset Phpml\Dataset\Dataset
$testSize float
$seed integer

getTestLabels() public method

public getTestLabels ( ) : array
return array

getTestSamples() public method

public getTestSamples ( ) : array
return array

getTrainLabels() public method

public getTrainLabels ( ) : array
return array

getTrainSamples() public method

public getTrainSamples ( ) : array
return array

seedGenerator() protected method

protected seedGenerator ( integer $seed = null )
$seed integer

splitDataset() abstract protected method

abstract protected splitDataset ( Phpml\Dataset\Dataset $dataset, float $testSize )
$dataset Phpml\Dataset\Dataset
$testSize float

Property Details

$testLabels protected_oe property

protected array $testLabels
return array

$testSamples protected_oe property

protected array $testSamples
return array

$trainLabels protected_oe property

protected array $trainLabels
return array

$trainSamples protected_oe property

protected array $trainSamples
return array