Posts

Showing posts with the label NumPy

Machine Learning - Moving Linear Regression

Image
About the Moving Linear Regression This type of regression to be used when data of sub periods are different inside periods. For example, hours of day, days of week, months of year. For example, the variance of  the frequency of people in a commercial mall varies when comparing the days of the week. The same applies to an amount of cars on downtown or roads when comparing the days in a week, or even when comparing months, due to holidays and vacancies. The chart bellow displays a seven year Moving Linear Regression applied to each month, for the number of ongoing research projects.  About the data The data is public available on the open government initiative of the State of São Paulo - Brazil. State of São Paulo / Brazil - Transparency Portal Disclaimer - The sole purpose of this presentation is to carry out tests with machine learning, using public and open data to improve the use of technology for future application in the FAPESP Virtual Library. ...

Machine Learning - Linear Regression

Image
A simple generic prediction  Maybe the most simple generic prediction is a collection of points, and a linear regression (when applicable) pointing to the future. However, aside from the uncertainty that surrounds most predictions, problem happens all the time along the way. In the very recent years, Covid-19, Russia invasion, and finally, China's lockdown again, and maybe this is not the last impacting event for the early 2020's. Which means that predictions have to be updated all the time. And it is also important to get track of the previous predictions for comparison and for impact analysis. Linear Regression The chart bellow can represent anything that relates to the stated use case above. Two lines which slopes varies, due to a great variation caused by an extremes events.  This model was used for the purpose of the exploration of the Scikit Learn library. The depicted problem is a time series, but the result variable has influence of other factors beyond ...