public function priors() : array
    {
        $priors = [];

        if (is_array($this->priors)) {
            $max = logsumexp($this->priors);

            foreach ($this->priors as $class => $probability) {
                $priors[$class] = exp($probability - $max);
            }
        }

        return $priors;
    }