├── .gitignore
├── LICENSE
├── README.md
├── Ship_Performance.pdf
├── img
├── 01_Raw_Data.png
├── 02_Missing_Records.png
├── 03_Time_and_Main_Engine.png
├── 04_Draft.png
├── 05_Shaft.png
├── 06_Speed.png
├── 07_Wind.png
├── 08_Sea.png
├── 09_Wave.png
├── 10_Time_and_Main_Engine_Clean.png
├── 11_Rudder_Clean.png
├── 12_Temperature_Clean.png
├── 13_Data_Clean.png
├── 14_Draft_Trim_List.png
├── 15_Shaft_Speed_Squared.png
├── 16_Speed_Squared.png
├── 17_Apparent_Sea_Direction.png
├── 18_Correlation_Coefficients.png
├── 19_Fuel.png
├── 20_Wind_Correlation.png
├── 21_Shaft_Outliers.png
├── 22_Shaft_Outliers_Removed.png
├── 23_Speed_Outliers.png
├── 24_Speed_Outliers_Removed.png
├── 25_Data_Clean_Removed.png
├── 26_Linear_Coefficients.png
├── 27_Linear_Residuals.png
├── 28_Linear_Predictions.png
├── 29_Random_Forest_Hyperparameters.png
├── 30_Random_Forest_Importance.png
├── 31_Random_Forest_Residuals.png
├── 32_Random_Forest_Predictions.png
├── 33_Linear_Performance.png
├── 34_Linear_Performance_Draft.png
├── 35_Linear_Performance_Trim.png
├── 36_Linear_Performance_Wind.png
├── 37_Linear_Performance_Sea.png
├── 38_Random_Forest_Performance.png
├── 39_Random_Forest_Performance_Draft.png
├── 40_Random_Forest_Performance_Trim.png
├── 41_Random_Forest_Performance_Wind.png
├── 42_Random_Forest_Performance_Sea.png
├── 43_Sensor_Difference.png
├── 44_Sensor_Distribution.png
├── 45_Sensor_Rolling_Average.png
└── Commercial_Shipping.jpg
├── requirements.txt
└── src
└── Ship_Performance.ipynb
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *.cover
47 | .hypothesis/
48 | .pytest_cache/
49 |
50 | # Translations
51 | *.mo
52 | *.pot
53 |
54 | # Django stuff:
55 | *.log
56 | local_settings.py
57 | db.sqlite3
58 |
59 | # Flask stuff:
60 | instance/
61 | .webassets-cache
62 |
63 | # Scrapy stuff:
64 | .scrapy
65 |
66 | # Sphinx documentation
67 | docs/_build/
68 |
69 | # PyBuilder
70 | target/
71 |
72 | # Jupyter Notebook
73 | .ipynb_checkpoints
74 |
75 | # pyenv
76 | .python-version
77 |
78 | # celery beat schedule file
79 | celerybeat-schedule
80 |
81 | # SageMath parsed files
82 | *.sage.py
83 |
84 | # Environments
85 | .env
86 | .venv
87 | env/
88 | venv/
89 | ENV/
90 | env.bak/
91 | venv.bak/
92 |
93 | # Spyder project settings
94 | .spyderproject
95 | .spyproject
96 |
97 | # Rope project settings
98 | .ropeproject
99 |
100 | # mkdocs documentation
101 | /site
102 |
103 | # mypy
104 | .mypy_cache/
105 |
106 | # Logs and databases
107 | *.log
108 | *.sql
109 | *.sqlite
110 | *.json
111 | *.pkl
112 | *.db
113 | *.csv
114 |
115 | # OS generated files
116 | .DS_Store
117 | .DS_Store?
118 | ._*
119 | .Spotlight-V100
120 | .Trashes
121 | ehthumbs.db
122 | Thumbs.db
123 |
124 | # config file
125 | config.py
126 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Adam C Dick
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | REGRESSION MODELING
2 | # Dynamic Speed Optimization
3 | MODELING SHIP PERFORMANCE CURVES TO REDUCE FUEL CONSUMPTION
4 |
5 | [Browse the pitch deck...](Ship_Performance.pdf)
6 |
7 | Total fuel costs for the global commercial maritime shipping industry were approximately $100 billion in 2018. Emissions regulations, imposed by the International Maritime Organization, are expected to increase fuel costs by $24 billion when they take effect in 2020. Researchers are thus investigating statistical approaches to estimate fuel consumption based on ship speed.
8 |
9 | The industry is introducing artificial intelligence solutions to reduce ship fuel consumption with dynamic speed optimization. By gathering data about the required shipment time for a delivery, the performance of a ship’s propulsion system and the environmental conditions along the route, machine learning models can chart the tradeoff between fuel costs and speed.
10 |
11 | Let’s use time series data streams from ship sensors and weather records to train our own predictive regression models. With these models, we can generate ship performance curves that predict fuel consumption over a range of operating conditions. Finally, we can verify the reliability of our sensor data readings, which are prone to drift, by checking for stationarity over time.
12 |
13 | [Continue reading the full story curated by Cloud Forest, a Medium publication...](https://medium.com/cloud-forest/dynamic-speed-optimization-bcd9810900a?sk=e6c9ec5cc593c64ffde5292f69443074)
14 |
15 | ## Project Features
16 | MACHINE LEARNING
17 |
18 |
19 |
20 |
21 |
22 | ## Contribute
23 |
24 | **Contact**
25 | * [Email](mailto:adam.c.dick@gmail.com)
26 | * [LinkedIn](https://www.linkedin.com/in/adamcdick/)
27 | * [Medium](https://medium.com/@adam.c.dick)
28 | * [Scholar](https://scholar.google.com/citations?user=eMO88ogAAAAJ&hl=en)
29 |
30 | **Acknowledgements**
31 | * Image by [Anker Crew Insurance](https://www.ankercrew.com)
32 |
33 | **License**
34 | * [MIT License](https://github.com/acdick/dynamic_speed_optimization/blob/master/LICENSE)
35 |
--------------------------------------------------------------------------------
/Ship_Performance.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/Ship_Performance.pdf
--------------------------------------------------------------------------------
/img/01_Raw_Data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/01_Raw_Data.png
--------------------------------------------------------------------------------
/img/02_Missing_Records.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/02_Missing_Records.png
--------------------------------------------------------------------------------
/img/03_Time_and_Main_Engine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/03_Time_and_Main_Engine.png
--------------------------------------------------------------------------------
/img/04_Draft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/04_Draft.png
--------------------------------------------------------------------------------
/img/05_Shaft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/05_Shaft.png
--------------------------------------------------------------------------------
/img/06_Speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/06_Speed.png
--------------------------------------------------------------------------------
/img/07_Wind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/07_Wind.png
--------------------------------------------------------------------------------
/img/08_Sea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/08_Sea.png
--------------------------------------------------------------------------------
/img/09_Wave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/09_Wave.png
--------------------------------------------------------------------------------
/img/10_Time_and_Main_Engine_Clean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/10_Time_and_Main_Engine_Clean.png
--------------------------------------------------------------------------------
/img/11_Rudder_Clean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/11_Rudder_Clean.png
--------------------------------------------------------------------------------
/img/12_Temperature_Clean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/12_Temperature_Clean.png
--------------------------------------------------------------------------------
/img/13_Data_Clean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/13_Data_Clean.png
--------------------------------------------------------------------------------
/img/14_Draft_Trim_List.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/14_Draft_Trim_List.png
--------------------------------------------------------------------------------
/img/15_Shaft_Speed_Squared.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/15_Shaft_Speed_Squared.png
--------------------------------------------------------------------------------
/img/16_Speed_Squared.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/16_Speed_Squared.png
--------------------------------------------------------------------------------
/img/17_Apparent_Sea_Direction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/17_Apparent_Sea_Direction.png
--------------------------------------------------------------------------------
/img/18_Correlation_Coefficients.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/18_Correlation_Coefficients.png
--------------------------------------------------------------------------------
/img/19_Fuel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/19_Fuel.png
--------------------------------------------------------------------------------
/img/20_Wind_Correlation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/20_Wind_Correlation.png
--------------------------------------------------------------------------------
/img/21_Shaft_Outliers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/21_Shaft_Outliers.png
--------------------------------------------------------------------------------
/img/22_Shaft_Outliers_Removed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/22_Shaft_Outliers_Removed.png
--------------------------------------------------------------------------------
/img/23_Speed_Outliers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/23_Speed_Outliers.png
--------------------------------------------------------------------------------
/img/24_Speed_Outliers_Removed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/24_Speed_Outliers_Removed.png
--------------------------------------------------------------------------------
/img/25_Data_Clean_Removed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/25_Data_Clean_Removed.png
--------------------------------------------------------------------------------
/img/26_Linear_Coefficients.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/26_Linear_Coefficients.png
--------------------------------------------------------------------------------
/img/27_Linear_Residuals.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/27_Linear_Residuals.png
--------------------------------------------------------------------------------
/img/28_Linear_Predictions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/28_Linear_Predictions.png
--------------------------------------------------------------------------------
/img/29_Random_Forest_Hyperparameters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/29_Random_Forest_Hyperparameters.png
--------------------------------------------------------------------------------
/img/30_Random_Forest_Importance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/30_Random_Forest_Importance.png
--------------------------------------------------------------------------------
/img/31_Random_Forest_Residuals.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/31_Random_Forest_Residuals.png
--------------------------------------------------------------------------------
/img/32_Random_Forest_Predictions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/32_Random_Forest_Predictions.png
--------------------------------------------------------------------------------
/img/33_Linear_Performance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/33_Linear_Performance.png
--------------------------------------------------------------------------------
/img/34_Linear_Performance_Draft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/34_Linear_Performance_Draft.png
--------------------------------------------------------------------------------
/img/35_Linear_Performance_Trim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/35_Linear_Performance_Trim.png
--------------------------------------------------------------------------------
/img/36_Linear_Performance_Wind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/36_Linear_Performance_Wind.png
--------------------------------------------------------------------------------
/img/37_Linear_Performance_Sea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/37_Linear_Performance_Sea.png
--------------------------------------------------------------------------------
/img/38_Random_Forest_Performance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/38_Random_Forest_Performance.png
--------------------------------------------------------------------------------
/img/39_Random_Forest_Performance_Draft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/39_Random_Forest_Performance_Draft.png
--------------------------------------------------------------------------------
/img/40_Random_Forest_Performance_Trim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/40_Random_Forest_Performance_Trim.png
--------------------------------------------------------------------------------
/img/41_Random_Forest_Performance_Wind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/41_Random_Forest_Performance_Wind.png
--------------------------------------------------------------------------------
/img/42_Random_Forest_Performance_Sea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/42_Random_Forest_Performance_Sea.png
--------------------------------------------------------------------------------
/img/43_Sensor_Difference.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/43_Sensor_Difference.png
--------------------------------------------------------------------------------
/img/44_Sensor_Distribution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/44_Sensor_Distribution.png
--------------------------------------------------------------------------------
/img/45_Sensor_Rolling_Average.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/45_Sensor_Rolling_Average.png
--------------------------------------------------------------------------------
/img/Commercial_Shipping.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acdick/dynamic_speed_optimization/5a5bdd56dde00025473df896e87d60c79b714c9a/img/Commercial_Shipping.jpg
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | matplotlib==3.0.2
2 | missingno==0.4.1
3 | numpy==1.15.4
4 | pandas==0.23.4
5 | scikit-image==0.14.1
6 | scikit-learn==0.20.1
7 | scikit-surprise==1.0.6
8 | scipy==1.1.0
9 | seaborn==0.9.0
10 | statsmodels==0.9.0
--------------------------------------------------------------------------------