-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #841 from ranamanish674zu/newfeature
Feed-forward neural networks (Deep Learning Algorithm)
- Loading branch information
Showing
7 changed files
with
5,503 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
Feed-Forward Neural Networks (Deep Learning Algorithm)/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Feedforward Neural Network on Titanic Dataset | ||
|
||
This project involves building and training a Feedforward Neural Network to predict the survival of passengers on the Titanic using the Titanic dataset. The aim is to apply a deep learning algorithm to perform binary classification. | ||
|
||
## Table of Contents | ||
|
||
- [Introduction](#introduction) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Dataset](#dataset) | ||
- [Model](#model) | ||
- [Training and Evaluation](#training-and-evaluation) | ||
- [Results](#results) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
- [Acknowledgements](#acknowledgements) | ||
|
||
## Introduction | ||
|
||
This project applies a Feedforward Neural Network to classify passengers on the Titanic as survived or not survived based on various features such as age, sex, class, and more. The goal is to explore the effectiveness of deep learning on this classic dataset. | ||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/yourusername/titanic-feedforward.git | ||
cd titanic-feedforward | ||
``` | ||
|
||
2. Create a virtual environment and activate it: | ||
```bash | ||
python -m venv venv | ||
source venv/bin/activate # On Windows use `venv\Scripts\activate` | ||
``` | ||
|
||
3. Install the required dependencies: | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
|
||
### Preprocessing the Data | ||
|
||
Ensure you have the Titanic dataset CSV files (`train.csv`, `test.csv`). Preprocess the data before training the model. | ||
|
||
### Training the Model | ||
|
||
Use the following script to train the model: | ||
import pandas as pd | ||
from sklearn.model_selection import train_test_split | ||
from sklearn.preprocessing import StandardScaler | ||
from keras.models import Sequential | ||
from keras.layers import Dense | ||
import matplotlib.pyplot as plt | ||
# Load the dataset | ||
# Preprocess the data (handle missing values, encode categorical variables, etc.) | ||
# Convert categorical columns to numerical | ||
# Split the data into features and labels | ||
# Split the data into training and testing sets | ||
# Scale the data | ||
# Create the model | ||
# Train the model and capture the history | ||
# Plot the accuracy | ||
|
Oops, something went wrong.