Classification models (and its results) trained on certain CSV resources of data.gouv.fr

Description

## Context Data.gouv.fr (DGF) contains thousands of CSV-type resources. Determining by hand which resources can be useful to make explanations/tutorials in Machine Learning (ML) with open data seems a monumental task. In addition, being able to use open data presents a great opportunity to familiarise users with the open data approach and at the same time promote the reuse of this data. ## Methodology In order to possibly speed up the process of selecting datasets relevant to the ML, in this dataset we present for each of 5479 analysed CSV files (cataloged in data.gouv.fr), a list of the models trained on each of the categorical variables detected in each CSV. For now we only focus on supervised classification models. Briefly, the analysis consists of detecting the categorical columns of each dataset, testing several classification models by having each of these columns as a variable to explain. Finally, we save the details of each model tested as well as its results in terms of performance. “'” For each CSV: Determine the categorical columns; For each categorical variable (or categorical columns): a. Turn a set of “baseline” learning models (GaussianNaiveBayes, LogisticRegression, DecisionTrees,...); B. Recover performance from validation based on performance metrics: (accuracy, recall_macro, precision_macro, f1_macro, roc_auc) Save this information in a CSV “'” This methodology is absolutely based on the library [dabl: The data analysis baseline library](https://dabl.github.io/dev/). ## Output The CSVs of this dataset are organised by dataset producer. The name of each CSV file follows the format ‘id-dataset-id-resource.csv’. Each generated CSV can contain these columns: ‘csv_id’: ID of the DGF dataset followed by the resource’s Id (separated by ‘--’); ‘task’: Task ML (only classification for now); ‘Algorithm’: Name of the algorithm tested as well as this initial configuration; ‘target_col’: Names of the category column tested; ‘nb_features’: Number of features used in the model; ‘features_names’: Names of features used; ‘classes’: Names of classes predicted; ‘nb_classes’: Number of classes predicted; ‘nb_lines’: Number of rows in the original dataset; ‘nb_samples’: Number of rows in the sample tested; ‘date’: Date of analysis; ‘accuracy’ ‘recall_macro’ ‘precision_macro’ ‘f1_macro’ ‘average_precision’ ‘roc_auc’ ‘avg_scores’: Average of the calculated scores; ## Code The code to produce this dataset is [on](https://github.com/psorianom/mlearnable-datasets-detective/tree/master). ## TODO 1. Launch the same analysis for regression (with continuous values) 2. Standardise the columns of all CSV products (the same header for all CSVs) 3. Add a variable that displays the correlation between columns.

Resources

Name Format Description Link
57 https://www.data.gouv.fr/api/1/datasets/r/0a0b2d1c-5c52-4945-87de-c67c0ff349a9
8 https://www.data.gouv.fr/api/1/datasets/r/139dd62c-3bb5-49b6-99fb-bb3e7ad5e2e1

Tags

  • datascience
  • classification
  • machine-learning

Topics

Categories