1599214260

In any company, there is an embedded desire to predict its future revenue and future sales. The basic recipe is:

*Collect historical data related to previous sales and use it to predict expected sales.*

Photo by Markus Spiske on Unsplash

Over the last ten years, the rise of deep learning as the driving force behind all imaginable machine learning benchmarks revolutionized the field: be it in computer vision, language and so many others. Recently, one could argue that deep learning has restructured the potential future of sales forecasting by allowing models to encode for multiple time series in a single model as well as account for categorical variables. My goal today is:

**To walk you through the basic intuitions behind the main concepts and models for sales forecasting from a time-series perspective and discuss what kind of capabilities recent deep learning models could bring to the table.**

In case you feel like you need to brush up on the basics of sales forecasting and time-series, I recommend these 3 reads:

- Harvard business article on the fundamentals of sales forecasting.
- TDS article by @Marco Peixeiro from on @Towards Data Science (really comprehensive and instructive).
- “Time Series Forecasting Principles with Amazon Forecast”. They do a thorough job of explaining how Sales Forecasting works, as well as what are the challenges and problems one might encounter in the field.

#machine-learning #deep-learning #sales-forecasting #market-research-reports #data-science

1598034720

Flow Forecast is a recently created open-source framework that aims to make it easy to use state of the art machine learning models to forecast and/or classify complex temporal data. Additionally, flow-forecast natively integrates with Google Cloud Platform, Weights and Biases, Colaboratory, and other tools commonly used in industry.

**Background**

In some of my previous articles I talked about the need for accurate time series forecasts and the promise of using deep learning. Flow-Forecast was originally, created to forecast stream and river flows using variations of the transformer and baseline models. However, in the process of training the transformers I encountered several issues related to finding the right hyper-parameters and the right architecture. Therefore, it became necessary to develop a platform for trying out many configurations. Flow forecast is designed to allow you to very easily try out a number of different hyper-parameters and training options for your models. Changing a model is as simple as swapping out the model’s name in the configuration file.

Another problem I faced was how to integrate additional static datasets into the forecasts. For river flow forecasting, there was a lot of meta-data such as latitude, longitude, soil depth, elevation, slope, etc. For this, we decided to look into unsupervised methods like autoencoders for forming an embedding. This spurred the idea of creating a generic way to synthesize embedding with the temporal forecast.

**Using flow forecast**

There are a couple easy resources to use to get started with flow-forecast. I recorded a brief introduction video back in May and there are also more detailed live-coding sessions you can follow. We also have a basic tutorial notebook that you can use to get a sense of how flow-forecast works on a basic problem. Additionally, there are also a lot more detailed notebooks that we use for our core COVID-19 predictions. Finally, we also have ReadTheDocs available for in depth documentation as well as our official wiki pages.

#machine-learning #pytorch #time-series-analysis #time-series-forecasting #deep-learning #deep learning

1618317562

View more: https://www.inexture.com/services/deep-learning-development/

We at Inexture, strategically work on every project we are associated with. We propose a robust set of AI, ML, and DL consulting services. Our virtuoso team of data scientists and developers meticulously work on every project and add a personalized touch to it. Because we keep our clientele aware of everything being done associated with their project so there’s a sense of transparency being maintained. Leverage our services for your next AI project for end-to-end optimum services.

#deep learning development #deep learning framework #deep learning expert #deep learning ai #deep learning services

1599214260

In any company, there is an embedded desire to predict its future revenue and future sales. The basic recipe is:

*Collect historical data related to previous sales and use it to predict expected sales.*

Photo by Markus Spiske on Unsplash

Over the last ten years, the rise of deep learning as the driving force behind all imaginable machine learning benchmarks revolutionized the field: be it in computer vision, language and so many others. Recently, one could argue that deep learning has restructured the potential future of sales forecasting by allowing models to encode for multiple time series in a single model as well as account for categorical variables. My goal today is:

**To walk you through the basic intuitions behind the main concepts and models for sales forecasting from a time-series perspective and discuss what kind of capabilities recent deep learning models could bring to the table.**

In case you feel like you need to brush up on the basics of sales forecasting and time-series, I recommend these 3 reads:

- Harvard business article on the fundamentals of sales forecasting.
- TDS article by @Marco Peixeiro from on @Towards Data Science (really comprehensive and instructive).
- “Time Series Forecasting Principles with Amazon Forecast”. They do a thorough job of explaining how Sales Forecasting works, as well as what are the challenges and problems one might encounter in the field.

