Git Product home page Git Product logo

neural-network-homework's Introduction

Neural Network Model

The Alphabet Soup business has requested a model to predict whether the startup requesting for funding will become successful if funded by Alphabet Soup. To assist with the modelling, Alphabet Soup has provided various typs of information about more than 34000 organisation that they have provided funding over the years, including whether they ultimately became successful or not.

This exercise involves creating a binary classificary model using a deep neural network that output the indicator whether the applicant will be successful or not.

The following steps are taken:

  1. Prepare data - Applicant information was provided in a CSV file. Read CSV file into a pandas dataframe, review data and check for categorical variables that will need to be encoded and for columns that might eventually define as features and target variables.
  • Applicant identifiers such as Employer Identification Number and Name were removed.
  • Categorical variables are encoded using OneHotEncoder (an alternative to pandas get_dummies function).
  • Numerical variables of the original datafrme was added to the dataframe that contains the encoded variables.
  1. Preprocess data - The "IS_SUCCESSFUL" column sets as the target. The remaining columns are defined as the features dataset. Data is then split into two sets: training set and testing set. StandardScaler from scikit-learn is used to scale the feature data.

  2. Design the model - Use TensorFlow to design a binary classification deep neural network model.
    Model 1 is a two-layer deep neural network model that uses "relu" activation function for both layers. Model 1 is then compiled using the binary_crossentropy loss function, the "adam" optimiser and the "accuracy" evaluation metric. Model 1 is then fit using 50 epochs.

  3. Optimise the model

  • Attempt 1 (Alternative Model 1) - Add more hidden layers and reduce the number of epochs in the training regime. Use the same parameter values as model 1 for compilation.

  • Attempt 2 (Alternative Model 2) - Use different activation functions for the hidden layers and reduce the number of epochs in the training regime. Use the same parameter values as model 1 for compilation.

  1. Evaluate the models using the loss and accuracy metrics

Results

Loss Score Accuracy Score
Model 1 0.5507 0.7300
Alternative Model 1 0.5531 0.7329
Alternative Model 2 0.5509 0.7310

The original model (Model 1) has an accurarcy score of 0.7300 and loss score of 0.5507. As we increase the number of hidden layers (Alternative Model 1), the accuray is slightly improved but no material improvement in loss score. A different activation function (i.e. tanh instead of relu) also improves the accuracy slightly but similarly no material improvement in the loss score.

Conclusion

There is further opportunity to prune the model. We recommend future pruning consider adjusting the input data by dropping different features combination or a combination of adding more hidden layers and using different activation functions.

neural-network-homework's People

Contributors

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