Skip to content

Commit

Permalink
Merge pull request #120 from poojaharihar03/main
Browse files Browse the repository at this point in the history
Placement_Predictor
  • Loading branch information
sanjay-kv authored Jun 3, 2024
2 parents a6fd30d + d7ba523 commit c1e0b7d
Show file tree
Hide file tree
Showing 9 changed files with 2,596 additions and 0 deletions.
1,622 changes: 1,622 additions & 0 deletions Placement_Predictor/Placement_Analysis.ipynb

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions Placement_Predictor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Placement Predictos

This folder provides the code for placement analysis and an interactive interface for analyzing and visualizing data using Python libraries such as Pandas, Seaborn, Matplotlib, and Scikit-learn.


You can access the app at [https://placementanalysis-zgmvrc67ajweogwmgep3ta.streamlit.app/](https://placementanalysis-zgmvrc67ajweogwmgep3ta.streamlit.app/).

## Introduction

Data analysis is an essential part of modern decision-making processes. With the proliferation of data in various domains, having tools to explore, visualize, and understand data is crucial. This Streamlit app aims to simplify the data analysis process by providing a user-friendly interface to perform common data analysis tasks.
Further, a Logistic Regression Model is used to find the placement of candidates and the app is hosted on streamlit
## Features

- Load and explore datasets
- Perform data preprocessing (e.g., handling missing values, encoding categorical variables)
- Visualize data using various plots (e.g., scatter plots, histograms, heatmaps)
- Train and evaluate machine learning models

## Installation
```
git clone https://github.com/yourusername/streamlit-data-analysis-app.git
cd Placement_Predictor
```

### Create a Virtual Environment
#### macOS

Open Terminal and navigate to the project directory. Run the following commands to create a virtual environment named `venv`:
```
python3 -m venv venv
```
Activate the virtual environment:
```
source venv/bin/activate
```

#### Windows

Open Command Prompt and navigate to the project directory. Run the following commands to create a virtual environment named `venv`:
```
python -m venv venv
```
Activate the virtual environment:
```
venv\Scripts\activate
```

### Install Dependencies

Once the virtual environment is activated, install the required dependencies using pip:
```
pip install -r requirements.txt
```

## Usage

Once the dependencies are installed, you can run the app using the following command:
```
streamlit run app.py
```

This will start a local server, and you can access the app in your web browser at `http://localhost:8501`.

### Prerequisites

Before proceeding, ensure you have Python installed on your system. You can download it from [python.org](https://www.python.org/downloads/).


## Authors
- [Pooja Harihar](https://github.com/poojaharihar03)



168 changes: 168 additions & 0 deletions Placement_Predictor/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "06ed934a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"( Sno Gender 10th % SSC Board 12th % HSC Board 12th Stream Degree % \\\n",
" 0 1 M 67.00 Others 91.00 Others Commerce 58.00 \n",
" 1 2 M 79.33 Central 78.33 Others Science 77.48 \n",
" 2 3 M 65.00 Central 68.00 Central Arts 64.00 \n",
" 3 4 M 56.00 Central 52.00 Central Science 52.00 \n",
" 4 5 M 85.80 Central 73.60 Central Commerce 73.30 \n",
" \n",
" Degree stream Work exp specialisation Mba % status salary \n",
" 0 Sci&Tech No Mkt&HR 58.80 Placed 270000.0 \n",
" 1 Sci&Tech Yes Mkt&Fin 66.28 Placed 200000.0 \n",
" 2 Comm&Mgmt No Mkt&Fin 57.80 Placed 250000.0 \n",
" 3 Sci&Tech No Mkt&HR 59.43 Not Placed NaN \n",
" 4 Comm&Mgmt No Mkt&Fin 55.50 Placed 425000.0 ,\n",
" Unnamed: 0 cgpa iq placement\n",
" 0 0 6.8 123.0 1\n",
" 1 1 5.9 106.0 0\n",
" 2 2 5.3 121.0 0\n",
" 3 3 7.4 132.0 1\n",
" 4 4 5.8 142.0 0)"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"\n",
"# Load datasets\n",
"file1 = 'datasets/Placement_Data_Full_Class.csv'\n",
"file2 = 'datasets/placement-dataset.csv'\n",
"\n",
"data1 = pd.read_csv(file1)\n",
"data2 = pd.read_csv(file2)\n",
"\n",
"# Display the first few rows of each dataset\n",
"data1_head = data1.head()\n",
"data2_head = data2.head()\n",
"\n",
"data1_head, data2_head\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c4f906a8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Gender 10th % SSC Board 12th % HSC Board 12th Stream Degree % \\\n",
"0 M 67.00 Others 91.00 Others Commerce 58.00 \n",
"1 M 79.33 Central 78.33 Others Science 77.48 \n",
"2 M 65.00 Central 68.00 Central Arts 64.00 \n",
"3 M 56.00 Central 52.00 Central Science 52.00 \n",
"4 M 85.80 Central 73.60 Central Commerce 73.30 \n",
"\n",
" Degree stream Work exp specialisation Mba % status salary cgpa \\\n",
"0 Sci&Tech No Mkt&HR 58.80 Placed 270000.0 5.9 \n",
"1 Sci&Tech Yes Mkt&Fin 66.28 Placed 200000.0 5.3 \n",
"2 Comm&Mgmt No Mkt&Fin 57.80 Placed 250000.0 7.4 \n",
"3 Sci&Tech No Mkt&HR 59.43 Not Placed NaN 5.8 \n",
"4 Comm&Mgmt No Mkt&Fin 55.50 Placed 425000.0 7.1 \n",
"\n",
" iq placement \n",
"0 106.0 0 \n",
"1 121.0 0 \n",
"2 132.0 1 \n",
"3 142.0 0 \n",
"4 48.0 1 \n"
]
}
],
"source": [
"# Reset index for merging\n",
"data1 = data1.reset_index(drop=True)\n",
"data2 = data2.rename(columns={'Unnamed: 0': 'Sno'})\n",
"\n",
"# Merge on 'Sno'\n",
"merged_data = pd.merge(data1, data2, on='Sno', how='inner')\n",
"\n",
"# Drop unnecessary columns\n",
"merged_data = merged_data.drop(['Sno'], axis=1)\n",
"\n",
"# Display the first few rows of the merged dataset\n",
"print(merged_data.head())\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "2e1707b8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'datasets/merged_placement_data.csv'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Merge datasets\n",
"data1 = data1.reset_index(drop=True)\n",
"data2 = data2.rename(columns={'Unnamed: 0': 'Sno'})\n",
"\n",
"# Merge on 'Sno'\n",
"merged_data = pd.merge(data1, data2, on='Sno', how='inner')\n",
"\n",
"# Drop unnecessary columns\n",
"merged_data = merged_data.drop(['Sno'], axis=1)\n",
"\n",
"# Save the merged dataset to a CSV file\n",
"merged_file_path = 'datasets/merged_placement_data.csv'\n",
"merged_data.to_csv(merged_file_path, index=False)\n",
"\n",
"merged_file_path\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7cbf15e8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit c1e0b7d

Please sign in to comment.