Giter VIP home page Giter VIP logo

gender_classification's Introduction

Training process

  1. Create folder named data in the root directory data folder directory should be like this

     data
     ├──trainingData.csv
     ├──trainingLabels.csv
    
    
  2. Install python 3.10

  3. Create a virtual environment

    python -m venv venv
    source venv/bin/activate
    python -m pip install --upgrade pip
  4. Install the required packages

    pip install -r requirements.txt
  5. Run the pipeline_train.py

    • Using IDE
    • Using command line
       cd gender_classification
         
       export PYTHONPATH="${PYTHONPATH}:${PWD}" 
         
       python gender_prediction/pipeline_train.py

    Please note that the training process will take a few minutes to complete. We use Optuna to find the best hyperparameters for the model.

  6. The trained model will be saved in the tmp folder

Prediction process

Run the file pipeline_prediction.py

Label:

  • Female: 0.0
  • Male: 1.0

Overall Gender Score: 0.8257492829234192

Overall metrics:

              precision    recall  f1-score   support

         0.0       0.91      0.98      0.94     11703
         1.0       0.89      0.68      0.77      3297

    accuracy                           0.91     15000
   macro avg       0.90      0.83      0.86     15000
weighted avg       0.91      0.91      0.91     15000

gender_classification's People

Watchers

Nguyen Truong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.