Phpml\Metric\ClassificationReport::computeMetrics PHP Method

computeMetrics() private method

private computeMetrics ( array $truePositive, array $falsePositive, array $falseNegative )
$truePositive array
$falsePositive array
$falseNegative array
    private function computeMetrics(array $truePositive, array $falsePositive, array $falseNegative)
    {
        foreach ($truePositive as $label => $tp) {
            $this->precision[$label] = $this->computePrecision($tp, $falsePositive[$label]);
            $this->recall[$label] = $this->computeRecall($tp, $falseNegative[$label]);
            $this->f1score[$label] = $this->computeF1Score((double) $this->precision[$label], (double) $this->recall[$label]);
        }
    }