예제 #1
0
파일: labels.py 프로젝트: Piuliss/SecuML
def getLabelsFamilies(experiment_id, iteration_max):
    experiment = updateCurrentExperiment(experiment_id)
    if iteration_max == 'None':
        iteration_max = None
    else:
        iteration_max = int(iteration_max)
    labels_families = labels_tools.getLabelsFamilies(
        session, experiment.labels_id, iteration_max=iteration_max)
    return jsonify(labels_families)
예제 #2
0
파일: labels.py 프로젝트: r3dlight/SecuML
def getLabelsFamilies(project, dataset, experiment_label_id, iteration_max):
    if iteration_max == 'None':
        iteration_max = None
    else:
        iteration_max = int(iteration_max)
    mysql_tools.useDatabase(cursor, project, dataset)
    db.commit()
    labels_families = labels_tools.getLabelsFamilies(
        cursor, experiment_label_id, iteration_max=iteration_max)
    return jsonify(labels_families)
예제 #3
0
파일: labels.py 프로젝트: Piuliss/SecuML
def getFamiliesInstances(experiment_id, label, iteration_max):
    experiment = updateCurrentExperiment(experiment_id)
    if iteration_max == 'None':
        iteration_max = None
    else:
        iteration_max = int(iteration_max)
    families = labels_tools.getLabelsFamilies(
        session, experiment.labels_id, iteration_max=iteration_max)[label]
    families_instances = {}
    for f in families:
        families_instances[f] = labels_tools.getLabelFamilyIds(
            session,
            experiment.labels_id,
            label,
            family=f,
            iteration_max=iteration_max)
    return jsonify(families_instances)
예제 #4
0
파일: labels.py 프로젝트: r3dlight/SecuML
def getFamiliesInstances(project, dataset, experiment_label_id, label,
                         iteration_max):
    if iteration_max == 'None':
        iteration_max = None
    else:
        iteration_max = int(iteration_max)
    mysql_tools.useDatabase(cursor, project, dataset)
    db.commit()
    families = labels_tools.getLabelsFamilies(
        cursor, experiment_label_id, iteration_max=iteration_max)[label]
    families_instances = {}
    for f in families:
        families_instances[f] = labels_tools.getLabelFamilyIds(
            cursor,
            experiment_label_id,
            label,
            family=f,
            iteration_max=iteration_max)
    return jsonify(families_instances)
예제 #5
0
파일: Cluster.py 프로젝트: Piuliss/SecuML
 def getClusterLabelsFamilies(self, session, label_experiment_id):
     labels_family = labels_tools.getLabelsFamilies(session,
                                                    label_experiment_id,
                                                    self.instances_ids)
     return labels_family