Git Product home page Git Product logo

hayatiyrtgl / ml_divorce_classification-with-5-models Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.75 MB

The code performs data preprocessing, machine learning model training, evaluation, and model saving for a binary classification problem on the divorce dataset.

License: MIT License

Jupyter Notebook 100.00%
anket binary-classification classification keras keras-classification-models keras-neural-networks keras-tensorflow machine-learning machine-learning-algorithms machinelearning-python python pythonmachinelearning scikit-learn scikitlearn-machine-learning

ml_divorce_classification-with-5-models's Introduction

ML_divorce_Classification-with-5-models

The code performs data preprocessing, machine learning model training, evaluation, and model saving for a binary classification problem on the divorce dataset.

Here's the step-by-step explanation of the code:

  1. IMPORT LIBRARIES: Imports the necessary libraries. In this code, it imports the pandas and numpy libraries.

  2. Read Data: Reads the dataset. It reads the file ../dataset/divorce_data.csv and assigns it to a variable named unprocessed_data.

  3. Info & head & describe: Displays the first few rows of the dataset and provides basic statistics.

  4. EDA (Exploratory Data Analysis): Visualizes and explores the dataset. This includes creating count plots, distribution plots, and correlation analysis.

  5. TRAIN-TEST-SPLIT & PREPROCESSING: Splits the dataset into training and testing sets. It separates the target variable (Divorce) from the features and performs any necessary preprocessing steps.

  6. EVALUATE FUNCTION: Defines a function to evaluate the performance of machine learning models. It computes metrics such as accuracy and F1-score.

  7. MODELING: Fits various machine learning models to the training data and evaluates their performance on the test data. The models used include Logistic Regression, K-Nearest Neighbors, Random Forests, Naive Bayes, and an Artificial Neural Network (ANN).

  8. SAVE MODELS: Saves the trained models to disk using the joblib library for Logistic Regression, KNN, Random Forests, and Naive Bayes, and the h5py library for the ANN model.

  9. VISUALIZATION: Visualizes the performance of the models using bar plots.

Overall, this code performs data exploration, model training, evaluation, and model saving for a binary classification problem on the divorce dataset.

ml_divorce_classification-with-5-models's People

Contributors

hayatiyrtgl avatar

Watchers

 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.