{"id":15442624,"url":"https://github.com/kruthiktr/crop-recommendation-system-using-machine-learning","last_synced_at":"2026-04-25T16:33:33.480Z","repository":{"id":257630066,"uuid":"858861135","full_name":"KRUTHIKTR/Crop-Recommendation-System-Using-Machine-Learning","owner":"KRUTHIKTR","description":"A machine learning-based system recommending crops based on soil, climate, and environmental conditions to optimize agricultural yields.","archived":false,"fork":false,"pushed_at":"2024-09-17T17:22:02.000Z","size":1397,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T13:13:59.880Z","etag":null,"topics":["ai-in-agriculture","crop-recommendation","data-visualization","machine-learning","prediction","python","python3","recommendation-system"],"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/KRUTHIKTR.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":"2024-09-17T16:55:14.000Z","updated_at":"2024-09-17T17:22:05.000Z","dependencies_parsed_at":"2024-09-17T21:08:32.359Z","dependency_job_id":"32e67576-6a95-4231-9f88-b5d36451fcfd","html_url":"https://github.com/KRUTHIKTR/Crop-Recommendation-System-Using-Machine-Learning","commit_stats":null,"previous_names":["kruthiktr/crop-recommendation-system-using-machine-learning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRUTHIKTR%2FCrop-Recommendation-System-Using-Machine-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRUTHIKTR%2FCrop-Recommendation-System-Using-Machine-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRUTHIKTR%2FCrop-Recommendation-System-Using-Machine-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRUTHIKTR%2FCrop-Recommendation-System-Using-Machine-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KRUTHIKTR","download_url":"https://codeload.github.com/KRUTHIKTR/Crop-Recommendation-System-Using-Machine-Learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245986277,"owners_count":20705189,"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":["ai-in-agriculture","crop-recommendation","data-visualization","machine-learning","prediction","python","python3","recommendation-system"],"created_at":"2024-10-01T19:28:56.159Z","updated_at":"2026-04-25T16:33:33.471Z","avatar_url":"https://github.com/KRUTHIKTR.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crop Recommendation System Using Machine Learning\nA machine learning-based system to recommend optimal crops based on soil, climate, and environmental conditions, aimed at helping farmers and agricultural professionals make better decisions for maximizing yields and profitability.\n\n## Table of Contents\n- [Overview](#overview)\n- [Dataset](#dataset)\n- [Key Features](#key-features)\n- [Technologies Used](#technologies-used)\n- [Project Structure](#project-structure)\n- [Experiment Results](#experiment-results)\n- [Installation](#installation)\n- [Contributing](#contributing)\n- [Dependencies](#Dependencies)\n- [License](#license)\n\n## Overview\nThis repository offers a machine learning pipeline to predict the most suitable crop based on specific environmental and soil properties. By leveraging advanced predictive models and historical data, the system delivers personalized crop recommendations tailored to the conditions of a given region or farm. Key factors considered include soil nutrient content (N, P, K), temperature, humidity, rainfall, and pH level.\n\n## Dataset\nThe system uses a dataset augmented with rainfall, climate, and fertilizer data relevant to India. The key attributes are:\n- **N:** Nitrogen in soil\n- **P:** Phosphorous in soil\n- **K:** Potassium in soil\n- **Temperature:** (°C)\n- **Humidity:** (%)\n- **pH:** Soil pH\n- **Rainfall:** (mm)\n\n## Key Features\n- **Input Data Collection:** Accepts user input for soil and environmental parameters.\n- **Data Preprocessing:** Handles missing values and scales features with normalization.\n- **Multiple ML Models:** Includes Decision Trees, Random Forests, SVM, and Gradient Boosting for accurate predictions.\n- **Model Training and Evaluation:** Models are evaluated via relevant metrics to ensure reliability.\n- **Crop Recommendation:** Suggests suitable crops for provided soil/climate input.\n\n## Technologies Used\n\n- **Python:** Backend and ML development\n- **Scikit-learn:** Model building, training, evaluation\n- **Pandas:** Data manipulation and analysis\n- **NumPy:** Numerical computations\n\n## Project Structure\n```\nCrop-Recommendation-System-Using-Machine-Learning/\n├── Datasets/\n│ ├── crop_data1.csv\n│ ├── crop_data2.cs\n├── Notebook/\n│ ├── Crop recommendation final.ipynb\n├── requirements.txt\n├── Contributing.md\n├── README.md\n├── License\n└── [output_and_model_files]\n```\n## Experiment Results\n- **Outlier Analysis:** All columns except Nitrogen (N) have outliers\n- **Train/Test Split:** 80% train, 20% validation\n- **Top Performing Model:** Gaussian Naive Bayes (GaussianNB) with:\n   - Training Accuracy: **93.26%**\n   - Validation Accuracy: **92.53%**\n\n## Installation\n\n1. **Clone this repository:**\n    ```\n    git clone https://github.com/KRUTHIKTR/Crop-Recommendation-System-Using-Machine-Learning.git\n    cd Crop-Recommendation-System-Using-Machine-Learning\n    ```\n\n2. **Create a virtual environment (optional):**\n    ```\n    python -m venv venv\n    source venv/bin/activate        # On Windows: venv\\Scripts\\activate\n    ```\n\n3. **Install dependencies:**\n    ```\n    pip install -r requirements.txt\n    ```\n## Contributing\n\nContributions are welcome. Please read the [`CONTRIBUTING.md`](https://github.com/KRUTHIKTR/Crop-Recommendation-System-Using-Machine-Learning/blob/main/Contributing.md)) file for guidelines.\n\n## Dependencies\nThe project requires the Python packages (mentioned in `requirements.txt`)\n\n## License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n## Contact\nFor any queries, feel free to reach out:\n\n\u003ca href=\"mailto:kruthiktrgowda24@gmail.com\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?message=Gmail\u0026logo=gmail\u0026label=\u0026color=D14836\u0026logoColor=white\u0026labelColor=\u0026style=for-the-badge\" height=\"26\" alt=\"gmail logo\"  /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/KRUTHIKTR\" target=\"_blank\"\u003e\n\u003cimg src=https://img.shields.io/badge/github-%2324292e.svg?\u0026style=for-the-badge\u0026logo=github\u0026logoColor=white alt=github style=\"margin-bottom: 5px;\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://linkedin.com/in/kruthiktr\" target=\"_blank\"\u003e\n\u003cimg src=https://img.shields.io/badge/linkedin-%231E77B5.svg?\u0026style=for-the-badge\u0026logo=linkedin\u0026logoColor=white alt=linkedin style=\"margin-bottom: 5px;\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://linktr.ee/kruthik_tr\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?message=Linktree\u0026logo=linktree\u0026label=\u0026color=1de9b6\u0026logoColor=white\u0026labelColor=\u0026style=for-the-badge\" height=\"26\" alt=\"linktree logo\"  /\u003e\n\u003c/a\u003e\n\n\n###### Thank you for checking out the Crop Recommendation System Using Machine Learning project! Feel free to explore and contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkruthiktr%2Fcrop-recommendation-system-using-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkruthiktr%2Fcrop-recommendation-system-using-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkruthiktr%2Fcrop-recommendation-system-using-machine-learning/lists"}