RoshniRanaDS27/Deep_learning-Neural_Network
Alphabet Soup Charity Analysis (Deep learning model), to predict the success of charity funding applications for the Alphabet Soup organization.
Neural Network - Alphabet Soup Charity Analysis
This project focuses on building and optimizing a deep learning model to predict the success of charity funding applications for the Alphabet Soup organization. The dataset includes various features related to the charity applications, and the goal is to create a binary classification model to determine whether an application will be successful.
(The phrase "Alphabet Soup Charity - Neural Network Model" typically refers to a project or analysis involving a neural network model applied to data from a charity organization named "Alphabet Soup.")
Project Overview
With our knowledge of machine learning and neural networks, we used the features in the provided dataset to create a binary classifier that is capable of predicting whether applicants will be successful if funded by Alphabet Soup.
The purpose of this project was to develop a machine learning model capable of predicting the success rate of charity applications. The project involved data preprocessing, model building, and optimization using a neural network implemented with TensorFlow.
From Alphabet Soup’s business team, we received a CSV containing more than 34,000 organizations that have received funding from Alphabet Soup over the years. Within this dataset are a number of columns that capture metadata about each organization, such as the following:
- Neural Network Model: This indicates the type of machine learning model being used. A neural network model is a computational model inspired by the human brain’s network of neurons. It consists of layers of interconnected nodes (neurons) that process data through various transformations to learn patterns and make predictions.
Technologies Used:
- TensorFlow
- Keras and Keras-Tuner
- Scikit-learn
- Pandas
- Jupyter notebook
- Google Colaboratory
- MatplotLib and PyPlot
Steps Completed
1. Data Preprocessing
-
What variable(s) are considered the target(s) for your model?
-
What variable(s) are considered to be the features for your model?
-
The dataset was preprocessed by removing non-beneficial columns (
EINandNAME).


-
Categorical data was encoded using
pd.get_dummies(). -
The dataset was split into training and testing sets.
-
The features were scaled using
StandardScaler()to prepare them for model training.
2. Compile, Train, and Evaluate the Model
-
How many neurons, layers, and activation functions did you select for your neural network model, and why?
-
A neural network model was defined with an input layer, two hidden layers, and an output layer using TensorFlow and Keras.
-
The model was compiled using a binary cross-entropy loss function and an Adam optimizer.
-
The model was trained on the preprocessed training data, with early stopping callbacks to monitor performance.
-
What steps did you take to try and increase model performance?
-
I tried just about everything:
- Reduced the number of unique values for several features (APPLICATION_TYPE, CLASSIFICATION).


- Converted numeric ranges presented as strings (INCOME_AMT), back into integer values.
- Binned integer values (ASK_AMT) back into numeric ranges presented as strings (so that they could be one-hot encoded)
- Scaled values.
- Used Keras Tuner to automate the selection of HyperParameters.
- Increased the number of epochs used in training to very high values.
- The most important step was putting the Name column back into the features, mapping names to integers, and binning them.
-
After training, the model was evaluated on the test data to determine its loss and accuracy.
-
The initial model achieved an accuracy of approximately 73.26%.
3. Model Optimization
- Multiple attempts were made to optimize the model to reach a target accuracy above 75%.
- Adjustments included modifying the number of hidden layers, neurons, activation functions, and the number of epochs.
- The optimized model was saved and exported to an HDF5 file named
AlphabetSoupCharity_Optimization.h5. - Model : - AlphabetSoupCharity_Optimization.h5: The saved model from the optimization phase.
Results
- Loss: 0.5552
- Accuracy: 73.26%
Graphs
Conclusion
Report - Neural Network Model Report.pdf
The deep learning model successfully predicted the success of charity funding applications with reasonable accuracy. Although further optimization was performed, the model's final accuracy remained slightly below the target threshold of 75%. Future work could involve exploring different model architectures or using alternative machine learning techniques to further improve performance.
Files Included
- AlphabetSoupCharity.h5: The saved model from the initial training.
- AlphabetSoupCharity_Optimization.h5: The saved model from the optimization phase.
- charity_data.csv: The dataset used for training and testing.
- AlphabetSoupCharity_Optimization.ipynb: The notebook containing the code for model optimization.
- AlphabetSoupCharity.ipynb: The notebook containing the code for data preprocessing, model building, and initial training.


















