Ingest the linked csv files above into Elastic using the Kibana Data Visualizer. You will find the Data Visualizer in the Machine Learning section. Ingest into the indices calls
and customers
.
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time,airline,responsetime,sourcetype | |
1403481600000,AAL,132.2046,farequote | |
1403481600000,JZA,990.4628,farequote | |
1403481600000,JBU,877.5927,farequote | |
1403481600000,KLM,1355.4812,farequote | |
1403481600000,NKS,9991.3981,farequote | |
1403481600000,TRS,412.1948,farequote | |
1403481600000,DAL,401.4948,farequote | |
1403481600000,FFT,181.5529,farequote | |
1403481600000,SWA,160.214,farequote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -XPUT -u 'elastic:password' -H 'Content-Type: application/json' 'http://localhost:9200/_ml/inference/density_model?pretty' -d ' | |
{ | |
"input": { | |
"field_names": [ | |
"key_metric"] | |
}, | |
"description": "test model for regression", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
def add_if_exists(d: dict, k: str, v) -> dict: | |
""" | |
:param v: | |
:param k: | |
:type d: object | |
""" | |
if v is not None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"size": 1, | |
"aggs": { | |
"session": { | |
"composite": { | |
"size": 10, | |
"sources": [ | |
{ | |
"session": { | |
"terms": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch import Elasticsearch | |
from eland.ml.pytorch import PyTorchModel | |
from eland.ml.pytorch.nlp_ml_model import ( | |
TextExpansionInferenceOptions, | |
NlpTrainedModelConfig, | |
TrainedModelInput, | |
NlpBertTokenizationConfig | |
) |