Property | Type | Description | |
---|---|---|---|
$documentNormalizer | Camspiers\StatisticalClassifier\Normalizer\Document\NormalizerInterface | Takes document and makes it consistent | |
$threshold | float | boolean | ||
$tokenNormalizer | Camspiers\StatisticalClassifier\Normalizer\Token\NormalizerInterface | Takes tokenized data and makes it consistent or stem it | |
$tokenizer | Camspiers\StatisticalClassifier\Tokenizer\TokenizerInterface | Tokenizer (the way of breaking up documents) |
Method | Description | |
---|---|---|
__construct ( Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $dataSource, |
||
classify ( $document ) | ||
getProbabilities ( string $document ) : array | Returns the probabilities of the document being in each category | |
prepareModel ( ) | ||
setThreshold ( float $threshold ) | Set the threshold probability a classifier document must meet |
Method | Description | |
---|---|---|
hasThreshold ( ) : boolean | ||
prepareDocument ( string $document, |
Formats the document for use in \SVMModel |
public __construct ( Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $dataSource, |
||
$dataSource | Camspiers\StatisticalClassifier\DataSource\DataSourceInterface | |
$model | ||
$documentNormalizer | Camspiers\StatisticalClassifier\Normalizer\Document\NormalizerInterface | |
$tokenizer | Camspiers\StatisticalClassifier\Tokenizer\TokenizerInterface | |
$tokenNormalizer | Camspiers\StatisticalClassifier\Normalizer\Token\NormalizerInterface | |
$svm | ||
$threshold | null |
public getProbabilities ( string $document ) : array | ||
$document | string | |
return | array |
protected prepareDocument ( string $document, |
||
$document | string | |
$model | ||
return | array |
public setThreshold ( float $threshold ) | ||
$threshold | float | float value between 0-1 |
protected NormalizerInterface,Camspiers\StatisticalClassifier\Normalizer\Document $documentNormalizer | ||
return | Camspiers\StatisticalClassifier\Normalizer\Document\NormalizerInterface |
protected NormalizerInterface,Camspiers\StatisticalClassifier\Normalizer\Token $tokenNormalizer | ||
return | Camspiers\StatisticalClassifier\Normalizer\Token\NormalizerInterface |