{"id":20356573,"url":"https://github.com/madhurimarawat/machine-learning-projects-in-python","last_synced_at":"2025-12-31T01:00:38.966Z","repository":{"id":190768558,"uuid":"683324589","full_name":"madhurimarawat/Machine-Learning-Projects-In-Python","owner":"madhurimarawat","description":"This repository contains machine learning projects in the Python programming language.","archived":false,"fork":false,"pushed_at":"2024-06-29T17:46:32.000Z","size":15955,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T01:16:54.426Z","etag":null,"topics":["car-dataset","css","decision-tree","diabetes-prediction","email-dataset","flask-deployment","flask-server","html","linear-regression","machine-learning","machine-learning-algorithms","machine-learning-projects","naive-bayes","prediction-model","python","random-forest","salary-dataset","spam-classification","titanic-dataset","titanic-visualization"],"latest_commit_sha":null,"homepage":"https://ml-model-datasets-using-apps-3gy37ndiancjo2nmu36sls.streamlit.app/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madhurimarawat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-26T07:42:04.000Z","updated_at":"2024-08-10T14:49:40.000Z","dependencies_parsed_at":"2023-08-26T08:45:23.161Z","dependency_job_id":"74a7fadf-0cef-4c72-b6c4-94a3ca0282c6","html_url":"https://github.com/madhurimarawat/Machine-Learning-Projects-In-Python","commit_stats":null,"previous_names":["madhurimarawat/machine-learning-python-projects"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhurimarawat%2FMachine-Learning-Projects-In-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhurimarawat%2FMachine-Learning-Projects-In-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhurimarawat%2FMachine-Learning-Projects-In-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhurimarawat%2FMachine-Learning-Projects-In-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madhurimarawat","download_url":"https://codeload.github.com/madhurimarawat/Machine-Learning-Projects-In-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241890272,"owners_count":20037675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["car-dataset","css","decision-tree","diabetes-prediction","email-dataset","flask-deployment","flask-server","html","linear-regression","machine-learning","machine-learning-algorithms","machine-learning-projects","naive-bayes","prediction-model","python","random-forest","salary-dataset","spam-classification","titanic-dataset","titanic-visualization"],"created_at":"2024-11-14T23:17:04.714Z","updated_at":"2025-12-31T01:00:38.896Z","avatar_url":"https://github.com/madhurimarawat.png","language":"Jupyter Notebook","readme":"# Machine-Learning-Projects-In-Python\nThis repository contains machine learning projects in the Python programming language.\u003cbr\u003e\u003cbr\u003e\n\u003cimg width=\"916\" height=\"430\" src=\"https://github.com/madhurimarawat/Machine-Learning-Projects-In-Python/assets/105432776/ed1f6973-69bc-4909-9747-6ac98080d775\"\u003e\n\n---\n# Mode of Execution Used \u003cimg src=\"https://th.bing.com/th/id/R.c936445e15a65dfdba20a63e14e7df39?rik=fqWqO9kKIVlK7g\u0026riu=http%3a%2f%2fassets.stickpng.com%2fimages%2f58481537cef1014c0b5e4968.png\u0026ehk=dtrTKn1QsJ3%2b2TFlSfLR%2fxHdNYHdrqqCUUs8voipcI8%3d\u0026risl=\u0026pid=ImgRaw\u0026r=0\" title=\"PyCharm\" alt=\"PyCharm\" width=\"40\" height=\"40\"\u003e \u003cimg src=\"https://www.pngfind.com/pngs/m/128-1286693_flask-framework-logo-svg-hd-png-download.png\" title=\"Flask API\" alt=\"Flask API\" width=\"40\" height=\"40\"\u003e\n\n## Pycharm\n--\u003e Visit the official website of pycharm: \u003ca href=\"https://www.jetbrains.com/pycharm/\"\u003e\u003cimg src=\"https://th.bing.com/th/id/R.c936445e15a65dfdba20a63e14e7df39?rik=fqWqO9kKIVlK7g\u0026riu=http%3a%2f%2fassets.stickpng.com%2fimages%2f58481537cef1014c0b5e4968.png\u0026ehk=dtrTKn1QsJ3%2b2TFlSfLR%2fxHdNYHdrqqCUUs8voipcI8%3d\u0026risl=\u0026pid=ImgRaw\u0026r=0\" title=\"PyCharm\" alt=\"PyCharm\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n--\u003e Download according to the platform that will be used like Linux, Macos or Windows.\u003cbr\u003e\u003cbr\u003e\n--\u003e Follow the setup wizard and sign up for the free version (trial version) or else continue with the premium or paid version.\u003cbr\u003e\u003cbr\u003e\n--\u003e First, in pycharm we have the concept of virtual environment. In virtual environment we can install all the required libraries or frameworks.\u003cbr\u003e\u003cbr\u003e\n--\u003e Each project has its own virtual environment, so thath we can install requirements like Libraries or Framworks for that project only.\u003cbr\u003e\u003cbr\u003e\n--\u003e After this we can create a new file, various file types are available in pycharm like script files, text files and also Jupyter Notebooks.\u003cbr\u003e\u003cbr\u003e\n--\u003e After selecting the required file type, we can continue the execution of that file by saving it and using this shortcut shift+F10 (In Windows).\u003cbr\u003e\u003cbr\u003e\n--\u003e Output is given in Console while installation happens in terminal in Pycharm.\u003cbr\u003e\n\n## Flask Server\n\n--\u003e Flask is a micro web framework written in Python.\u003cbr\u003e\u003cbr\u003e\n--\u003e It is classified as a microframework because it does not require particular tools or libraries.\u003cbr\u003e\u003cbr\u003e\n--\u003e Flask supports extensions that can add application features as if they were implemented in Flask itself.\n--\u003e To install flask in your system, just run this command-\n\n```\npip install flask\n```\n\n## Running Project in Flask Server\n\u003cp\u003eMake Sure all depencies are already satisfied before running the app.\u003c/p\u003e\n\n1. Ensure that you are in the project home directory.Create the machine learning model by running below command - \u003cbr\u003e\u003cbr\u003e\n--\u003e This machine_learning_model.py file contains the code for the amachine learning model.\n\n```\npython machine_learning_model.py\n```\nThis would create a serialized version of our model into a file model.pkl\n\n2. Run app.py using below command to start Flask API  \u003cbr\u003e\u003cbr\u003e\n--\u003e This app.py file contains the code for the flask app\n```\npython app.py\n```\nBy default, flask will run on port 5000.\n\n3. Navigate to URL http://localhost:5000\n\nYou should be able to view the homepage as below :\n\n\u003cimg width=\"916\" height=\"430\" title=\"Homepage\" alt=\"Homepage\" src=\"https://github.com/madhurimarawat/Machine-Learning-Python-Projects/assets/105432776/cae7ee43-1fee-42ba-a746-b7c9df04b496\"\u003e\n\u003cbr\u003e\nEnter valid numerical values in all the input boxes and hit Predict. Here I have entered 8.\u003cbr\u003e\u003cbr\u003e\n\nIf everything goes well, Predicted Value will be shown on the HTML page! \u003cbr\u003e\n\n\u003cimg width=\"916\" height=\"430\"  alt=\"Screenshot 2023-08-26 133516\" src=\"https://github.com/madhurimarawat/Machine-Learning-Python-Projects/assets/105432776/5f3d7615-2972-4786-8681-7d1f0e280b2f\"\u003e\u003cbr\u003e\n\n🌟 Project and Models will change but this process will remain the same for all flask projects.\n\n---\n# About Projects 📑\n\u003cp\u003eComplete Description about the project and resources used.\u003c/p\u003e\n\n## Project Structure\nEach project has four major parts :\n1. machine_learning_mode.py - This contains code for Machine Learning model to predict output based on input from a dataset file.\n2. app.py - This contains Flask APIs that receives details through GUI or API calls, computes the precited value based on our model and returns it.\n3. templates - This folder contains the HTML template to allow user to enter details and displays the predicted value.\n4. static- This folder contains the css for the HTML file.\n\n# Linear Regression Salary Prediction\n\n--\u003e First ML model is constructed using linear regression for the dataset.\u003cbr\u003e\u003cbr\u003e\n--\u003e Then this model is saved using pickle in disk with the extention .pkl(Pickle File).\u003cbr\u003e\u003cbr\u003e\n--\u003e The Homepage is designed for flask app.\u003cbr\u003e\u003cbr\u003e\n--\u003e After this the flask app code is written.\u003cbr\u003e\u003cbr\u003e\n--\u003e Finally we can run this app in the flask Server.\u003cbr\u003e\n\n## Dataset Used\n\n### Salary Dataset\n--\u003e Dataset is taken from: \u003ca href=\"https://www.kaggle.com/datasets/abhishek14398/salary-dataset-simple-linear-regression\n\"\u003e\u003cimg src=\"https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/189_Kaggle_logo_logos-1024.png\" height =40 width=40 title=\"Salary Dataset\" alt=\"Salary Dataset\"\u003e \u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n--\u003e Contains Salary data for Regression.\u003cbr\u003e\u003cbr\u003e\n--\u003e The dataset has 2 columns-Years of Experience and Salary and 30 entries.\u003cbr\u003e\u003cbr\u003e\n--\u003e Column Years of Experience is used to find regression for Salary.\u003cbr\u003e\u003cbr\u003e\n--\u003e Dataset is already cleaned,no preprocessing required.\u003cbr\u003e\n\n## Algorithm Used\n\u003ch3\u003eLinear Regression\u003c/h3\u003e\n--\u003e Regression: It predicts the continuous output variables based on the independent input variable. like the prediction of house prices based on different parameters like house age, distance from the main road, location, area, etc.\u003cbr\u003e\u003cbr\u003e\n--\u003e It computes the linear relationship between a dependent variable and one or more independent features. \u003cbr\u003e\u003cbr\u003e\n--\u003e The goal of the algorithm is to find the best linear equation that can predict the value of the dependent variable based on the independent variables.\u003cbr\u003e\n\n# Naive Bayes Classifier Diabetes Prediction\n\n--\u003e First ML model is constructed using Naive Bayes Classifier for the dataset.\u003cbr\u003e\u003cbr\u003e\n--\u003e Then this model is saved using pickle in disk with the extention .pkl(Pickle File).\u003cbr\u003e\u003cbr\u003e\n--\u003e The Homepage is designed for flask app.\u003cbr\u003e\u003cbr\u003e\n--\u003e After this the flask app code is written.\u003cbr\u003e\u003cbr\u003e\n--\u003e Finally we can run this app in the flask Server.\u003cbr\u003e\n\n## Dataset Used\n\n### Naive bayes classification data\n--\u003e Dataset is taken from: \u003ca href=\"https://www.kaggle.com/datasets/himanshunakrani/naive-bayes-classification-data\"\u003e\u003cimg src=\"https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/189_Kaggle_logo_logos-1024.png\" height =40 width=40 title=\"Naive bayes classification data\"\u003e \u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n--\u003e Contains diabetes data for classification.\u003cbr\u003e\u003cbr\u003e\n--\u003e The dataset has 3 columns-glucose, blood pressure and diabetes and 995 entries.\u003cbr\u003e\u003cbr\u003e\n--\u003e Column glucose and blood pressure data is to classify whether the patient has diabetes or not.\u003cbr\u003e\u003cbr\u003e\n--\u003e Dataset is already cleaned,no preprocessing required.\u003cbr\u003e\n\n## Algorithm Used\n\n\u003ch3\u003eNaive Bayes Classifiers\u003c/h3\u003e\n--\u003e Naive Bayes classifiers are a collection of classification algorithms based on Bayes’ Theorem. \u003cbr\u003e\u003cbr\u003e\n--\u003e It is not a single algorithm but a family of algorithms where all of them share a common principle, i.e. every pair of features being classified is independent of each other.\u003cbr\u003e\u003cbr\u003e\n--\u003e The fundamental Naive Bayes assumption is that each feature makes an independent and equal contribution to the outcome.\n\n# Random Forest Car Evaluation\n\n--\u003e First ML model is constructed using Naive Bayes Classifier for the dataset.\u003cbr\u003e\u003cbr\u003e\n--\u003e Then this model is saved using joblib in disk with the extention .pkl(Pickle File).\u003cbr\u003e\u003cbr\u003e\n--\u003e The Homepage is designed for flask app.\u003cbr\u003e\u003cbr\u003e\n--\u003e After this the flask app code is written.\u003cbr\u003e\u003cbr\u003e\n--\u003e Finally we can run this app in the flask Server.\u003cbr\u003e\n\n## Dataset Used\n### Cars Evaluation Dataset\n--\u003e Dataset is taken from: \u003ca href=\"https://www.kaggle.com/datasets/elikplim/car-evaluation-data-set\"\u003e\u003cimg src=\"https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/189_Kaggle_logo_logos-1024.png\" height =40 width=40 title=\"Cars Evaluation Dataset\" alt=\"Cars Evaluation Dataset\"\u003e \u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n--\u003e Contains information about cars with respect to features like Attribute Values:\u003cbr\u003e\u003cbr\u003e\n\u003ctable\u003e\n\u003ctd\u003e1. buying v-high, high, med, low \u003c/td\u003e\n\u003ctd\u003e2.maint v-high, high, med, low \u003c/td\u003e\n\u003ctd\u003e3.doors 2, 3, 4, 5-more \u003c/td\u003e\n\u003ctd\u003e4. persons 2, 4, more \u003c/td\u003e\n\u003ctd\u003e5. lug_boot small, med, big\u003c/td\u003e  \n\u003ctd\u003e6.safety low, med, high\u003c/td\u003e  \u003c/table\u003e\n--\u003e Target categories are:\u003cbr\u003e\u003cbr\u003e\n\u003ctable\u003e\n  \u003ctd\u003e1. unacc 1210 (70.023 %)\u003c/td\u003e\n  \u003ctd\u003e2. acc 384 (22.222 %)\u003c/td\u003e\n  \u003ctd\u003e3. good 69 ( 3.993 %)\u003c/td\u003e\n  \u003ctd\u003e4. v-good 65 ( 3.762 %)\u003c/td\u003e\u003c/table\u003e\n--\u003e Contains Values in string format.\u003cbr\u003e\u003cbr\u003e\n--\u003e Dataset is not cleaned, preprocessing is required.\u003cbr\u003e\n\n## Algorithm Used\n\n\u003ch3\u003eRandom Forest\u003c/h3\u003e\n--\u003e It is based on the concept of ensemble learning, which is a process of combining multiple classifiers to solve a complex problem and to improve the performance of the model.\u003cbr\u003e\u003cbr\u003e\n--\u003e Instead of relying on one decision tree, the random forest takes the prediction from each tree and based on the majority votes of predictions, and it predicts the final output.\u003cbr\u003e\u003cbr\u003e\n--\u003e The greater number of trees in the forest leads to higher accuracy and prevents the problem of overfitting.\n\n---\n## Libraries Used 📚\n\u003cp\u003eShort Description about all libraries used in Project.\u003c/p\u003e\nTo install python library this command is used-\u003cbr\u003e\u003cbr\u003e\n\n```\npip install library_name\n```\n\u003cul\u003e\n  \u003cli\u003eNumPy (Numerical Python) – Enables with collection of mathematical functions\nto operate on array and matrices. \u003c/li\u003e\n  \u003cli\u003ePandas (Panel Data/ Python Data Analysis) - This library is mostly used for analyzing,\ncleaning, exploring, and manipulating data.\u003c/li\u003e\n  \u003cli\u003eMatplotlib - It is a data visualization and graphical plotting library.\u003c/li\u003e\n\u003cli\u003eScikit-learn - It is a machine learning library that enables tools for used for many other\nmachine learning algorithms such as classification, prediction, etc.\u003c/li\u003e\n  \u003cli\u003ePickle- The pickle module is used for implementing binary protocols for serializing and de-serializing a Python object structure.\u003c/li\u003e\n  \u003cli\u003eJoblib- Joblib is a set of tools to provide lightweight pipelining in Python. In particular transparent disk-caching of functions and lazy re-evaluation (memoize pattern) and easy simple parallel computing.\u003c/li\u003e\n\u003c/ul\u003e\n\n---\n### Additional Resources 🧮📚📓🌐\n\n\u003cp\u003e To see more of my machine learning models, visit my repository: https://github.com/madhurimarawat/Machine-Learning-Using-Python \u003c/p\u003e\n\n---\n\n## Thanks for Visiting 😄\n\n- Drop a 🌟 if you find this repository useful.\u003cbr\u003e\u003cbr\u003e\n- If you have any doubts or suggestions, feel free to reach me.\u003cbr\u003e\u003cbr\u003e\n📫 How to reach me:  \u0026nbsp; [![Linkedin Badge](https://img.shields.io/badge/-madhurima-blue?style=flat\u0026logo=Linkedin\u0026logoColor=white)](https://www.linkedin.com/in/madhurima-rawat/) \u0026nbsp; \u0026nbsp;\n\u003ca href =\"mailto:rawatmadhurima@gmail.com\"\u003e\u003cimg src=\"https://github.com/madhurimarawat/Machine-Learning-Using-Python/assets/105432776/b6a0873a-e961-42c0-8fbf-ab65828c961a\" height=35 width=30 title=\"Mail Illustration\" alt=\"Mail Illustration📫\" \u003e \u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n- **Contribute and Discuss:** Feel free to open \u003ca href= \"https://github.com/madhurimarawat/Machine-Learning-Projects-In-Python/issues\"\u003eissues 🐛\u003c/a\u003e, submit \u003ca href = \"https://github.com/madhurimarawat/Machine-Learning-Projects-In-Python/pulls\"\u003epull requests 🛠️\u003c/a\u003e, or start \u003ca href = \"https://github.com/madhurimarawat/Machine-Learning-Projects-In-Python/discussions\"\u003ediscussions 💬\u003c/a\u003e to help improve this repository!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhurimarawat%2Fmachine-learning-projects-in-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadhurimarawat%2Fmachine-learning-projects-in-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhurimarawat%2Fmachine-learning-projects-in-python/lists"}