{"id":25029193,"url":"https://github.com/okaditya84/smart-product-recommender","last_synced_at":"2026-05-05T07:33:00.540Z","repository":{"id":274197828,"uuid":"922203218","full_name":"okaditya84/Smart-Product-Recommender","owner":"okaditya84","description":"SmartProductRecommender is an advanced recommendation system that uses purchase history data to provide precise and relevant product suggestions. It employs sophisticated similarity calculations and dynamic price adjustments to enhance user shopping experiences.","archived":false,"fork":false,"pushed_at":"2025-01-25T15:56:41.000Z","size":1084,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T18:45:04.857Z","etag":null,"topics":["ai","data-science","python","recommendation-system","statistics"],"latest_commit_sha":null,"homepage":"","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/okaditya84.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":"2025-01-25T15:41:36.000Z","updated_at":"2025-01-25T15:59:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f871da69-2e23-4b62-87aa-6edef346940d","html_url":"https://github.com/okaditya84/Smart-Product-Recommender","commit_stats":null,"previous_names":["okaditya84/smart-product-recommender"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/okaditya84/Smart-Product-Recommender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okaditya84%2FSmart-Product-Recommender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okaditya84%2FSmart-Product-Recommender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okaditya84%2FSmart-Product-Recommender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okaditya84%2FSmart-Product-Recommender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okaditya84","download_url":"https://codeload.github.com/okaditya84/Smart-Product-Recommender/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okaditya84%2FSmart-Product-Recommender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","data-science","python","recommendation-system","statistics"],"created_at":"2025-02-05T21:00:24.874Z","updated_at":"2026-05-05T07:33:00.524Z","avatar_url":"https://github.com/okaditya84.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartProductRecommender\n\n## Overview\n\nSmartProductRecommender is a robust recommendation system that leverages purchase history data to provide accurate and relevant product suggestions. It utilizes advanced similarity calculations and dynamic price range adjustments to enhance user shopping experiences.\n\n## Features\n\n- **Data Preprocessing**: Cleans and processes sales and customer data to ensure consistency and accuracy.\n- **Purchase Pattern Analysis**: Analyzes purchase patterns to extract meaningful insights such as median quantity, average price, and unique customers.\n- **Similarity Calculation**: Calculates product similarity based on price, purchase patterns, and customer overlap.\n- **Dynamic Price Range Calculation**: Adapts price ranges dynamically based on product price volatility.\n- **Recommendation Generation**: Provides product recommendations based on similarity scores, confidence scores, and fallback mechanisms.\n- **API Integration**: Includes a Flask API to serve recommendations based on user input.\n\n## Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/yourusername/SmartProductRecommender.git\n   cd SmartProductRecommender\n\n2. **Install the dependencies**:\n   ```bash\n   pip install -r requirements.txt\n\n3. **Run the application**:\n   ```bash\n   python app.py\n\n## Usage\n\n## API Usage\n\n### Get Recommendations\n- **Endpoint**: `GET /api/recommend`\n- **Description**: Retrieve product recommendations\n- **Parameters**:\n    - `product` (string): Target product name\n- **Example Request**:\n    ```http\n    GET /api/recommend?product=laptop\n    ```\n- **Example Response**:\n    ```json\n    {\n  \"recommendations\": [\n    {\n      \"product\": \"Product Name\",\n      \"similarity_score\": 0.95,\n      \"avg_price\": 100.0,\n      \"typical_quantity\": 10,\n      \"confidence_score\": 0.90\n    },\n    ...\n  ]}\n\n    ```\n\n## Example usage in juypyter notebook\n\n```python\nfrom product_recommendation import ProductRecommender\n\n# Initialize the recommender\nrecommender = ProductRecommender()\nrecommender.load_and_process_data('SALE DATA.csv', 'CUSTOMER DATABASE.csv')\n\n# Get recommendations\ninput_product = \"Lux White FlawlessGlow (PO4)41Gm(40*54)\"\nrecommendations = recommender.recommend_products(input_product, price=28.41, quantity=3240)\n\n# Print recommendations\nprint(f\"Recommendations for '{input_product}':\")\nfor idx, rec in enumerate(recommendations, 1):\n    print(f\"{idx}. {rec['product']} (Avg Price: ₹{rec['avg_price']:.2f}, Typical Quantity: {rec['typical_quantity']})\")\n```\n\n## Project Structure\n\n- app.py: Flask API implementation to serve recommendations.\n- product_recommendation.py: Core recommendation logic and data processing.\n- requirements.txt: List of dependencies required to run the project.\n- productRecommendation_purchaseHistory.ipynb: Jupyter Notebook for interactive analysis and testing.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokaditya84%2Fsmart-product-recommender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokaditya84%2Fsmart-product-recommender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokaditya84%2Fsmart-product-recommender/lists"}