Coder Social home page Coder Social logo

car_insurance_sale_prediction's Introduction

Predicting Sales of a customer

Outline of Project

The objective of this repository is to predict whether there will be a sale (Yes/No) of car insurance using the data set. There are 10 attributes in the dataset including: Veh_Mileage, Credit_Score, Licesnse_Length, Veh_Value, Price, Age, Marital_Status, Tax, Date. There are 50,000 entries.

Description of the file structure

  • The code is all contained in the main directory
  • main.py is where the main program is executed and calls methods from the DataModeler class.
  • Class_Data_Loader.py contains the class DataLoader that loads in the data from a CSV file and stores it as an object
  • Class_Data_Exploration.py contains the class DataExploror that inherits DataLoader. It's purpose is to print and plot various properties of the data so that it can be analysed
  • Class_Data_Preprocessor contains the class DataPreprocessor that preprocesses the data using various methods such as normalising and one-hot encoding
  • Class_Data_Modeler contains Data_Modeler which models the data and performs cross validation
  • Data_In contains DS_Assessment.csv which is the data set that is analysed
  • Data_Out contains all various plots that the code produces saved as a pdf file

This was done by using inheritance where DataModeler -> DataPreprocessor -> DataExploror -> DataLoader and the arrow is a symbol indicating 'inherited from'.

Packages Required:

Environment set up in python 3.5 and runs with following packages:

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • sklearn
  • scipy

Example of the code

main.py demonstrates how the various methods can be called to be used correctly. It also demonstrates some of my thought processes when analysing and pre-processing the data with comments.

How to run the code

Ensure all the packages are installed, set the working directory to Car_Insurance_Sales_Prediction and run main.py. If there are any problems please email me at: [email protected].

car_insurance_sale_prediction's People

Contributors

nickolastheodoulou 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.