프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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) |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 | array |
protected prepareDocument ( string $document, |
||
$document | string | |
$model | ||
리턴 | array |
public setThreshold ( float $threshold ) | ||
$threshold | float | float value between 0-1 |
protected NormalizerInterface,Camspiers\StatisticalClassifier\Normalizer\Document $documentNormalizer | ||
리턴 | Camspiers\StatisticalClassifier\Normalizer\Document\NormalizerInterface |
protected NormalizerInterface,Camspiers\StatisticalClassifier\Normalizer\Token $tokenNormalizer | ||
리턴 | Camspiers\StatisticalClassifier\Normalizer\Token\NormalizerInterface |