Model training for NACE back-classification
Model training
This example notebook provides an example of the model training process using MLflow to register and save the model. The algorithm chosen is a Support Vector Machine, supervised machine learning (SVM) method using a linear kernel. The learning process includes the following steps:
- Set up MLFlow environment
- Fetch training data
- Filter training data for only groups that split and have no associated rules
- Preprocess text variables
- Train and save model
Demonstration data
Demonstration data for the training process is openly available on the SSPcloud. While the company activity descriptions and NACE rev. 2.1 codes are extracted from real data in the Norwegian business register, the NACE rev. 2.0 has been synthetically added for demonstration purposes. The variables in the demonstration data are the same as the general NACE demonstration data described on the WP10 Github page. In addition, the following variable is included:
- nace_20_code: (str) Standard industrial classification (synthetic) for the business (NACE) rev. 2.0. This is the 4-digit European standard.
The Python program for creating the demonstration data can be found on the current GitHub under notebooks/utils/create_demo_data.py.