Skip to content
Snippets Groups Projects
Commit 6643f226 authored by Alex's avatar Alex
Browse files

use casts in Wowa to obtain directly weights as a PHP array/ Easier to manipulate

parent 6278caed
No related branches found
No related tags found
1 merge request!1Include Wowa Training
......@@ -17,6 +17,11 @@ class Wowa extends Model
self::STATE_FAILED => "btn_danger"
];
protected $casts = [
'w_weights' => 'array',
'p_weights' => 'array',
];
private function getStatusBadgeClass()
{
$status = $this->status;
......@@ -72,4 +77,8 @@ class Wowa extends Model
return $this->pr;
}
}
public function weightsP()
{
return $this->w_weights->toArray();
}
}
......@@ -35,10 +35,10 @@
<b>Generation number</b> : {{ $wowa->generation_number }}
</p>
<p>
<b>Weights W Vector</b> : {{ $wowa->displayWeightsW() }}
<b>Weights W Vector</b> : {{ $wowa->w_weights[0] }}
</p>
<p>
<b>Weights P Vector</b> : {{ $wowa->displayWeightsP() }}
<b>Weights P Vector</b> : {{ $wowa->p_weights[0] }}
</p>
<p>
<b>AUC Roc curve</b> : {{ $wowa->roc() }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment