Randstad Artificial Intelligence Challenge (powered by VGEN). Soluzione proposta da Stefano Fiorucci (anakin87) - primo classificato

Overview

Randstad Artificial Intelligence Challenge (powered by VGEN)

Soluzione proposta da Stefano Fiorucci (anakin87) - primo classificato

Struttura directory del progetto

  • directory input:

  • directory output:

    • best_model.joblib: il migliore modello addestrato (su Windows), salvato con la libreria joblib
    • best_predictions.csv: file CSV delle predizioni del miglior modello sul test set, contenente le colonne Job_description, Label_true e Label_pred; il separatore è“;”(assente per motivi di copyright)
  • directory principale:

    • esplorazione_scelta_modello.ipynb: il notebook python che descrive il percorso di esplorazione e scelta del migliore modello machine learning
    • esplorazione_scelta_modello.html: esportazione in formato HTML del suddetto notebook
    • logo.jpg: logo della competizione
    • readme.md: questa guida
    • requirements.txt: le librerie python da installare per riprodurre l'ambiente di addestramento/predizione
    • slides.pdf: la presentazione della soluzione proposta
    • train_model_windows.py: versione Windows dello script python che consente di ripetere l'addestramento, la valutazione del modello, il salvataggio del modello e la scrittura del CSV con le predizioni
    • train_model_linux.py: versione Linux dello script python di addestramento
    • utils.py: modulo python contenente alcune funzioni necessarie per il training e la predizione
    • try_best_model.py: script python di esempio che mostra come caricare il modello salvato e usarlo per nuove predizioni

Preparazione dell'ambiente di esecuzione

Per eseguire gli script, è necessario Python>=3.6. Si consiglia di preparare l’ambiente di esecuzione mediante i seguenti passaggi:

  1. scaricamento del repository
  2. a partire dalla directory principale, creazione di un python virtual environment con il comando
    python3 -m venv venv
  3. attivazione del virtual environment
    • windows
      venv\Scripts\activate
    • linux
      source venv/bin/activate
  4. installazione delle librerie necessarie con il comando
    pip install -r requirements.txt

Esecuzione degli script

  • try_best_model è uno script python di esempio che mostra come caricare il migliore modello salvato e usarlo per nuove predizioni si lancia con la sintassi
    python try_best_model.py
  • Lo script train_model lancia l’addestramento del modello, seguito dalla stampa delle metriche valutate sul test set e può essere eseguito con la sintassi
    • Windows
      python train_model_windows.py
    • Linux
      python train_model_linux.py

      Possono essere specificati i parametri: --save-model (oppure -s), che salva il modello appena addestrato nella directory output, con un nome file indicante data e ora --get-predictions (oppure -p), che genera le predizioni sul test set in formato csv e le salva nella directory di output, con un nome file indicante data e ora

Nota

A causa di un bug noto di numpy, l'addestramento dei modelli su Windows e Linux non è completamente identico e, a parità di parametri e random state, produce modelli leggermenti diversi, con effetti sulle performance (F1).

Si è cercato il più possibile di ottenere modelli con performance vicine nei due sistemi operativi (facendo variare il random state).

Il migliore modello è stato addestrato in ambiente Windows ed è salvato come best_model.joblib. Le predizioni migliori (best_predictions.csv) sono relative a questo modello. Usando lo script fornito (train_model_windows.py), il modello può essere riaddestrato rapidamente (pochi secondi) in ambiente Windows. Anche se addestrato su Windows, può essere correttamente impiegato su Linux per la predizione.

Il modello per Linux, addestrabile con l’apposito script (train_model_linux.py), è molto simile a quello per Windows: le differenze riscontrabili a livello di performance (F1) sono inferiori a 0.001.

Attenzione: usando lo script di addestramento per Windows in ambiente Linux o viceversa, non si ottengono errori di esecuzione, ma il modello addestrato mostra delle performance qualitative (F1) inferiori a quelle attese.

Owner
Stefano Fiorucci
Machine learning engineer, Python developer
Stefano Fiorucci
Statistical and Algorithmic Investing Strategies for Everyone

Eiten - Algorithmic Investing Strategies for Everyone Eiten is an open source toolkit by Tradytics that implements various statistical and algorithmic

Tradytics 2.5k Jan 02, 2023
Learning To Have An Ear For Face Super-Resolution

Learning To Have An Ear For Face Super-Resolution [Project Page] This repository contains demo code of our CVPR2020 paper. Training and evaluation on

50 Nov 16, 2022
Emotion Recognition from Facial Images

