\Camspiers\StatisticalClassifier\Console\Command\TestCommand

Summary

Methods
Properties
Constants
setCache()
No public properties found
No constants found
test()
configureClassifier()
configureModel()
configurePrepare()
getModel()
getDataSource()
cacheDataSource()
getContainer()
getClassifier()
$config
$cache
$container
$classifier
N/A
No private methods found
No private properties found
N/A

Properties

$config

$config : array

Holds the config from the config.json files

Type

array

$cache

$cache : \CacheCache\Cache

Holds the CacheCache\Cache instance

Type

\CacheCache\Cache

$container

$container : \Camspiers\StatisticalClassifier\Console\Command\Symfony\Component\DependencyInjection\ContainerInterface

Holds the container instance for caching

Type

\Camspiers\StatisticalClassifier\Console\Command\Symfony\Component\DependencyInjection\ContainerInterface

Methods

setCache()

setCache(\CacheCache\Cache $cache)

Allow for cache to be stored on command for setter injection

Parameters

\CacheCache\Cache $cache

The cache to store

test()

test(\Symfony\Component\Console\Output\OutputInterface $output, \Camspiers\StatisticalClassifier\Classifier\ClassifierInterface $classifier, \Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $data) : null

Classifies a data source against a classifier and outputs results

Parameters

\Symfony\Component\Console\Output\OutputInterface $output

Output object

\Camspiers\StatisticalClassifier\Classifier\ClassifierInterface $classifier

The classifier to use

\Camspiers\StatisticalClassifier\DataSource\DataSourceInterface $data

The data source

Returns

null

getModel()

getModel(string $name, bool $svm) : \Camspiers\StatisticalClassifier\Model\CachedModel

Get an CachedModel based off a model name and the Cache instance

Parameters

string $name

The name of the model

bool $svm

Returns

\Camspiers\StatisticalClassifier\Model\CachedModel

The cached model

cacheDataSource()

cacheDataSource(mixed $name)

Parameters

mixed $name

getContainer()

getContainer() : \Camspiers\StatisticalClassifier\Console\Command\Symfony\Component\DependencyInjection\ContainerInterface

Return the dependency injection container fetching it off the app if it doesn't exist

Returns

\Camspiers\StatisticalClassifier\Console\Command\Symfony\Component\DependencyInjection\ContainerInterface —

The container

getClassifier()

getClassifier(\Symfony\Component\Console\Input\InputInterface $input) : \Camspiers\StatisticalClassifier\Classifier\Classifier

Returns a classifier based of the commands input and the specified model (if exists)

Parameters

\Symfony\Component\Console\Input\InputInterface $input

The commands input

Throws

\RuntimeException

Returns

\Camspiers\StatisticalClassifier\Classifier\Classifier

The built classifier