Some Architectural Considerations for Algorithms in Python

Speaker : François Durand
Nokia Bell Labs
Date: 24/10/2018
Time: 10:00 am - 11:30 am
Location: Doctoral Training Center (EIT Digital)

Abstract

In this talk, we address a very common and practical question for the programmer: what should be the general architecture of our code? In particular, when we plan to implement an algorithm, should we write it as a function that takes arguments and parameters as input, and gives its result as output? Or should we write a dedicated class? If so, how should we organize this class? How to ensure compatibility, easiness to implement and to maintain the code, rapidity to implement new functionalities? How to design the architecture in order to facilitate the composition of several algorithms?
After presenting the problem and its challenges, we present an architecture inspired from the package Scikit-learn, then a variant with a more functional-style flavor. Lastly, we show how to use “properties” and especially “cached properties” to ensure a lazy evaluation while keeping the code very easy to write, maintain and extend.