Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 0844a7db authored by Alain Shakour's avatar Alain Shakour
Browse files

Add descriptions + fix multiple classes to binary score widget

parent c1c2c73d
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"description": "It transforms a Orange Data Table into the Prd and Fct files used by Tertius, 1BC and 1BC2 widget. Its input is a Database context widget.",
"static_image": "",
"action": "odt_to_prd_fct",
"visualization_view": "",
......@@ -28,7 +28,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "70718b14-851b-40ed-9091-3e83a95bee5e",
"name": "Orange Data Table",
"name": "orange data table",
"short_name": "odt",
"default": "",
"description": "Orange Data Table",
......@@ -45,9 +45,9 @@
"model": "workflows.abstractoutput",
"fields": {
"widget": "70718b14-851b-40ed-9091-3e83a95bee5e",
"name": "FCT",
"name": "fct file",
"short_name": "fct",
"description": "Fct file",
"description": "a fct file to Tertius, 1BC or 1BC2",
"variable": "fct",
"order": 2,
"uid": "1f6c8d49-771c-4614-87fe-d8b973d02caf"
......@@ -57,9 +57,9 @@
"model": "workflows.abstractoutput",
"fields": {
"widget": "70718b14-851b-40ed-9091-3e83a95bee5e",
"name": "PRD",
"name": "prd file",
"short_name": "prd",
"description": "Prd file",
"description": "a prd file to Tertius, 1BC or 1BC2",
"variable": "prd",
"order": 1,
"uid": "5b7b93f9-6596-4840-8461-b52718c0bce9"
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"description": "It generates files for khiops.",
"static_image": "",
"action": "odt_to_kdic",
"visualization_view": "",
......@@ -28,7 +28,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "777bee59-4e3f-4818-91f4-78d9c020d622",
"name": "Orange Data Table",
"name": "orange data table",
"short_name": "odt",
"default": "",
"description": "Orange Data Table",
......@@ -47,7 +47,7 @@
"widget": "777bee59-4e3f-4818-91f4-78d9c020d622",
"name": "KDIC",
"short_name": "kdc",
"description": "",
"description": "Header file",
"variable": "kdic",
"order": 1,
"uid": "075d553f-5133-4023-8148-5a2edc520af3"
......@@ -59,7 +59,7 @@
"widget": "777bee59-4e3f-4818-91f4-78d9c020d622",
"name": "TXT",
"short_name": "txt",
"description": "",
"description": "CSV file",
"variable": "txt",
"order": 2,
"uid": "8d0df2c8-5969-4a82-b752-376534beea04"
......
......@@ -173,13 +173,23 @@ def ilp_multiple_classes_to_one_binary_score(input_dict):
if neg_col < 0:
raise Exception('"Negative column number" should be a positive integer')
output_dict['binary_score'] = to_binary_score(input_dict['multiple_class'],int(input_dict['pos_col'])-1,int(input_dict['neg_col'])-1)
output_dict['binary_score'] = to_binary_score(input_dict['multiple_classes'],int(input_dict['pos_col']),int(input_dict['neg_col']))
return output_dict
def to_binary_score(multiple_score,pos_col,neg_col):
score_line = multiple_score.strip().split('\n')
score_arr = [x.split(',') for x in score_line]
actual = [int(x[1]) for x in score_arr if int(x[1]) == 0 or int(x[1]) == 1]
predicted = [float(x[pos_col]) - float(x[neg_col]) for x in score_arr if int(x[1]) == 0 or int(x[1]) == 1]
pos_tag = pos_col - 3
neg_tag = neg_col - 3
actual = []
predicted = []
for x in score_arr:
if int(x[1]) == pos_tag:
actual.append(1)
predicted.append(float(x[pos_col-1]) - float(x[neg_col-1]))
elif int(x[1]) == neg_tag:
actual.append(0)
predicted.append(float(x[pos_col-1]) - float(x[neg_col-1]))
res = {"name":"Curve", "actual":actual, "predicted":predicted}
return res
\ No newline at end of file
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"description": "It extracts a binary score from multiple class scores.\r\n\r\nThe input is a string containing a table. Each line corresponds to a test instance and contains its identifier, its true class, the scores for every classes. It can be connected to 1BC and 1BC2 widgets.\r\n\r\nIt generates a string containing the list of true classes and the list of one binary score. It is intended to be connected to the Prepare Performance curve data widget to display a ROC curve.\r\n\r\nIts parameters are the indexes (starting from 3) of the classes considered as the positive and negative classes.",
"static_image": "",
"action": "ilp_multiple_classes_to_one_binary_score",
"visualization_view": "",
......@@ -28,14 +28,14 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "369036e8-496d-4404-9419-7f72388d0412",
"name": "multiple class",
"name": "multiple classes",
"short_name": "scr",
"default": "",
"description": "",
"description": "A string containing the identifiers, true classes and scores for all classes of test instances. From a scorer such as the 1BC and 1BC2 first-order bayesian classifiers.",
"required": true,
"multi": false,
"parameter_type": "file",
"variable": "multiple_class",
"variable": "multiple_classes",
"parameter": false,
"order": 1,
"uid": "66f97096-762b-471e-8e83-c24c8cf331b6"
......@@ -48,7 +48,7 @@
"name": "negative column",
"short_name": "neg",
"default": "3",
"description": "",
"description": "The number of the column of scores to be considered as the negative class.",
"required": true,
"multi": false,
"parameter_type": "text",
......@@ -65,7 +65,7 @@
"name": "positive column",
"short_name": "pos",
"default": "4",
"description": "",
"description": "The number of the column of scores to be considered as the positive class.",
"required": true,
"multi": false,
"parameter_type": "text",
......@@ -81,7 +81,7 @@
"widget": "369036e8-496d-4404-9419-7f72388d0412",
"name": "binary score",
"short_name": "scr",
"description": "",
"description": "To the Prepare Performance curve data widget",
"variable": "binary_score",
"order": 1,
"uid": "bb59537b-e424-4ce9-a017-095791dd29b5"
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"description": "1BC is a 1st-order logic naive Bayesian Classifier. It can deal with a relational database thanks to the Database To Prd and Fct files widget.\r\n\r\nIt takes several files as inputs. All of them should have the same name but different extensions\u00a0:\r\n- prd: this file contains the langage bias, roughly defining the target individual (i.e. primary table), the structural predicates (i.e. foreign keys between tables) and properties (i.e. other columns)\r\n- fct: this file contains facts (i.e. lines of tables), often grouped into partitions by individuals (this grouping enable to use the incremental loading and learning).\r\n- tst: actually it is another fact file that is used for testing the model learned from the fct file.\r\n\r\n1BC outputs\u00a0:\r\n- res: It is a string that can be sent to the Display String widget or the String to file widget. It contains the interval limits for each discretised type if any, the conditional probabilities of all first-order features and the accuracy.\r\n- scr: It is a string that can be sent to the Display String widget or to the Multiple Classes to One Binary Score widget to prepare a ROC curve. It lists, for each test instance, its identifier, its true class, and the predicted score for every classes.\r\n\r\n1BC can be seen as a propositionalisation into elementary first-order features, similar to wordification, followed by a standard attribute-value naive bayesian classifier:\r\nP. Flach, N. Lachiche. 1BC: A first-order bayesian classifier, Proceedings of the ninth international workshop on inductive logic programming (ILP'99), pages 92-103, Saso Dzeroski and Peter Flach (Eds.), Springer, LNCS, Volume 1634, 1999, http://dx.doi.org/10.1007/3-540-48751-4_10\r\nP. Flach, N. Lachiche. Naive Bayesian classification of structured data, Machine Learning, Springer Verlag (Germany) (IF : 1.689), pages 233--269, Volume 57, No 3, 2004, http://dx.doi.org/doi:10.1023/B:MACH.0000039778.69032.ab",
"static_image": "ilp.png",
"action": "ilp_1bc",
"visualization_view": "",
......@@ -28,10 +28,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Attribute List",
"name": "attribute List",
"short_name": "att",
"default": "",
"description": "Attribute name, Number of intervals the attribute has to be discretised in, and a kind of discretisation (sdm: standard deviation centered on the mean, eqb: equal bins)\r\nFormat: \r\ncol1 nbIntervalCol1 sdm, col2 nbInstanceCol2 eqb",
"description": "Attribute name, Number of intervals the attribute has to be discretised in, and a kind of discretisation (sdm: standard deviation centered on the mean, eqb: equal bins)\r\nFormat: col1 nbIntervalCol1 sdm, col2 nbIntervalCol2 eqb",
"required": false,
"multi": false,
"parameter_type": "textarea",
......@@ -45,10 +45,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Cross validation folds",
"name": "cross validation folds",
"short_name": "crs",
"default": "1",
"description": "the number of partition to apply a cross-validation on the dataset",
"description": "The number of folds to apply a cross-validation on the dataset (from the fct file)",
"required": false,
"multi": false,
"parameter_type": "text",
......@@ -62,10 +62,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Max Lit",
"name": "max lit",
"short_name": "lit",
"default": "3",
"description": "Max Literals",
"description": "The maximum number of literals. Usually the number of kinds of objects (i.e. tables) plus 1.",
"required": true,
"multi": false,
"parameter_type": "text",
......@@ -79,10 +79,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Load partitions incrementally",
"name": "load partitions incrementally",
"short_name": "inc",
"default": "",
"description": "load partitions incrementaly, useful when the training set is too to be loaded in one go",
"description": "Load partitions (a partition contains all facts about an individual) incrementaly, useful when the training set is too to be loaded in one go",
"required": false,
"multi": false,
"parameter_type": "checkbox",
......@@ -99,7 +99,7 @@
"name": "ROC nb folds (-1 if no ROC)",
"short_name": "rcn",
"default": "-1",
"description": "number_of_folds to find the best threshold using an internal cross-validation according to roc curve for Bayesian classification",
"description": "Number of folds to find the best threshold using an internal cross-validation according to ROC curve",
"required": false,
"multi": false,
"parameter_type": "text",
......@@ -113,10 +113,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Fct File",
"name": "fct file",
"short_name": "fct",
"default": "",
"description": "Fct File",
"description": "A fct file from a Load file widget or a Database to Prd and Fct files widget (it contains the training set)",
"required": true,
"multi": false,
"parameter_type": "file",
......@@ -130,10 +130,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Random seed",
"name": "random seed",
"short_name": "ran",
"default": "0",
"description": "an integer for initialising the random seed",
"description": "An integer for initialising the random generator",
"required": false,
"multi": false,
"parameter_type": "text",
......@@ -147,10 +147,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Test File",
"name": "test file",
"short_name": "tst",
"default": "",
"description": "Test File",
"description": "A test file from a Load file widget or a Database to Prd and Fct files widget (it is a fct file for testing)",
"required": false,
"multi": false,
"parameter_type": "file",
......@@ -164,10 +164,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Prd File",
"name": "prd file",
"short_name": "prd",
"default": "",
"description": "Prd File",
"description": "A prd file from a Load file widget or a Database to Prd and Fct files widget",
"required": true,
"multi": false,
"parameter_type": "file",
......@@ -181,10 +181,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "Max Var",
"name": "max var",
"short_name": "var",
"default": "2",
"description": "Max Variables",
"description": "The maximum number of variables. Usually the number of kinds of objects (i.e. tables). ",
"required": true,
"multi": false,
"parameter_type": "text",
......@@ -200,7 +200,7 @@
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "results",
"short_name": "res",
"description": "",
"description": "The results to send to the Display String widget or a String to file widget",
"variable": "results",
"order": 1,
"uid": "63fa4451-4f98-406c-ba4a-d2feb83c2eaa"
......@@ -212,7 +212,7 @@
"widget": "508c9bf5-a874-4027-beb3-3f4f4320e5a0",
"name": "score",
"short_name": "scr",
"description": "",
"description": "The identifiers, true classes and scores for all classes of test instances. To send to any widget for strings or to the Multiple Classes to One Binary Score widget to prepare a ROC curve.",
"variable": "score",
"order": 2,
"uid": "77c361d0-7a91-48b1-b1c5-ec72e3063cb0"
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"description": "Tertius learns rules in first-order logic. It can deal with a relational database thanks to the Database To Prd and Fct files widget.\r\n\r\nIt takes several files as inputs. All of them should have the same name but different extensions:\r\n- prd: this file contains the langage bias, roughly defining the target individual (i.e. primary table), the structural predicates (i.e. foreign keys between tables) and properties (i.e. other columns)\r\n- fct: this file contains facts (i.e. lines of tables), often grouped into partitions by individuals (this grouping enable to use the incremental loading and learning).\r\n\r\nIt outputs its results as a string that can be sent to the Display String widget or String to file widget.\r\n\r\nIt is an supervised learner that learns rules having the best confirmation as explained in:\r\nP. Flach, N. Lachiche. Confirmation-Guided Discovery of First-Order Rules with Tertius, Machine Learning, Springer Verlag (Germany) (IF : 1.689), pages 61--95, Volume 42, No 1/2, 2001, doi:10.1023/A:1007656703224\r\n\r\nSeveral langage biases can be selected, namely\u00a0:\r\n- none\r\n- Horn clauses only\r\n- class\u00a0: use the first property of the prd file as head of rules\r\n- pos class\u00a0: use the first property of the prd file as a positive literal in the head of rules\r\n- pos horn class\u00a0: use the first property of the prd file as a positive literal in the head of horn clauses",
"static_image": "ilp.png",
"action": "ilp_tertius",
"visualization_view": "",
......@@ -28,16 +28,16 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Max Var",
"name": "max var",
"short_name": "var",
"default": "3",
"description": "Max Variables",
"description": "The maximum number of variables",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "max_variable",
"parameter": true,
"order": 5,
"order": 4,
"uid": "19cb37ac-3d43-4b51-a365-aceac4a14bd0"
}
},
......@@ -45,33 +45,16 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Test File",
"short_name": "tst",
"default": "",
"description": "Test File",
"required": false,
"multi": false,
"parameter_type": "file",
"variable": "test_file",
"parameter": false,
"order": 3,
"uid": "3a99c057-39fb-4598-b27c-19fef081ce5c"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Confirmation threshold (-1 if nb. results)",
"name": "confirmation threshold (-1 if nb. results)",
"short_name": "cft",
"default": "-1",
"description": "Confirmation threshold (-1 if nb. results)",
"description": "Minimum threshold on the confirmation (-1 if Number of Results is used)",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "conf_thres",
"parameter": true,
"order": 11,
"order": 9,
"uid": "533aa8f9-239c-402e-b243-7a0c42ad80cf"
}
},
......@@ -79,16 +62,16 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Number of results (-1 if conf. thres.)",
"name": "number of results (-1 if conf. thres.)",
"short_name": "nbr",
"default": "10",
"description": "Number of results (-1 if conf. thres.)",
"description": "Number of results (-1 if the confirmation threshold is used)",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "nb_results",
"parameter": true,
"order": 10,
"order": 8,
"uid": "56b9231e-0253-4387-a47b-cd6782d87527"
}
},
......@@ -99,13 +82,13 @@
"name": "Attribute list",
"short_name": "att",
"default": "",
"description": "Attribute name, Number of intervals the attribute has to be discretised in, and a kind of discretisation (sdm: standard deviation centered on the mean, eqb: equal bins)\r\nFormat: \r\ncol1 nbIntervalCol1 sdm, col2 nbInstanceCol2 eqb",
"description": "Attribute name, Number of intervals the attribute has to be discretised in, and a kind of discretisation (sdm: standard deviation centered on the mean, eqb: equal bins)\r\nFormat: col1 nbIntervalCol1 sdm, col2 nbIntervalCol2 eqb",
"required": false,
"multi": false,
"parameter_type": "textarea",
"variable": "attribute_list",
"parameter": true,
"order": 14,
"order": 12,
"uid": "56e167cd-9dfd-4b86-8a57-c77594c6ed50"
}
},
......@@ -113,7 +96,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Count instances in a bottom-up manner",
"name": "count instances in a bottom-up manner",
"short_name": "bot",
"default": "",
"description": "Count instances in a bottom-up manner",
......@@ -122,7 +105,7 @@
"parameter_type": "checkbox",
"variable": "count_bottom_up",
"parameter": true,
"order": 13,
"order": 11,
"uid": "5f293035-2fac-4271-a687-5104fae2006d"
}
},
......@@ -130,10 +113,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Fct File",
"name": "fct file",
"short_name": "fct",
"default": "",
"description": "Fct File",
"description": "A fct file from a Load file widget or a Database to Prd and Fct files widget (it contains the training set)",
"required": true,
"multi": false,
"parameter_type": "file",
......@@ -147,7 +130,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Language bias",
"name": "language bias",
"short_name": "lbi",
"default": "",
"description": "Language bias",
......@@ -156,7 +139,7 @@
"parameter_type": "select",
"variable": "lang_bias",
"parameter": true,
"order": 8,
"order": 7,
"uid": "7d681fa2-ebdd-4c50-9abf-eb5f41d0bc95"
}
},
......@@ -164,16 +147,16 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Nb. of structural results (-1 if not used)",
"name": "nb. of structural results (-1 if not used)",
"short_name": "nbs",
"default": "-1",
"description": "Nb. of structural results (-1 if not used)",
"description": "Switch the use of the ISP (Individual, Structural, Properties in the prd file) declarations on, and set the maximum number of properties in an hypothesis (-1 if not used)",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "struct_nb_properties",
"parameter": true,
"order": 12,
"order": 10,
"uid": "880159ba-22b8-48ba-89f1-1a51b22f005c"
}
},
......@@ -181,7 +164,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Satisfied clauses only",
"name": "satisfied clauses only",
"short_name": "sat",
"default": "",
"description": "Satisfied clauses only",
......@@ -190,7 +173,7 @@
"parameter_type": "checkbox",
"variable": "sat_clauses",
"parameter": true,
"order": 7,
"order": 6,
"uid": "8c42b176-2a0a-4948-9095-a52eaf39b762"
}
},
......@@ -198,7 +181,7 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Noise Percent Threshold",
"name": "noise percent threshold",
"short_name": "noi",
"default": "",
"description": "Noise Percent Threshold",
......@@ -207,7 +190,7 @@
"parameter_type": "text",
"variable": "noise_percent_thres",
"parameter": true,
"order": 6,
"order": 5,
"uid": "b489f288-a7ef-47cb-b83e-76eb9471651b"
}
},
......@@ -215,10 +198,10 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Prd File",
"name": "prd file",
"short_name": "prd",
"default": "",
"description": "Prd File",
"description": "A prd file from a Load file widget or a Database to Prd and Fct files widget",
"required": true,
"multi": false,
"parameter_type": "file",
......@@ -232,16 +215,16 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "Max Lit",
"name": "max lit",
"short_name": "lit",
"default": "3",
"description": "Max Literals",
"description": "The maximum number of literals",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "max_literal",
"parameter": true,
"order": 4,
"order": 3,
"uid": "f5538763-4f9d-4053-8c28-2d0df9d9e13c"
}
},
......@@ -251,7 +234,7 @@
"widget": "7276b9f1-c2d9-47a1-9594-98834b77f581",
"name": "results",
"short_name": "res",
"description": "Results",
"description": "The results to send to the Display String widget or a String to file widget",
"variable": "results",
"order": 1,
"uid": "e9a032b7-5f87-424d-b298-c184531f8f05"
......@@ -260,9 +243,18 @@
{
"model": "workflows.abstractoption",
"fields": {
"name": "Horn",
"uid": "8584fe8a-5668-4e7d-b377-64665ca16c8d",
"value": "horn",
"name": "None",
"uid": "43d81584-0228-4342-b297-9ed2f3ac33a0",
"value": "none",
"abstract_input": "7d681fa2-ebdd-4c50-9abf-eb5f41d0bc95"
}
},
{
"model": "workflows.abstractoption",
"fields": {
"name": "Pos Class",
"uid": "5b61cd61-e1ec-4481-98b1-9f51455f420f",
"value": "pos_class",
"abstract_input": "7d681fa2-ebdd-4c50-9abf-eb5f41d0bc95"
}
},
......@@ -278,9 +270,9 @@
</