{"id":21802988,"url":"https://github.com/samjoesilvano/password_strength_prediction_using_nlp","last_synced_at":"2026-05-08T07:31:33.943Z","repository":{"id":254676305,"uuid":"847219719","full_name":"SamJoeSilvano/Password_Strength_Prediction_using_NLP","owner":"SamJoeSilvano","description":"Developed a predictive model to categorize passwords as Strong, Good, or Weak, enhancing security and reducing breach risks. The project involves cleaning and analyzing data from an SQL database, using the TF-IDF technique for transformation, and implementing a Logistic Regression model to achieve accurate classifications.","archived":false,"fork":false,"pushed_at":"2024-09-25T15:27:42.000Z","size":2261,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T16:37:43.493Z","etag":null,"topics":["data-analysis","data-classification","data-cleaning","data-visualization","logistic-regression","machine-learning","natural-language-processing","pandas","password-security","password-strength","python","scikit-learn","sql","tf-idf"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamJoeSilvano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-08-25T07:27:44.000Z","updated_at":"2024-10-16T18:59:22.000Z","dependencies_parsed_at":"2025-08-25T16:25:34.401Z","dependency_job_id":"045d1efe-61be-4e7d-8f48-c85ea9c64568","html_url":"https://github.com/SamJoeSilvano/Password_Strength_Prediction_using_NLP","commit_stats":null,"previous_names":["samjoesilvano/password_strength_prediction_using_nlp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamJoeSilvano/Password_Strength_Prediction_using_NLP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJoeSilvano%2FPassword_Strength_Prediction_using_NLP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJoeSilvano%2FPassword_Strength_Prediction_using_NLP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJoeSilvano%2FPassword_Strength_Prediction_using_NLP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJoeSilvano%2FPassword_Strength_Prediction_using_NLP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamJoeSilvano","download_url":"https://codeload.github.com/SamJoeSilvano/Password_Strength_Prediction_using_NLP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJoeSilvano%2FPassword_Strength_Prediction_using_NLP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["data-analysis","data-classification","data-cleaning","data-visualization","logistic-regression","machine-learning","natural-language-processing","pandas","password-security","password-strength","python","scikit-learn","sql","tf-idf"],"created_at":"2024-11-27T11:36:32.683Z","updated_at":"2026-05-08T07:31:33.912Z","avatar_url":"https://github.com/SamJoeSilvano.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Strength Classification using Natural Language Processing\n\n**A Predictive Model for Classifying Passwords into Strong, Good, or Weak Categories to Enhance Password Security.**\n\n---\n\n## Table of Contents\n\n- [Project Overview](#project-overview)\n- [Features](#features)\n- [Tech Stack](#tech-stack)\n- [Data Pipeline](#data-pipeline)\n- [Modeling](#modeling)\n- [Evaluation Metrics](#evaluation-metrics)\n- [Setup Instructions](#setup-instructions)\n- [Usage](#usage)\n- [Future Enhancements](#future-enhancements)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Project Overview\n\nThe **Password Strength Classification** project aims to enhance password security by developing a predictive model that classifies passwords into three categories: **Strong**, **Good**, and **Weak**. This classification helps users understand the strength of their passwords and mitigates the risk of breaches by encouraging the use of stronger passwords.\n\nThe key goals of this project are:\n- To provide an intuitive model for classifying passwords based on strength.\n- To analyze and clean data from an SQL database for high-quality input.\n- To apply advanced natural language processing techniques to enhance prediction accuracy.\n\n---\n\n## Features\n\n- **Password Classification**: Classifies passwords into Strong, Good, or Weak categories based on learned features.\n- **Data Visualization**: Provides insights into password strength distribution and common characteristics of each category.\n- **User-Friendly Interface**: Allows users to input passwords and receive immediate feedback on strength classification.\n- **Robust Data Analysis**: Uses thorough data cleaning and transformation techniques to ensure accurate model training.\n\n---\n\n## Tech Stack\n\n- **Programming Language**: Python\n- **NLP Libraries**: Scikit-learn, NLTK, Pandas\n- **Data Processing**: NumPy, SQLAlchemy\n- **Machine Learning**: Logistic Regression, TF-IDF (Term Frequency-Inverse Document Frequency)\n- **Visualization**: Matplotlib, Seaborn\n- **Deployment**: Flask (optional for web app), Jupyter Notebooks (for development)\n\n---\n\n## Data Pipeline\n\n1. **Data Collection**: Password data is collected from an SQL database, containing a diverse set of password samples.\n  \n2. **Data Cleaning**:\n   - Removed duplicates and irrelevant entries to ensure data quality.\n   - Handled missing values by imputing or removing incomplete records.\n\n3. **Data Transformation**:\n   - Utilized the **TF-IDF** technique to convert password strings into numerical vectors for model training.\n   - Engineered additional features such as password length, character variety (uppercase, lowercase, numbers, symbols), and common patterns.\n\n4. **Exploratory Data Analysis (EDA)**:\n   - Visualized the distribution of password strengths and analyzed common characteristics of Strong, Good, and Weak passwords.\n   - Identified patterns that contribute to password strength.\n\n---\n\n## Modeling\n\n### 1. **Logistic Regression Model**\n   - Chose Logistic Regression for its effectiveness in binary classification problems and its interpretability.\n   - Trained the model using the TF-IDF transformed features and the corresponding strength labels.\n\n### 2. **Model Training**:\n   - Split the dataset into training and testing sets to validate model performance.\n   - Performed hyperparameter tuning to optimize the model’s performance.\n\n### 3. **Model Validation**:\n   - Evaluated the model using cross-validation techniques to ensure generalization.\n   - Assessed performance metrics on the test set to confirm model reliability.\n\n---\n\n## Evaluation Metrics\n\nThe model is evaluated using the following metrics to ensure accurate password classification:\n\n- **Accuracy**: Measures the overall correctness of the model's predictions.\n- **Precision**: The ratio of true positive predictions to the total predicted positives, indicating the model's ability to identify Strong passwords.\n- **Recall**: The ratio of true positive predictions to the total actual positives, reflecting the model's ability to capture all Strong passwords.\n- **F1 Score**: The harmonic mean of precision and recall, providing a balanced measure of performance.\n\nThe Logistic Regression model achieved a high accuracy score, demonstrating its effectiveness in classifying password strengths accurately.\n\n---\n\n## Setup Instructions\n\n### Prerequisites\n\n- Python 3.7+\n- Required libraries: Pandas, NumPy, Scikit-learn, NLTK, SQLAlchemy, Matplotlib, Seaborn\n\n### Installation\n\n1. Clone the repository:\n   git clone https://github.com/SamJoeSilvano/Password_Strength_Prediction_using_NLP.git\n\n2. Navigate to the project directory:\n   cd password-strength-classification\n\n3. Install the dependencies:\n   pip install -r requirements.txt\n\n4. Run the Jupyter Notebook or Flask app (optional):\n   jupyter notebook\n\n   or \n\n   python app.py\n\n---\n\n## Usage\n\n1. **Load Data**: Import password data from the SQL database.\n2. **Visualize Trends**: Generate visualizations to understand password strength distribution.\n3. **Train Model**: The Logistic Regression model is trained on the processed password data.\n4. **Classify Passwords**: Input passwords into the model to receive classification as Strong, Good, or Weak.\n5. **Evaluate Model**: Analyze performance metrics to ensure classification accuracy.\n\n---\n\n## Future Enhancements\n\n- **Advanced NLP Techniques**: Explore advanced models such as recurrent neural networks (RNNs) or transformers for improved classification.\n- **User Interface**: Develop a more robust web application to allow users to test and visualize password strength interactively.\n- **Real-time Feedback**: Implement real-time password strength feedback as users create passwords.\n- **Broader Dataset**: Incorporate a wider range of password samples to enhance model robustness.\n\n---\n\n## Contributing\n\nContributions are welcome! Here’s how you can help:\n\n1. Fork the project.\n2. Create a new feature branch (`git checkout -b feature-branch`).\n3. Commit your changes (`git commit -m 'Add new feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n---\n\n## Acknowledgements\n\n- Thanks to the open-source community for their invaluable libraries and resources that made this project possible.\n- Special recognition to the researchers and developers focused on enhancing password security.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjoesilvano%2Fpassword_strength_prediction_using_nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamjoesilvano%2Fpassword_strength_prediction_using_nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjoesilvano%2Fpassword_strength_prediction_using_nlp/lists"}