How charans2702/placement_prediction_using_machine-learning works
Main Components
• Data Sources: The CSV files (Placement_prediction_data.csv and salary_prediction_data.csv) containing student data used for training and evaluation.
• Data Preprocessing: Represented by the Jupyter Notebook preprocessing.ipynb which outlines steps such as handling missing values, encoding, scaling, and feature selection.
• Model Training Components: Two training scripts (Placement_Prediction.py and salary_prediction.py) that use Random Forest classifiers to train the placement and salary prediction models. Also include the resulting model artifacts (model.pkl and model1.pkl).
• Web Application (Flask App): The app.py file serves as the main entry point for the Flask application handling user requests. It loads the pre-trained models and provides endpoints for inputting student data and delivering predictions.
• Frontend/UI: The “templates” directory contains HTML files that define the user interface (home, about, index, output), and the “static” folder holds CSS files and images (like plots and confusion matrices) which are used to display the results and system visuals.
• Dependencies/Configuration: The requirements.txt file lists the necessary third-party packages.
Relationships and Interactions
• Users interact with the web interface (HTML pages from the templates folder), using a browser which sends HTTP requests to the Flask backend (app.py).
• The Flask app processes incoming inputs and dispatches requests to the appropriate prediction function that loads one of the pre-trained models (using model.pkl for placement prediction and model1.pkl for salary prediction).
• The data flow moves from the user input -> Flask routes -> ML model prediction logic -> results rendering in HTML.
• The static assets (CSS, images) are used to enhance user experience and display evaluation metrics or output visualizations (e.g., confusion matrix, ROC curve).
• The initial machine learning pipeline (data preprocessing and model training) is generally a one-time process documented through the Jupyter Notebook and training scripts, which then results in the static model pickle files used during deployment.
Architectural Patterns and Design Principles
• Separation of Concerns: The project clearly divides the responsibilities by having separate directories for static assets (UI), templates (views), and core logic in app.py. The training code (separate .py files and the notebook) is decoupled from the deployment code.
• Modular Design: Training and inference are modular. The ML models are trained separately and then loaded in the Flask application, ensuring that the prediction logic is separated from the data preprocessing and training phases.
• Use of Standard Frameworks: Flask is used for rapid web application development and integration of ML predictions, while Random Forest classifiers from libraries such as scikit-learn are employed for predictive modeling.
Relevant Technologies, Frameworks, or Libraries
• Flask for the web framework.
• scikit-learn for building the Random Forest models.
• Python as the programming language.
• Jupyter Notebook for data preprocessing and exploratory data analysis.
• Basic HTML/CSS for front-end design with templates and static assets.