The purpose of this analysis was to create a Neural Network Model to analyze and help predict which organizations would make good investment opportunities.
- Use preprocessing to prepare the data for a neural network model
- Compile, train, and evaluate the model
- Optimize the model
- Source of data: charity_data.csv
- Software: tensorflow 2.7.0, scikit-learn 1.0.2, Python 3.7.10, Conda 4.10.3, Jupyter Notebook 6.3.0, Visual Studio Code 1.60.2
- Please see the preprocessing and training code here.
- Please see the optimized code here.
- Target columns: IS_SUCCESSFUL
- Dropped columns: EIN and NAME
- Featured columns: APPLICATION_TYPE, AFFILIATION, CLASSIFICATION, USE_CASE, ORGANIZATION, STATUS, INCOME_AMT, SPECIAL_CONSIDERATIONS, and ASK_AMT
-
The first model we ran we started with 2 hidden layers at 80 and 30 neurons respectively, with the activation function of ReLu for the hidden layers and Sigmoid for the output layer.
-
After several different attempts to optimize the model, we found the following resulted in the best accuracy score:
After several attempts to optimize the neural network model we did not reach the target accuracy score of 75%. An alternative to this model could be a Random Forest Classifier. The Random Forest models run faster than neural network models and can help avoid the data from being overfitted.

