Sample data

The data in the cf_etf_hist_price index is time series data; however, it is not continuous. The data is only for trading days. Before we can practice our machine learning task, we must provide another set of data that will fill in the non-trading days using the corresponding price data from the previous trading day. In our GitHub repository (https://github.com/PacktPublishing/Mastering-Elasticsearch-7.0/tree/master/Chapter16), three files can be downloaded: cf_rfem_hist_price_bulk_index.sh, cf_rfem_hist_price_bulk.json, and cf_rfem_hist_price_mappings.json. It contains the RFEM ETF data symbol with trading days and non-trading days. Go to the download directory and run the following command to index data to the new cf_rfem_hist_price index:

$./cf_rfem_hist_price_bulk_index.sh

After the command is run, we can go back to the Index Management page in Kibana. Click on the Reload indices button and we'll find that the new index, cf_rfem_hist_price, is shown (see the following screenshot). There are 90 documents, which include data from 61 trading days and 29 non-trading days:

For our convenience, to demonstrate machine learning jobs, let's use the Kibana user interface and show the single-metric job.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.238.171