mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-21 20:45:10 +00:00
Speed up DataTransformer (#122)
This commit is contained in:
parent
b1be0574d8
commit
03751f51ed
@ -57,7 +57,7 @@ class DataTransformer
|
||||
$numericLabels = self::numericLabels($labels);
|
||||
$results = [];
|
||||
foreach (explode(PHP_EOL, $rawPredictions) as $result) {
|
||||
if (strlen($result) > 0) {
|
||||
if (isset($result[0])) {
|
||||
$results[] = array_search($result, $numericLabels);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user