@extends('layouts.admin') @section('content')
@foreach ($nasabah as $n) @endforeach
Nama History Pinjaman Setoran/Bulan Bunga Setoran + Bunga Sisa Pinjaman Kelayakan Cluster
{{ $n->nama }} Rp. {{ number_format($n->history_pinjaman, 0, ',', '.') }} Rp. {{ number_format($n->setoran_per_bulan, 0, ',', '.') }} Rp. {{ number_format($n->bunga, 0, ',', '.') }} Rp. {{ number_format($n->setoran_dan_bunga, 0, ',', '.') }} Rp. {{ number_format($n->sisa_pinjaman, 0, ',', '.') }} {{ $n->kelayakan }} {{ $n->cluster == 0 ? 1 : ($n->cluster == 1 ? 0 : $n->cluster) }}

Proses Iterasi K-Means

@foreach ($iterations as $iter)
Iterasi {{ $iter['iteration'] }}
@foreach ($iter['distances'] as $index => $distance) @endforeach
Nama Nasabah Jarak ke Cluster 1 Jarak ke Cluster 2 Cluster Terpilih
{{ $nasabah[$index]->nama }} {{ number_format($distance[0], 2) }} {{ number_format($distance[1], 2) }} Cluster {{ $iter['clusters'][$index] == 0 ? 1 : ($iter['clusters'][$index] == 1 ? 0 : $iter['clusters'][$index]) }}
Centroid Setelah Iterasi {{ $iter['iteration'] }}
@foreach ($iter['centroids'] as $index => $centroid) @foreach ($centroid as $value) @endforeach @endforeach
Cluster History Pinjaman Setoran/Bulan Bunga Setoran + Bunga Sisa Pinjaman
Cluster {{ $index - 1 + 1 == 0 ? 1 : ($index - 1 + 1 == 1 ? 0 : $index - 1 + 1) }} {{ number_format($value, 2) }}
@endforeach
@endsection