tipe = $type; } public function headings(): array { return array( '#', 'Nama', ProbabLabel::$label[true], ProbabLabel::$label[false], 'Kelas Prediksi', 'Kelas Asli' ); } /** * @return \Illuminate\Support\Collection */ public function query() { if ($this->tipe === 'train' || $this->tipe === 'test') return Classification::query()->where('type', $this->tipe); return Classification::query(); } public function map($class): array { global $index; return array( ++$index, $class->name, $class->true ?? 0.00, $class->false ?? 0.00, ProbabLabel::$label[$class->predicted], ProbabLabel::$label[$class->real] ); } }