Exemple #1
0
 public static function getIndexNewconfs(&$jsonNewconfs, &$jsonNewconfsHeader, $dbml)
 {
     $query = "SELECT mj.*, COUNT(mc.sid_minconfigs_centers) AS num_centers\n\t\t\tFROM (\tSELECT DISTINCT m.id_minconfigs AS id_minconfigs, m.model AS model, m.is_new as is_new, m.dataslice AS advanced,\n\t\t\t\t\tm.creation_time AS creation_time, COUNT(mp.sid_minconfigs_props) AS num_props, l.algorithm\n\t\t\t\tFROM aloja_ml.minconfigs AS m LEFT JOIN aloja_ml.minconfigs_props AS mp ON m.id_minconfigs = mp.id_minconfigs, aloja_ml.learners AS l\n\t\t\t\tWHERE l.id_learner = m.id_learner\n\t\t\t\tGROUP BY m.id_minconfigs\n\t\t\t) AS mj LEFT JOIN aloja_ml.minconfigs_centers AS mc ON mj.id_minconfigs = mc.id_minconfigs\n\t\t\tWHERE mj.is_new = 1\n\t\t\tGROUP BY mj.id_minconfigs\n\t\t\t";
     $rows = $dbml->query($query);
     $jsonNewconfs = '[';
     foreach ($rows as $row) {
         $url = MLUtils::revertModelToURL($row['model'], $row['advanced'], 'presets=none&submit=&learner[]=' . $row['algorithm']);
         $model_display = MLUtils::display_models_noasts($row['model']);
         $slice_display = MLUtils::display_models_noasts($row['advanced']);
         $jsonNewconfs = $jsonNewconfs . ($jsonNewconfs == '[' ? '' : ',') . "['" . $row['id_minconfigs'] . "','" . $row['algorithm'] . "','" . $model_display . "','" . $slice_display . "','" . $row['creation_time'] . "','" . $row['num_props'] . "','" . $row['num_centers'] . "',\n\t\t\t'<a href=\\'/mlnewconfigs?" . $url . "\\'>View</a> <a href=\\'/mlclearcache?rmm=" . $row['id_minconfigs'] . "\\'>Remove</a>']";
     }
     $jsonNewconfs = $jsonNewconfs . ']';
     $jsonNewconfsHeader = "[{'title':'ID'},{'title':'Algorithm'},{'title':'Attribute Selection'},{'title':'Advanced Filters'},{'title':'Creation'},{'title':'Properties'},{'title':'Centers'},{'title':'Actions'}]";
 }
Exemple #2
0
 public static function getIndexPrecExps(&$jsonPrecexps, &$jsonPrecexpsHeader, $dbml)
 {
     $query = "SELECT id_precision, model, dataslice, creation_time FROM aloja_ml.precisions GROUP BY id_precision";
     $rows = $dbml->query($query);
     $jsonPrecexps = '[';
     foreach ($rows as $row) {
         $url = MLUtils::revertModelToURL($row['model'], $row['dataslice'], 'presets=none&submit=&');
         $model_display = MLUtils::display_models_noasts($row['model']);
         $slice_display = MLUtils::display_models_noasts($row['dataslice']);
         $jsonPrecexps = $jsonPrecexps . ($jsonPrecexps == '[' ? '' : ',') . "['" . $row['id_precision'] . "','" . $model_display . "','" . $slice_display . "','" . $row['creation_time'] . "','<a href=\\'/mlprecision?" . $url . "\\'>View</a> <a href=\\'/mlclearcache?rmp=" . $row['id_precision'] . "\\'>Remove</a>']";
     }
     $jsonPrecexps = $jsonPrecexps . ']';
     $jsonPrecexpsHeader = "[{'title':'ID'},{'title':'Attribute Selection'},{'title':'Advanced Filters'},{'title':'Creation'},{'title':'Actions'}]";
 }