Reconhecimento de Emoções a partir de imagens faciais Este projeto implementa um classificador simples que utiliza técncias de deep learning e transfe

Gabriel 2 Feb 09, 2022
Implementation of Continuous Sparsification, a method for pruning and ticket search in deep networks

Continuous Sparsification Implementation of Continuous Sparsification (CS), a method based on l_0 regularization to find sparse neural networks, propo

Pedro Savarese 23 Dec 07, 2022
Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX.

ONNX Object Localization Network Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX. Ori

Ibai Gorordo 15 Oct 14, 2022
Code for "Modeling Indirect Illumination for Inverse Rendering", CVPR 2022

Modeling Indirect Illumination for Inverse Rendering Project Page | Paper | Data Preparation Set up the python environment conda create -n invrender p

ZJU3DV 116 Jan 03, 2023
Pytorch implementation for reproducing StackGAN_v2 results in the paper StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks

StackGAN-v2 StackGAN-v1: Tensorflow implementation StackGAN-v1: Pytorch implementation Inception score evaluation Pytorch implementation for reproduci

Han Zhang 809 Dec 16, 2022
Implements MLP-Mixer: An all-MLP Architecture for Vision.

MLP-Mixer-CIFAR10 This repository implements MLP-Mixer as proposed in MLP-Mixer: An all-MLP Architecture for Vision. The paper introduces an all MLP (

Sayak Paul 51 Jan 04, 2023
Easy Parallel Library (EPL) is a general and efficient deep learning framework for distributed model training.

English | 简体中文 Easy Parallel Library Overview Easy Parallel Library (EPL) is a general and efficient library for distributed model training. Usability

Alibaba 185 Dec 21, 2022
Python Multi-Agent Reinforcement Learning framework

- Please pay attention to the version of SC2 you are using for your experiments. - Performance is *not* always comparable between versions. - The re

whirl 1.3k Jan 05, 2023
Pytorch implementation of "Neural Wireframe Renderer: Learning Wireframe to Image Translations"

Neural Wireframe Renderer: Learning Wireframe to Image Translations Pytorch implementation of ideas from the paper Neural Wireframe Renderer: Learning

Yuan Xue 7 Nov 14, 2022
Jarvis Project is a basic virtual assistant that uses TensorFlow for learning.

Jarvis_proyect Jarvis Project is a basic virtual assistant that uses TensorFlow for learning. Latest version 0.1 Features: Good morning protocol Tell

Anze Kovac 3 Aug 31, 2022
Data augmentation for NLP, accepted at EMNLP 2021 Findings

AEDA: An Easier Data Augmentation Technique for Text Classification This is the code for the EMNLP 2021 paper AEDA: An Easier Data Augmentation Techni

Akbar Karimi 81 Dec 09, 2022
CVPR2020 Counterfactual Samples Synthesizing for Robust VQA

CVPR2020 Counterfactual Samples Synthesizing for Robust VQA This repo contains code for our paper "Counterfactual Samples Synthesizing for Robust Visu

72 Dec 22, 2022
MDMM - Learning multi-domain multi-modality I2I translation

Multi-Domain Multi-Modality I2I translation Pytorch implementation of multi-modality I2I translation for multi-domains. The project is an extension to

Hsin-Ying Lee 107 Nov 04, 2022
AFLFast (extends AFL with Power Schedules)

AFLFast Power schedules implemented by Marcel Böhme [email protected]

Marcel Böhme 380 Jan 03, 2023
Official Repsoitory for "Mish: A Self Regularized Non-Monotonic Neural Activation Function" [BMVC 2020]

Mish: Self Regularized Non-Monotonic Activation Function BMVC 2020 (Official Paper) Notes: (Click to expand) A considerably faster version based on CU

Xa9aX ツ 1.2k Dec 29, 2022
A Topic Modeling toolbox

Topik A Topic Modeling toolbox. Introduction The aim of topik is to provide a full suite and high-level interface for anyone interested in applying to

Anaconda, Inc. (formerly Continuum Analytics, Inc.) 93 Dec 01, 2022
OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.

OpenFace 2.2.0: a facial behavior analysis toolkit Over the past few years, there has been an increased interest in automatic facial behavior analysis

Tadas Baltrusaitis 5.8k Dec 31, 2022
Implementation of "Learning Multi-Granular Hypergraphs for Video-Based Person Re-Identification"

hypergraph_reid Implementation of "Learning Multi-Granular Hypergraphs for Video-Based Person Re-Identification" If you find this help your research,

62 Dec 21, 2022