Frontiers of geodesign: Machine learning, Marine management and Port Operations

As a part of working with Geodesign and Geodesignhub, I am involved in many side projects, some commercial work and some just as a hobby.  I recently got involved in a very interesting and challenging side project around machine learning, port operations with significant implications for marine environments and I thought I will share my experience.

The problem

Ports play a major role in the modern economy. Often times these ports are near cities and major land based transport network and also in close proximity to valuable marine environments, river basins and drainage ecosystems. Coastal management and “coastal geodesign” is a area that interests me personally. Coastal areas are interesting becuase of the mix of environmental, economic, natural systems that are at play here. In addition, a integrated management of land and marine assets is something we do often at Geoesignhub in the context of fisheries, flood water drainge etc. Till now however, I did not really touch port operations, it is something that is critical given the large increase in ship traffic.

Background

Airbus recently announced a machine learning / image recognition challenge. They have launched a new generation of satellites and stratospheric drones that caputre movement of ships near ports in near realtmie. The challege was to build a machine learning model to identify ships in a image with reasonable accuracy. I was immidiately intrigued, I have worked on machine learning models in Agriculture, I will share my experiences about it at a later date.

Start from zero

I have been using Python extensively for the past number of years and I have built machine learning algorithms to do various things inside Geodesignhub. Eg. see how we use it from a earlier blog post. Image recognition has been used extensively in various fields and slowly is coming into geo-sciences. For e.g. look at onesoil.ai and others. I had heard a lot about neural networks etc. and I wanted to understand it deeper beyond the marketing hype and buzzwords.

Given my responsitibiltes with Geodesignhub and GUTMA,  I am plenty busy but I challenged my self to see if I can stretch to do this as side project. Generally, I spend half a day every week working on a bunch of ideas around geodesign. Some become products (e.g. geoforage.io), some just demonstrators like this that lead to something bigger. This is also a company policy: when you work for Geodesignhub, a part of your time will be spent on developing open source tools or contributing to them.

Anyway, as a total newbie I jumped in, it is a great feeling to not know anything about a subject and try to learn it from scratch. I looked up how image recognition is done in medcial sciences and came across UNET and decided to try it out. I created a small repository and started to play with model parameters, image processing and model performance. I also looked up some of the other newer model techniques like R-CNN mask, Fast CNN etc. I settled on the Unet model because I thought it would be a great first step to see and test. The others seemed to be slightly complicated and linked to ImageNet. I dont think I understand everything about them but I got a good introdcution on how they work.

The results

Take a look a the model on the Kaggle page and scroll to the bottom, you will see the input image and the output predictions. This is in no way going to win a prize or be in the top 100, in fact the competition winner has a accuracy of .85 and my kernel as a accuracy of .7160. There is a long way to go still, none the less I am very happy that I was able to take on a challenge, commit my self to it, not give up and have a submission in time. There is much to learn, I still dont understand exactly how these different models work. Or why some models are faster than others and how to tweak the training set. Why GPU processsing is so much faster for machine learning or how Kaggle can offer cutting edge GPUs for free to the public to test models. They are so expensive! In hindsight, I would recommend just to use Kaggle and forget about what I did: setup my own repository and server.

Screenshot 2018-12-03 at 15.27.30.png
Results

Why it matters

Geodesignhub provides solutions to help manage problems of design and geo-management. You can think of it as project management for geo-problems. Our software supports negotiations and execution of these negotiated outcomes. The model described above will only get better and we will continue developing it to use as a part of our offering for coastal managment solutions. How to optimize port operations? How to manage flow of ships in a critical marine environments? How do decide collectively in a marine / littoral context? Using our open API system we can link this type of work into the decision making and operations management. As I and the company develops deeper expertise in this field, we are confident that we can help ports, marine and littoral organizations in their management using the absolute cutting edge technologies.

I plan to take on challenges like these every six months to never be complacent, develop deep expertise and push the my personal boundaries.

Advancing Financial Analysis in Geodesign

