PHP Class Camspiers\StatisticalClassifier\Classifier\Classifier

Author: Cam Spiers ([email protected])
Inheritance: implements Camspiers\StatisticalClassifier\Classifier\ClassifierInterface
Datei anzeigen Open project: camspiers/statistical-classifier

Protected Properties

Property Type Description
$dataSource Camspiers\StatisticalClassifier\DataSource\DataSourceInterface
$model Camspiers\StatisticalClassifier\Model\ModelInterface The model to apply the transforms to

Public Methods

Method Description
is ( $category, $document )
prepareModel ( ) : null Builds the model from the data source by applying transforms to the data source
setDataSource ( Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $dataSource )
setModel ( Camspiers\StatisticalClassifier\Model\ModelInterface $model )

Protected Methods

Method Description
applyTransform ( callable $transform ) : mixed Take a callable and run it passing in any additionally specified arguments
preparedModel ( ) : Camspiers\StatisticalClassifier\Model\ModelInterface Return an model which has been prepared for classification

Method Details

applyTransform() protected method

Take a callable and run it passing in any additionally specified arguments
protected applyTransform ( callable $transform ) : mixed
$transform callable
return mixed

is() public method

public is ( $category, $document )

prepareModel() abstract public method

Builds the model from the data source by applying transforms to the data source
abstract public prepareModel ( ) : null
return null

preparedModel() protected method

Return an model which has been prepared for classification
protected preparedModel ( ) : Camspiers\StatisticalClassifier\Model\ModelInterface
return Camspiers\StatisticalClassifier\Model\ModelInterface

setDataSource() public method

public setDataSource ( Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $dataSource )
$dataSource Camspiers\StatisticalClassifier\DataSource\DataSourceInterface

setModel() public method

public setModel ( Camspiers\StatisticalClassifier\Model\ModelInterface $model )
$model Camspiers\StatisticalClassifier\Model\ModelInterface

Property Details

$dataSource protected_oe property

protected DataSourceInterface,Camspiers\StatisticalClassifier\DataSource $dataSource
return Camspiers\StatisticalClassifier\DataSource\DataSourceInterface

$model protected_oe property

The model to apply the transforms to
protected ModelInterface,Camspiers\StatisticalClassifier\Model $model
return Camspiers\StatisticalClassifier\Model\ModelInterface