App Source Code:
GitHub Repository
Your Personal API Token:
MultilabelDTree Public API Endpoints:
Signs Up a User and sends him an Account Verification Email.
Request Body Example:
{
"fname": "yourFirstName",
"lname": "yourLastName",
"email": "yourEmail@email.com",
"pass": "yourPassword",
"pass_confirm": "yourPassword"
}
Response Example:
{
"message": "User signed up successfully. Verification email sent."
}
Logs in the User.
Request Body Example:
{
"email": "yourEmail@email.com",
"pass": "yourPassword"
}
Response Example:
{
"email": "yourEmail@email.com",
"token": "yourToken",
"fname": "yourFirstName",
"lname": "yourLastName"
}
Updates User's Information.
Request Body Example 1 (Updates User's Email):
{
"token": "yourToken",
"email": "yourEmail@email.com"
}
Response Example 1:
{
"message": "Verification email sent."
}
Request Body Example 2 (Updates User's Credentials - Name or Password):
{
"token": "yourToken",
"fname": "yourFirstName" | null,
"lname": "yourLastName" | null,
"pass": "yourPassword" | null,
"new_pass": "yourNewPassword" | null,
"new_pass_confirm": "yourNewPassword" | null
}
Response Example 2:
{
"fname": "yourFirstName",
"lname": "yourLastName"
}
Deletes a User's Account.
Request Body Example:
{
"token": "yourToken",
"pass_del": "yourPassword",
"pass_del_confirm": "yourPassword"
}
Response Example:
{
"message": "Account successfully deleted."
}
Returns All Uploaded Public and Private Datasets.
Response Example:
{
"public_data": ["emotions.csv", "yeast.csv",…],
"private_data": ["water-quality.csv", "flags.csv",…]
}
Uploads a .csv Dataset.
Request Body Example:
Form Data: token: "yourToken" folder: "public | private" file: (Selected File)
Response Example:
{
"message": "Dataset successfully uploaded."
}
Returns a Multilabel Dataset's Content.
Response Example:
{
"csv_array": [["landmass", "zone", "area", "population", "language",…],["3", "1", "29", "3", "6",…],["6", "3", "0", "0", "1",…],…],
"numerical_fields": ["landmass", "zone", "area", "population", "language",…],
"binary_fields": ["saltires", "crescent", "triangle", "icon", "animate",…]
}
Deletes a Dataset.
Request Body Example:
{
"token": "yourToken",
"folder": "public | private",
"file": "selectedFile.csv"
}
Response Example:
{
"message": "Dataset successfully deleted."
}
Returns All Uploaded Unclassified Datasets.
Response Example:
{
"unclassified_data": ["emotions.csv", "yeast.csv", "flags.csv",…]
}
Uploads an Unclassified .csv Dataset.
Request Body Example:
Form Data: token: "yourToken" file: {Selected File}
Response Example:
{
"message": "Dataset successfully uploaded."
}
Returns an Unclassified Dataset's Content.
Response Example:
{
"csv_array": [["landmass", "zone", "area", "population", "language",…], ["3", "1", "29", "3", "6",…], ["6", "3", "0", "0", "1",…],…]
}
Deletes an Unclassified Dataset.
Request Body Example:
{
"token": "yourToken",
"file": "selectedFile.csv"
}
Response Example:
{
"message": "Dataset successfully deleted."
}
Returns All Pretrained Models.
Response Example:
{
"models_data": ["emotions_multilabelModel.pkl", "yeast_multilabelModel.pkl", "flags_multilabelModel.pkl",…]
}
Returns a Multilabel Model's Content.
Response Example:
{
"columns": ["landmass", "zone", "colours", "circles", "icon", "animate"],
"labels": ["saltires", "crescent", "triangle", "yellow"]
"classifier_type": "BinaryRelevance",
"max_depth": 12
"min_samples_leaf": 2
}
Deletes a Pretrained Model.
Request Body Example:
{
"token": "yourToken",
"file": "selectedFile.pkl"
}
Response Example:
{
"message": "Model successfully deleted."
}
Returns All Decision Trees Visualization for the Selected Model.
Response Example:
{
"image": [
"http://localhost/MultilabelDTree/server/py/users/models/flags_multilabelModel_tree_1.png",
"http://localhost/MultilabelDTree/server/py/users/models/flags_multilabelModel_tree_2.png",
"http://localhost/MultilabelDTree/server/py/users/models/flags_multilabelModel_tree_3.png",
…
]
}
Builds a Multilabel Model with Auto Mode or by Selecting Specific Values for the Parameters, including the Problem Transformation Classifiers, DTrees and k-Fold Cross Validation Method. Finally, returns the Results of Evaluation Metrics.
Request Body Example:
{
"token": "yourToken",
"folder": "public | private",
"file": "selectedFile.csv",
"features": ["feature1", "feature2", "feature3",…],
"labels": ["label1", "label2", "label3",…],
"classifier": "Auto" | "BinaryRelevance" | "LabelPowerser" | "ClassifierChain",
"max_depth": "" | "Auto" | Integer,
"min_samples_leaf": "Auto" | Integer,
"kFoldsInt": Integer
}
Response Example:
{
"avg_hl": avg_hamming_loss,
"avg_acc": avg_accuracy
"avg_pre": avg_precision,
"avg_rec": avg_recall,
"avg_fsc": avg_f1_score,
"pre_per_label": [[precision_L1_v0, precision_L1_v1], [precision_L2_v0, precision_L2_v1], [precision_L3_v0, precision_L3_v1],…],
"rec_per_label": [[recall_L1_v0, recall_L1_v1], [recall_L2_v0, recall_L2_v1], [recall_L3_v0, recall_L3_v1],…],
"fsc_per_label": [[fscore_L1_v0, fscore_L1_v1], [fscore_L2_v0, fscore_L2_v1], [fscore_L3_v0, fscore_L3_v1],…],
"labels": [[label1_value0, label1_value1], [label2_value0, label2_value1], [label3_value0, label3_value1],…],
"classifier": best_classifier,
"max_depth": best_max_depth
"min_samples_leaf": best_min_samples_leaf,
"k": k
}
Saves the Created Multilabel Model to the User's Account.
Request Body Example:
{
"token": "yourToken",
"folder": "public | private",
"file": "selectedFile.csv",
"features": ["feature1", "feature2", "feature3",…],
"labels": ["label1", "label2", "label3",…],
"classifier": "BinaryRelevance" | "LabelPowerser" | "ClassifierChain",
"max_depth": "None" | Integer,
"min_samples_leaf": Integer,
"model_name": "yourModelName"
}
Response Example:
{
"message": "Model successfully saved."
}
Classifies the Selected Unclassified Dataset based on the Pretrained Model. Returns the Classified Data and the Results of Evaluation Metrics.
Request Body Example:
{
"token": "yourToken",
"file": "selected_unclassified_file.csv",
"model": "model_name.pkl",
"features": ["modelFeature1", "modelFeature2", "modelFeature3",…],
"labels": ["modelLabel1", "modelLabel2", "modelLabel3",…]
}
Response Example:
{
"dataset": [["landmass", "zone", "colours", "circles", "icon", "animate", "predictions_L1", "predictions_L2",…], [3, 1, 3, 0, 0, 1, 0, 1,…], [6, 3, 5, 0, 1, 1, 0, 1,…],…],
"avg_hl": avg_hl,
"avg_acc": avg_acc,
"avg_pre": avg_pre,
"avg_rec": avg_rec,
"avg_fsc": avg_fsc,
"pre_per_label": [[precision_L1_v0, precision_L1_v1], [precision_L2_v0, precision_L2_v1],…],
"rec_per_label": [[recall_L1_v0, recall_L1_v1], [recall_L2_v0, recall_L2_v1],…],
"fsc_per_label": [[fscore_L1_v0, fscore_L1_v1], [fscore_L2_v0, fscore_L2_v1],…],
"labels": [[label1_value0, label1_value1], [label2_value0, label2_value1], [label3_value0, label3_value1],…]
}
MultilabelDTree Database:
Stores Users' Personal Information.
Columns Structure:
- id - INT (11)
- fname - VARCHAR (50)
- lname - VARCHAR (50)
- email - VARCHAR (50)
- pass - VARCHAR (100)
- token - VARCHAR (100)
- email_verification - TINYINT (1)
- public_permission - TINYINT (1)
Stores Information related to the Users' Account Verification.
Columns Structure:
- id - INT (11)
- user_id - INT (11)
- verif_key - VARCHAR (100)
- creation_time - TIMESTAMP
Stores Multilabel Models' Information.
Columns Structure:
- id - INT (11)
- user_id - INT (11)
- transformation_approach - VARCHAR (50)
- model_name - VARCHAR (50)
Stores Information related to the Labels of each Model.
Columns Structure:
- id - INT (11)
- model_id - INT (11)
- label_name - VARCHAR (100)