What’s the story about commenting? Recently, there was a discussion on LinkedIn around comments, again! As usual, it appears that people either fall on the side of comment everything in this code or the side of avoid comments at all costs, even if there is a gun to your head. Moderation?!! any one?!! This is…
Month: February 2024
Piecewise-Linear Functions: Part II
In Part I (here), we discussed what are Piecewise-Linear Functions (PLFs). In Part II, this document, we are going to discuss how to estimate the coefficients. As it was mentioned in Part I, if we do not need to guarantee the continuity, all you need to do is to just fit a line to each…
Piecewise-Linear Functions: Part I
We are going to divide this document in two parts. The first part, this document, we are going to discuss piecewise linear functions (PLFs) and how to implement one in Python. The second part, Part II, we will discuss how to fit the coefficients, detect the break-points locations, and even optimize the number of the…