mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-12-01 09:13:54 +00:00
Use __DIR__ instead of dirname
This commit is contained in:
parent
a4f65bd13f
commit
fd85033339
@ -22,7 +22,7 @@ class GlassDataset extends CsvDataset
|
|||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$filepath = dirname(__FILE__).'/../../../../data/glass.csv';
|
$filepath = __DIR__.'/../../../../data/glass.csv';
|
||||||
parent::__construct($filepath, 9, true);
|
parent::__construct($filepath, 9, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ class IrisDataset extends CsvDataset
|
|||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$filepath = dirname(__FILE__).'/../../../../data/iris.csv';
|
$filepath = __DIR__.'/../../../../data/iris.csv';
|
||||||
parent::__construct($filepath, 4, true);
|
parent::__construct($filepath, 4, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ class WineDataset extends CsvDataset
|
|||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$filepath = dirname(__FILE__).'/../../../../data/wine.csv';
|
$filepath = __DIR__.'/../../../../data/wine.csv';
|
||||||
parent::__construct($filepath, 13, true);
|
parent::__construct($filepath, 13, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ class SupportVectorMachine
|
|||||||
$this->shrinking = $shrinking;
|
$this->shrinking = $shrinking;
|
||||||
$this->probabilityEstimates = $probabilityEstimates;
|
$this->probabilityEstimates = $probabilityEstimates;
|
||||||
|
|
||||||
$rootPath = realpath(implode(DIRECTORY_SEPARATOR, [dirname(__FILE__), '..', '..', '..'])).DIRECTORY_SEPARATOR;
|
$rootPath = realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', '..', '..'])).DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
$this->binPath = $rootPath.'bin'.DIRECTORY_SEPARATOR.'libsvm'.DIRECTORY_SEPARATOR;
|
$this->binPath = $rootPath.'bin'.DIRECTORY_SEPARATOR.'libsvm'.DIRECTORY_SEPARATOR;
|
||||||
$this->varPath = $rootPath.'var'.DIRECTORY_SEPARATOR;
|
$this->varPath = $rootPath.'var'.DIRECTORY_SEPARATOR;
|
||||||
|
Loading…
Reference in New Issue
Block a user