{"id":13487996,"url":"https://github.com/cleipski/CropPredict","last_synced_at":"2025-03-27T23:32:28.203Z","repository":{"id":217431706,"uuid":"89017676","full_name":"cleipski/CropPredict","owner":"cleipski","description":"Prediction of crop yields using machine learning.","archived":false,"fork":false,"pushed_at":"2023-04-22T10:44:23.000Z","size":9459,"stargazers_count":61,"open_issues_count":2,"forks_count":30,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T23:36:21.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cleipski.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}},"created_at":"2017-04-21T19:37:00.000Z","updated_at":"2024-10-28T05:02:45.000Z","dependencies_parsed_at":"2024-01-16T11:59:22.508Z","dependency_job_id":null,"html_url":"https://github.com/cleipski/CropPredict","commit_stats":null,"previous_names":["cleipski/croppredict"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleipski%2FCropPredict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleipski%2FCropPredict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleipski%2FCropPredict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleipski%2FCropPredict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleipski","download_url":"https://codeload.github.com/cleipski/CropPredict/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944020,"owners_count":20697945,"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":[],"created_at":"2024-07-31T18:01:07.675Z","updated_at":"2025-03-27T23:32:23.182Z","avatar_url":"https://github.com/cleipski.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"# CropPredict\n\nThis project aims to predict winter wheat yields based on location and weather data. It is inspired by  [this](https://github.com/aerialintel/data-science-exercise) data science challenge.\n\nHere I briefly outline the main steps in my approach as well as my main results. A detailed report is also available:  [Full Report](https://github.com/cleipski/CropPredict/blob/master/Full_Report.md)\n\n\n## Executive summary\n\nA gradient-boosted decision tree regressor turned out to be the best performer. The tuned model achieved an R\u003csup\u003e2\u003c/sup\u003e value of ~0.83 with a root mean square error (RMSE) of 5.3 (yield values in the dataset range from 10 to 80). The mean absolute percentage error is ~5%.\n\n\u003cimg src=\"https://github.com/cleipski/CropPredict/raw/master/images/model_performance.png\" width=\"200\"/\u003e\n\n\n## Technical overview\n\nBelow I outline briefly the main steps in the workflow. The  Jupyter notebooks linked in each step contain the code (with comments) that was used to achieve the results.\n\n| Task | Summary | Notebook|\n| --- | --- | -- |\n| Explore and clean data | Exploring data structure and impute missing values. | [01](https://github.com/cleipski/CropPredict/blob/master/01_data_exploration.ipynb) |\n| Collect additional data | For each location determine elevation and length-of-day at a unified date. | [03](https://github.com/cleipski/CropPredict/blob/master/03_elevation_and_length_of_day.ipynb) |\n| Feature engineering | Construct higher-level features by characterizing each location across the season. | [04](https://github.com/cleipski/CropPredict/blob/master/04_feature_engineering.ipynb) |\n| Statistical analysis | High-level statistical exploration of final feature set. | [05](https://github.com/cleipski/CropPredict/blob/master/05_statisctical_feature_exploration.ipynb) |\n| Select algorithm | Compare a number of algorithms using cross validation to identify the most promising performers for this data/feature set. | [06](https://github.com/cleipski/CropPredict/blob/master/06_algorithm_selection.ipynb) |\n| Tune model | Tune hyper-parameters of a gradient-boosted tree regressor using cross validation, learning curves and validation curves. Find best balance between performance and bias-variance tradeoff. | [06](https://github.com/cleipski/CropPredict/blob/master/06_algorithm_selection.ipynb) |\n| Establish model performance | Use a 30% hold-out test set to compare predicted and observed yields. | [06](https://github.com/cleipski/CropPredict/blob/master/06_algorithm_selection.ipynb) |\n\n\n\n## Future work\n\nWhile the performance of the model appears quite good, a close inspection reveals that it has a tendency to under predict at high yield values (\u003e60 observed). There is also some residual overfitting, even after careful tuning.\n\nIn future iterations, these issues could be addressed by:\n\n* getting more data,\n* engineering additional and/or different features, or\n* using ensemble techniques by combining the results of different models.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleipski%2FCropPredict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleipski%2FCropPredict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleipski%2FCropPredict/lists"}