Summary

I describe a plugin that performs Discounted Cash Flow Analysis on project ideas. The goal of this plugin is to provide slightly more advanced financial analysis and calculations at the design stage beyond just calculating the area and multiplying with the construction cost.

Background

When I first started with geodesign, design and finance seemed two different worlds. In the most simple form of financial analysis, the area of a project is multiplied by a per hectare or per acre construction cost. This type of simplistic analysis does not work in the real world and even though everyone understands this, it is very prevalent in design practice especially in the early stages. There are no simple tools to perform slightly sophisticated financial analysis on an idea.

Objective

Generally design and finance work in silos even though their work is intricately connected. One way to improve the financial capability of a non-finance professional is to provide simple tools to gently introduce financial analysis. A good technic to assess the “fair value” of a project or idea is the Discounted Cash Flow Analysis. I am not going to get into the details of it but it is quite straight forward to understand. I set about to build a plugin with the goal to provide slightly more sophisticated financial analysis for individual project ideas in Geodesign Hub. Of course it cannot replace professional financial assessments but it can be used to educate users on how implementation can work and how decisions are made in the real world away from simplistic calculations.

Demo and Screenshot

You can play with the plugin by clicking on the link here and a brief explanation is below

annotated
Discounted Cash Flow Main Interface

Annotations Explained

  1. The Input diagram, it is a idea that the designer has that needs to be built or constructed.
  2. The name, size and estimated construction cost and the geometry. All of these are downloaded using the Geodesign Hub API, in this case, it is a 270 hectare development.
  3. At a estimated EUR 100k / hectare the cost of construction is estimated by multiplying the area of the project with the cost of construction per hectare. This can be changed to another if you think that it can done cheaper or more expensively.
  4. Estimate the annual income for your investment.
  5. Estimate the annual growth as a percentage. e.g. if you choose 2% and annual income of 100,000 then on year 1 you will earn 100,000, year 2 will be 102,000, year 3 your income will be 104,040 etc.
  6. Weighted Annual Cost of Capital (WACC): This is the cost of money or your opportunity cost. A way to think about this is if you did not invest in this project, and invested in say the stock market how much return you think you can get.
  7. 8. 9. 10. Once the “Compute NPV” button is pressed, this shows the total expected cash flow and the chart of Actual and Discounted Cash flow and most importantly the Net Present Value. If the NPV is positive, it could mean that given your model parameters, this investment is overvalued and it may not be a good investment given the parameters. On the other hand, if the NPV is negative, then it may be a good investment.

Limitations

As with a lot of things finance related, there are a number of limitations of the technique. A good blog post about the limitations is here. But this can provide a good understanding of how prospective investors think and what drives their decision. 

More Information

You can use the API provided by Geodesign Hub to build your plugins and models that integrate directly with the workflow. In fact, you can build paid plugins and microservices and get paid for access. I will share more details about the Store and paid plugins shortly. All of this is open source and you can see it in action on Geodesign Hub and also see the code on the Github repository.

Geodesign Advances: Machine Learning and Geodesign – Part 1

Summary

This article is a part of a series that I call as “Geodesign Advances” where I talk about how Geodesign Hub uses state-of-the-art computing technologies to help the process of collaborative design. In this article, I will describe how we implement machine learning algorithms to help people who design to collaborate and interact with each other.

Geodesign with Geodesign Hub

Geodesign Hub is a platform for collaborative designing. With Geodesign Hub, a number of people can simulteanously design and negotiate complex geo-planning problems. We usually have anywhere from 15-60 people from different disciplines and professional specialities and even ordinary citizens working simultaenously on a project. A project can be anything from designing a city, making a evacuation plan, preparing for dramatic change in a neighbourhood etc. Geodesign Hub is easy to understand and get started, we usually have been able to train people on the capabilities within 30 minutes.

Designing with Diagrams