#machine-learning #deep-learning #sales-forecasting #market-research-reports #data-science

1595685600

In this article, we will be discussing an algorithm that helps us analyze past trends and lets us focus on what is to unfold next so this algorithm is time series forecasting.

**What is Time Series Analysis?**

In this analysis, you have one variable -TIME. A time series is a set of observations taken at a specified time usually equal in intervals. It is used to predict future value based on previously observed data points.

**Here some examples where time series is used.**

- Business forecasting
- Understand the past behavior
- Plan future
- Evaluate current accomplishments.

**Components of time series :**

**Trend:**Let’s understand by example, let’s say in a new construction area someone open hardware store now while construction is going on people will buy hardware. but after completing construction buyers of hardware will be reduced. So for some times selling goes high and then low its called uptrend and downtrend.- **Seasonality: **Every year chocolate sell goes high during the end of the year due to Christmas. This same pattern happens every year while in the trend that is not the case. Seasonality is repeating same pattern at same intervals.
**Irregularity:**It is also called noise. When something unusual happens that affects the regularity, for example, there is a natural disaster once in many years lets say it is flooded so people buying medicine more in that period. This what no one predicted and you don’t know how many numbers of sales going to happen.**Cyclic:**It is basically repeating up and down movements so this means it can go more than one year so it doesn’t have fix pattern and it can happen any time and it is much harder to predict.

**Stationarity of a time series:**

A series is said to be “strictly stationary” if the marginal distribution of Y at time t[p(Yt)] is the same as at any other point in time. This implies that the mean, variance, and covariance of the series Yt are time-invariant.

However, a series said to be “weakly stationary” or “covariance stationary” if mean and variance are constant and covariance of two-point Cov(Y1, Y1+k)=Cov(Y2, Y2+k)=const, which depends only on lag k but do not depend on time explicitly.

#machine-learning #time-series-model #machine-learning-ai #time-series-forecasting #time-series-analysis

1596184800

Nowadays more than ever, the world needs to collaborate in achieving clean energy solutions for fighting the Climate Crisis. The Sustainable Development Goals adopted by all United Nations Member States since 2015 aim to ensure access to affordable, reliable, sustainable, and modern clean energy for all by 2030. Clean energies come from renewable resources supplied by nature, such as sun, wind, tides and waves, geothermal heat, among others. Their use range from electricity generation both in large scale and off grid (for rural and remote areas) [1] to heating/cooling systems and transport. However, renewable sources such as sun and wind energy depend on the weather and are more volatile than traditional sources. As many nations in the world increase their share of renewable energy supplies [2,3], it is important to guarantee that these clean energy sources provide a stable supply while replacing fossil fuel based energies.

In the *AI4Impact Deep Learning Datathon 2020*, the topic of clean energies was investigated employing Deep Neural Networks. In the first part of the challenge, the teams worked on predicting energy demand using the Kaggle data set containing over 10 years of hourly energy consumption data from PJM Interconnection LLC. You can check some insights from team Deep Delve on this first part of the project in the video below.

The second part of the challenge was dedicated to forecasting wind energies for maximizing trading profits. Together with solar, wind energy is one of the most prominent renewable energies sources, providing 4.8% of worldwide electricity supply in 2018 [4,5] and being responsible for 15% of the electricity consumed in Europe in 2019 [6]. Wind energy is generated by the mechanical power of wind on turbines that generate electricity. Because wind has variable intensity over time and may stop blowing intermittently, electricity produced by this source is commonly combined with other power sources in order to improve reliability and stability.

The economics of wind energy can be understood by considering the trades among different kinds of energy companies. **Regional or national energy companies** buy pre-determined amounts of energy (measured in kWh) from **energy producers**, which are companies that operate wind farms (in the case of wind energy). As steady supply of energy is expected from the grid, energy producers can be penalized with substantial fines by governments in the case of power outages.

**Energy trade companies** play an important role on *evaluating the risk of shortfall* in energy transactions by helping to _predict the expected energy production _(specially in the case of wind, as a non-steady energy source). Energy traders predict the production of energy (in our case, wind energy) on behalf of the energy producers, taking into consideration two scenarios:

- in the case of a
**shortfall**below the prediction, energy is bought on the spot market to supply the grid (with prices above the average energy price) - in the case of
**excess**over the forecast production, energy producers are not compensated for the extra energy.

