mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-22 13:05:10 +00:00
Add no_unused_imports rule to cs-fixer
This commit is contained in:
parent
c028a73985
commit
63c63dfba2
1
.php_cs
1
.php_cs
@ -7,6 +7,7 @@ return PhpCsFixer\Config::create()
|
|||||||
'array_syntax' => ['syntax' => 'short'],
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
'blank_line_after_opening_tag' => true,
|
'blank_line_after_opening_tag' => true,
|
||||||
'single_blank_line_before_namespace' => true,
|
'single_blank_line_before_namespace' => true,
|
||||||
|
'no_unused_imports' => true
|
||||||
])
|
])
|
||||||
->setFinder(
|
->setFinder(
|
||||||
PhpCsFixer\Finder::create()
|
PhpCsFixer\Finder::create()
|
||||||
|
@ -6,10 +6,8 @@ namespace Phpml\Classification\Ensemble;
|
|||||||
|
|
||||||
use Phpml\Helper\Predictable;
|
use Phpml\Helper\Predictable;
|
||||||
use Phpml\Helper\Trainable;
|
use Phpml\Helper\Trainable;
|
||||||
use Phpml\Math\Statistic\Mean;
|
|
||||||
use Phpml\Classification\Classifier;
|
use Phpml\Classification\Classifier;
|
||||||
use Phpml\Classification\DecisionTree;
|
use Phpml\Classification\DecisionTree;
|
||||||
use Phpml\Classification\NaiveBayes;
|
|
||||||
|
|
||||||
class Bagging implements Classifier
|
class Bagging implements Classifier
|
||||||
{
|
{
|
||||||
|
@ -4,9 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Phpml\Classification\Ensemble;
|
namespace Phpml\Classification\Ensemble;
|
||||||
|
|
||||||
use Phpml\Classification\Ensemble\Bagging;
|
|
||||||
use Phpml\Classification\DecisionTree;
|
use Phpml\Classification\DecisionTree;
|
||||||
use Phpml\Classification\NaiveBayes;
|
|
||||||
use Phpml\Classification\Classifier;
|
use Phpml\Classification\Classifier;
|
||||||
|
|
||||||
class RandomForest extends Bagging
|
class RandomForest extends Bagging
|
||||||
|
@ -4,10 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Phpml\Classification\Linear;
|
namespace Phpml\Classification\Linear;
|
||||||
|
|
||||||
use Phpml\Helper\Predictable;
|
|
||||||
use Phpml\Helper\Trainable;
|
|
||||||
use Phpml\Classification\Classifier;
|
use Phpml\Classification\Classifier;
|
||||||
use Phpml\Classification\Linear\Perceptron;
|
|
||||||
|
|
||||||
class Adaline extends Perceptron
|
class Adaline extends Perceptron
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||||||
namespace Phpml\Classification\Linear;
|
namespace Phpml\Classification\Linear;
|
||||||
|
|
||||||
use Phpml\Helper\Predictable;
|
use Phpml\Helper\Predictable;
|
||||||
use Phpml\Helper\Trainable;
|
|
||||||
use Phpml\Classification\Classifier;
|
use Phpml\Classification\Classifier;
|
||||||
use Phpml\Preprocessing\Normalizer;
|
use Phpml\Preprocessing\Normalizer;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Phpml\Classification;
|
namespace Phpml\Classification;
|
||||||
|
|
||||||
use Phpml\Classification\Classifier;
|
|
||||||
|
|
||||||
abstract class WeightedClassifier implements Classifier
|
abstract class WeightedClassifier implements Classifier
|
||||||
{
|
{
|
||||||
protected $weights = null;
|
protected $weights = null;
|
||||||
|
@ -7,7 +7,6 @@ namespace tests\Classification\Ensemble;
|
|||||||
use Phpml\Classification\Ensemble\Bagging;
|
use Phpml\Classification\Ensemble\Bagging;
|
||||||
use Phpml\Classification\DecisionTree;
|
use Phpml\Classification\DecisionTree;
|
||||||
use Phpml\Classification\NaiveBayes;
|
use Phpml\Classification\NaiveBayes;
|
||||||
use Phpml\Classification\KNearestNeighbors;
|
|
||||||
use Phpml\ModelManager;
|
use Phpml\ModelManager;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
@ -7,9 +7,6 @@ namespace tests\Classification\Ensemble;
|
|||||||
use Phpml\Classification\Ensemble\RandomForest;
|
use Phpml\Classification\Ensemble\RandomForest;
|
||||||
use Phpml\Classification\DecisionTree;
|
use Phpml\Classification\DecisionTree;
|
||||||
use Phpml\Classification\NaiveBayes;
|
use Phpml\Classification\NaiveBayes;
|
||||||
use Phpml\Classification\KNearestNeighbors;
|
|
||||||
use Phpml\ModelManager;
|
|
||||||
use tests\Classification\Ensemble\BaggingTest;
|
|
||||||
|
|
||||||
class RandomForestTest extends BaggingTest
|
class RandomForestTest extends BaggingTest
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user