Monday, March 9, 2020

Building Dynamic UI Form with Oracle JET

Dynamic form is a common requirement when building more advanced UIs. With Oracle JET you have all the tools available to build dynamic form. One of the examples of dynamic form requirements - report parameter capture screens. Building fixed forms to capture parameters for each report would be an overkill. A smarter approach is to build one dynamic form, which would handle a set of different UI components and render based on metadata received from the service.

Dynamic form example:


When values are changed, we can capture all changes while submitting the form - value printed in the log:


In the heart of dynamic form logic, we are using JET bind for each tag, it renders form elements from metadata:


Each element is checked and based on the type - UI field is rendered through JET if tag. Input field properties are fetched from metadata.

Example of metadata structure - array. It is important to use Knockout observable for value property. This will allow capturing user input. When we submit the form, we can iterate through the array and read value property:


Sample code available on GitHub.

Thursday, February 20, 2020

Handy TensorFlow.js API for Client-Side ML Development

Let’s look into TensorFlow.js API for training data handling, training execution, and inference. TensorFlow.js is awesome because it brings Machine Learning into the hands of Web developers, this provides mutual benefit. Machine Learning field gets more developers and supporters, while Web development becomes more powerful with the support of Machine Learning.


Read more - Handy TensorFlow.js API for Client-Side ML Development.

Thursday, January 23, 2020

Time-Series Prediction Beyond Test Data

I was working on the assignment to build a large scale time-series prediction solution. I end up using a combination of approaches in the single solution — Prophet, ARIMA and LSTM Neural Network (running on top of Keras/TensorFlow). With Prophet (Serving Prophet Model with Flask — Predicting Future) and ARIMA it is straightforward to calculate a prediction for future dates, both provide a function to return prediction for a given future horizon. The same is not obvious with LSTM, if you are new — this will require a significant amount of time to research how to forecast true future dates (most of the examples are showing how to predict against test dataset only).

I found one good example though which I was following and it helped me to solve my task — A Quick Example of Time-Series Prediction Using Long Short-Term Memory (LSTM) Networks. In this post, I will show how to predict shampoo sales monthly data, mainly based on the code from the above example.

Read more - Time-Series Prediction Beyond Test Data.