Geodesign Hub works especially well on early stages of a design problem and is used with a group of people doing the design activity togther. To begin with, people get together and draw simple diagrams on a map to communicate their idea for improving the current state. Below is a diagram drawn on the tool. It describes a Marsh Restoration project. People add a lot of diagrams and usually a project has many diagrams: usually more than 200 some shown in the picture below.

diagram-single
Single Diagram

all-diagrams
Many Diagrams in a project
These diagrams are drawn indiviually by different people in real time. We use the power of modern computing and machine learning tools to aid people when they draw diagrams.

What is machine learning?

Machine Learning, Aritificial Intelligence and Deep Learning are used interchangably now-a-days. Bascially, Arthur Samuel described it as: “the field of study that gives computers the ability to learn without being explicitly programmed.”

Machine learning is very prevenlant and used in a number of things that you use everyday. For e.g. when Netflix makes movie suggestions or Gmail filters spam or Amazon recommends similar products, they are using machine learning algorithms that get better over time as they analyze more data.

I dont want to get too much in to Machine learning specifics but basically machine learning algorithms fall into two main categories (there are others as well):

  • Supervised Learning Algorithms
  • Unsupervised Learning Algorithms

In supervised learning, the “right answer” is given by the algorithm based on previous data that it analyzes: i.e. a algorithm predicting a sale price for a house; or if a email is spam or not.

In unsupervised learning, there is no “training data”. Data is fed into the algorithm and the algorithm then analyzes the data to find patterns. This technique is used commonly for example in Google news, when different news articles are grouped together under the same title. The alogrithm understands that all the articles are talking about the same event without it having any understanding of the event itself. This technique has other applicaitons: it can also be used to segment customers in marketing.

Brief aside: I am currently enrolled in a the brilliant Machine Learning Course in Coursera by Prof. Andrew Ng. If you are interested in this topic and want to learn more about this, I would highly recommend this course. I learnt all of the above from there.

How can machine learning help geodesign?

At Geodesign Hub we use both supervised and unsupervised learning algorithms to help in the design process, I will write about how we use supservised learning in another article but for this one, I will focus on how we use unsupervised machine learning to help designers.

As I described in the beginning of the article, the participants in a project are drawing different design ideas and interventions to “improve” the problem that a area is facing. Frequently, given the diverse participants, many people have different ideas for the same place: someone might say a empty lot should be converted into a public park, others may think it is better to have parking, while others may think that it is better to build mixed use spaces there. This is what people are drawing in diagrams.

Show other ideas people have in realtime

When you have so many diagrams, it can be hard to figure out what is the content of every diagram. If I am working on the downtown area, I am only concerned about what other people think should happen in the downtown and I should be shown only the diagrams (among the 200+) that are relevant to downtown. We use supervised learning to show diagrams in a area in realtime. This is shown in the video below.

We start in a broad study area and as I zoom and pan to the area of my interest, the “nearby diagrams” is constantly updated. The algorithm understands where you are in the study area and then shows ideas that other people have for this place so you know beforehand the ideas and encourages you to discuss your idea with the others to see if both can work.

This slideshow requires JavaScript.

Observe as I pan the map, “diagrams nearby” changes and updates. What is going on in the backend is that the platform is running a machine learning algorithm to figure out where you are on a map and it shows relevant diagrams nearby having analyzed in realtime all the 200+ diagrams. This is kind of like Netflix recommendations or Amazon related products except you are shown other design ideas. Now that we know that there are others who have suggestions for this place, I can go and discuss their ideas and hopefully accomodate them in my plan.

Facilitating communication and negotiation

I just demonstrated how we use unsupervised learning to analyze existing diagrams drawn in a place and then show them so that the person drawing a new one knows what idaes others had. This enables smooth negotiation and more importantly better understanding of what ideas others have for a place. There are many things that I can discuss reagrding the technical aspects of this, let me know if you would like me to show that as well. All of this state of the art technology is available for free in Geodesign Hub.

In the next article in the series I will show how we use supervised machine learning to help infer the intent of a diagram.