/charity_funding_predictor_deep_learning

Neural Network model to predict charity funding.

Primary LanguageJupyter Notebook

Deep Learning: Neural Networks 🧠

Charity Funding Predictor Report

The nonprofit foundation Alphabet Soup wants a tool that can help it select the applicants for funding with the best chance of success in their ventures. I created a binary classifier to predict whether applicants will be successful if funded by Alphabet Soup.

Results: Data Preproccessing

  • The target variable for the model was the successfulness of the funding application.
  • The feature variables included: APPLICATION_TYPE, AFFILIATION, CLASSIFICATION, USE_CASE, ORGANIZATION, STATUS, INCOME_AMT, SPECIAL_CONSIDERATIONS, ASK_AMT
  • The variables that were removed from the data were 'EIN', an organisation number, and the NAME of the organisation as they are neither targets or features.

Results: Compiling, Training, and Evaluating the model

In the first optimization 2 layers were used with a small number of neurons and 100 epochs, with the reul and sigmoid activation functions.

I then tried various differetiations of neurons and epochs but the accuracy did not exceed approx 73% image

The model did not achieve the target model performance until the number of neurons in the layers were increased substantiially. I increased the number of neurons in multiples, however, this did not improve accuracy.

Then I tried to increase the epochs from 120 to 200. II began with 120 as a good general rule for choosing the number of epochs is 3 times that of the number of features. Howeever, this number seemed to low and the performance of the model would not reach optimization. Therefore I increased the number slightly to account for the complexity of the model.

image

Upon evaluation, however, I noticed that the accuracy tended to flatten once the number of epochs exceeded 100. This was the main reason why I introduced a third hidden layer as the reason the model was not reaching the target performance.

By introducing a third hidden layer the model was aiming to combat the complexity of the data, however, despite adding in a third layer and increasing the number of neurons in the hideen layers the model did not reach the target performance.

I changed the activation function from sigmoid to tanh. The result of changing the activation function and then reducing the number of neurons in the hideen layer meant that less epochs could be used, however, the model performance target was still not reached.

Therefore, I decided to use keras hyperparameter tuning to run through trials and establish the best parameters for the model:

image

image

Summary

In total I tried 7 different optimizations by changing the activation function, number of hidden layers, number of neurons, and number of epochs, however, the accuracy of the model did not reach the target performance of 75%. I would conitnue to optimize the model to try and increase te accuracy of the model.