In this sense, precise forecasting of energy production plays a fundamental role for the financial performance of wind farms (i.e. wind energy producers).

Wind energy is highly dependent on environmental factors such as wind speed. It is critical for energy traders to successfully predict wind energy production in order to maximize profits. By applying Deep Learning to *financial risk*, we aim to make a wind energy forecast model with a leading time of 18 hours and 1 hour resolution for the _Ile de France _region. The goal is to implement a model that optimizes profits for wind farms, minimizing excess of shortfalls of energy production.

In order to evaluate how well our wind energy model performs, we estimate how much monetary profit the model would achieve when compared to real energy produced. The model is tested using real data over time during the **evaluation period**, following the trading cycle:

- **Warmup: **first 18 hours in which no trades are performed (started on July 22nd 2020, at 00:00 UTC).
- **Trading Period: **produce a wind energy forecast for the next 18 hours (T+18) every hour, including weekends, public holidays, 24/7 (started on July 22nd 2020, at 18:00 UTC).
- Trading ends at the end of the **evaluation period **(July 28th 2020, at 23:00 UTC).

The analysis of financial performance follows the trade methods discussed before, with the following specifications:

- **Price of energy (kWh): **10 euro cents.
**Maximum energy (kWh) sold per day:**maximum forecast of the day.**Energy production excess:**energy producer is not compensated for extra energy generated.**Energy shortage:**buy energy from the spot market (20 euro cents/kWh). The amount of energy available to buy depends on the cash at hand and is only possible when a positive balance is available.**Initial cash reserve:**10,000,000 euro cents for buying energy difference shortage case. This amount is returned at the end of the evaluation.- **Debt (cumulative): **in a case of shortage in which the cash available in hand is less than required to purchase, a fine of 100 euro cents per kWh is issued. This is recorded as a negative value and added to the cash-at-hand.

The goal in this project is to forecast the total wind energy production for the *Ile-de-France* region surrounding Paris. The data for wind energy production comes from the French energy transmission authority Réseau de transport d’électricité (RTE). The data set`energy-ile-de-france `

contains near-real time wind production from the RTE’s online database, following these specifications:

- Energy production (kWh) in time stamps of one 1 hour, starting from January 1st 2017 at 00:00 UTC to present time.
- Wind forecast data for 8 major wind farms in the region (see table below), from 2 different wind models provided by Terra Weather (16 forecasts).
- Dependent variables: wind speed (m/s) and wind direction (degrees North — for example, a wind direction of 45 degrees means the wind blows
**from**the northeast). Forecasts are updated every 6 hours, and are interpolated to an 1 hour time base. All values for wind speed and direction are estimated from models.

Table 1: Information about the 8 major wind farms in the Ile-de-France region, which were used in the project.

Before jumping into the Deep Learning model, we need to first extract insights from the data and work on data preparation. Data extraction and modeling were implemented with *Smojo* programming language by Terra AI within the Autocaffe platform used throughout the competition.

We start our analysis by obtaining descriptive statistics of the wind energy in our data set, as shown in Table 2. We emphasize that the data was extracted directly from Autocaffe, and is already interpolated therefore not containing any missing values.

Next step is to normalize the data, in order to make all features have a similar range of values. This step is important to not bias the network towards features with higher values, as well as to speed up the learning process. All features were standardized to zero mean and unit standard deviation, following the equation:

where Xnorm is the value of the normalized input feature, Xmean is the mean value of X and stddev is the standard deviation.

When dealing with forecasting, it is important to define a metric at which one can measure how well the model predictions are in comparison to the real values obtained (actuals). Another important concept when dealing with time series is *persistence*, which is basically the assumption that the observed values of a quantity in the present are going to be the same in the future (T+X = T+0). The persistence is a trivial forecast model and, therefore, any credible time series model must at least beat the persistence value.

Assuming a Mean Absolute Error (MAE) metric, we identify a persistence of 0.65 for our data set, which is the first benchmark that our model has to overcome.

Table 2: Descriptive statistics for wind energy.

We start our time series analysis with visualizations of the wind energy production over the years using box plots for Figures 1 and 2. In this visualization, a box corresponds to 50% of the data for each year, the horizontal line inside each box corresponds to the median value, the whiskers (range from box) correspond to the maximum and minimum values (excluding outliers) and finally the circles correspond to outliers (1.5 times the box = distance from the box).

#deep-learning #time-series-forecasting #deep learning