Skip to content

Commit

Permalink
Rename demo datasets and add Dataset suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas committed Sep 30, 2016
1 parent 84af842 commit 349ea16
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Samples total: 214
* Features per sample: 9.
*/
class Glass extends CsvDataset
class GlassDataset extends CsvDataset
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Samples total: 150
* Features per sample: 4.
*/
class Iris extends CsvDataset
class IrisDataset extends CsvDataset
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Samples total: 178
* Features per sample: 13.
*/
class Wine extends CsvDataset
class WineDataset extends CsvDataset
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace tests\Phpml\Dataset\Demo;

use Phpml\Dataset\Demo\Glass;
use Phpml\Dataset\Demo\GlassDataset;

class GlassTest extends \PHPUnit_Framework_TestCase
class GlassDatasetTest extends \PHPUnit_Framework_TestCase
{
public function testLoadingWineDataset()
{
$glass = new Glass();
$glass = new GlassDataset();

// whole dataset
$this->assertEquals(214, count($glass->getSamples()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace tests\Phpml\Dataset\Demo;

use Phpml\Dataset\Demo\Iris;
use Phpml\Dataset\Demo\IrisDataset;

class IrisTest extends \PHPUnit_Framework_TestCase
class IrisDatasetTest extends \PHPUnit_Framework_TestCase
{
public function testLoadingIrisDataset()
{
$iris = new Iris();
$iris = new IrisDataset();

// whole dataset
$this->assertEquals(150, count($iris->getSamples()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace tests\Phpml\Dataset\Demo;

use Phpml\Dataset\Demo\Wine;
use Phpml\Dataset\Demo\WineDataset;

class WineTest extends \PHPUnit_Framework_TestCase
class WineDatasetTest extends \PHPUnit_Framework_TestCase
{
public function testLoadingWineDataset()
{
$wine = new Wine();
$wine = new WineDataset();

// whole dataset
$this->assertEquals(178, count($wine->getSamples()));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phpml/Metric/AccuracyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Phpml\Classification\SVC;
use Phpml\CrossValidation\RandomSplit;
use Phpml\Dataset\Demo\Iris;
use Phpml\Dataset\Demo\IrisDataset;
use Phpml\Metric\Accuracy;
use Phpml\SupportVectorMachine\Kernel;

Expand Down Expand Up @@ -41,7 +41,7 @@ public function testCalculateNotNormalizedScore()

public function testAccuracyOnDemoDataset()
{
$dataset = new RandomSplit(new Iris(), 0.5, 123);
$dataset = new RandomSplit(new IrisDataset(), 0.5, 123);

$classifier = new SVC(Kernel::RBF);
$classifier->train($dataset->getTrainSamples(), $dataset->getTrainLabels());
Expand Down

0 comments on commit 349ea16

Please sign in to comment.