UNPKG

bigml-nodered

Version:

BigML bindings for Nodered

293 lines (263 loc) 11.6 kB
<style> .bigml_node_label { fill: white; } #palette-BigML .palette_node { color: white; } #red-ui-palette-BigML .red-ui-palette-label { color: white; } </style> <script type="text/javascript"> RED.nodes.registerType('time-series', { category: 'BigML', color: '#454957', defaults: {"objective_field":{"value":""},"default_numeric_value":{"value":"none"},"range":{"value":0},"damped_trend":{"value":null},"tags":{"value":""},"error":{"value":null},"time_range":{"value":"{\n \"start\": 0,\n \"interval\": 12,\n \"interval_unit\": \"hours\"}"},"name":{"value":"timeseries","required":true},"all_numeric_objectives":{"value":false},"reify":{"value":false},"seasonality":{"value":null},"fields":{"value":""},"category":{"value":0},"period":{"value":0},"field_parameters":{"value":""},"webhook":{"value":""},"trend":{"value":null},"description":{"value":""},"horizon":{"value":""}}, inputs:1, outputs:1, inputLabels: 'dataset', outputLabels: 'timeseries', icon: 'icon_timeseries.png', label: function() { return this.name || 'Time Series'; }, labelStyle: function() { return this.name?"bigml_node_label":""; }, }); </script> <script type="text/x-red" data-template-name="time-series"> <div class="form-row"> <label for="node-input-name"> <i class="icon-tag"></i> Name </label> <input type=text id=node-input-name value='timeseries'> </div> <div class="form-row"> <label for="node-input-description"> <i class="icon-tag"></i> Description </label> <input type=text id=node-input-description > </div> <div class="form-row"> <label for="node-input-all_numeric_objectives"> <i class="icon-tag"></i> All numeric objectives </label> <input type=checkbox id=node-input-all_numeric_objectives value='false'> </div> <div class="form-row"> <label for="node-input-damped_trend"> <i class="icon-tag"></i> Damped trend </label> <input type=checkbox id=node-input-damped_trend > </div> <div class="form-row"> <label for="node-input-default_numeric_value"> <i class="icon-tag"></i> Default numeric value </label> <select id=node-input-default_numeric_value value='none'><option value=none>None</option> <option value=mean>Mean</option> <option value=median>Median</option> <option value=minimum>Minimum</option> <option value=maximum>Maximum</option> <option value=zero>Zero</option></select> </div> <div class="form-row"> <label for="node-input-error"> <i class="icon-tag"></i> Error </label> <select id=node-input-error ><option value=1>Ets multiplicative</option></select> </div> <div class="form-row"> <label for="node-input-field_parameters"> <i class="icon-tag"></i> Field parameters </label> <input type=text id=node-input-field_parameters placeholder='{ "000001": { "seasonality": 2, "period": 24}, "000003": { "error": 1, "time_range": { "start": 0, "interval": 12, "interval_unit": "hours" }}}' > </div> <div class="form-row"> <label for="node-input-fields"> <i class="icon-tag"></i> Fields </label> <input type=text id=node-input-fields placeholder='{ "000000": { "name": "length_1", "label": "Length 1", "description": "Length 1 is sepal length"}, "000002": {"name": "length_2"}}' > </div> <div class="form-row"> <label for="node-input-horizon"> <i class="icon-tag"></i> Horizon </label> <input type=text id=node-input-horizon placeholder='{ "000001": {"name": "length_1"}, "000003": {"name": "length_2"} }' > </div> <div class="form-row"> <label for="node-input-objective_field"> <i class="icon-tag"></i> Objective field </label> <input type=text id=node-input-objective_field placeholder='{"id": "000003"}' > </div> <div class="form-row"> <label for="node-input-period"> <i class="icon-tag"></i> Period </label> <input type=number id=node-input-period value='0'> </div> <div class="form-row"> <label for="node-input-range"> <i class="icon-tag"></i> Range </label> <input type=number id=node-input-range value='0'> </div> <div class="form-row"> <label for="node-input-seasonality"> <i class="icon-tag"></i> Seasonality </label> <select id=node-input-seasonality ><option value=0>None</option> <option value=1>Additive</option> <option value=2>Multiplicative</option></select> </div> <div class="form-row"> <label for="node-input-time_range"> <i class="icon-tag"></i> Time range </label> <input type=text id=node-input-time_range value='{ "start": 0, "interval": 12, "interval_unit": "hours"}'> </div> <div class="form-row"> <label for="node-input-trend"> <i class="icon-tag"></i> Trend </label> <select id=node-input-trend ><option value=0>None</option> <option value=1>Additive</option> <option value=2>Multiplicative</option></select> </div> <div class="form-row"> <label for="node-input-tags"> <i class="icon-tag"></i> Tags </label> <input type=text id=node-input-tags placeholder='["A tag", "Another Tag"]' > </div> <div class="form-row"> <label for="node-input-category"> <i class="icon-tag"></i> Category </label> <select id=node-input-category value='0'><option value=5>5</option> <option value=Healthcare>Healthcare</option></select> </div> <div class="form-row"> <label for="node-input-webhook"> <i class="icon-tag"></i> Webhook </label> <input type=text id=node-input-webhook > </div> <div class="form-row"> <label for="node-input-reify"> <i class="icon-tag"></i> Reify </label> <input type=checkbox id=node-input-reify value='false'> </div> </script> <script type="text/html" data-help-name="time-series"> <p>Create BigML Time Series.</p> <h3>Details</h3> <p>This node support all inputs defined in <a href='https://bigml.com/api/time-seriess' target=blank>BigML REST API</a>. By default, it expects to receive a <code>dataset</code> input (see below for more details) and it will output the <code>timeseries</code> field of the created resource. </p> <p>However, you can override default inputs and outputs by defining the node port label so they match the desired input or output as specified below.</p> <p>Only when the node is used with the <code>reify</code> option enabled, it will actually hit BigML and do its work there. This generally means some resources will be created and sent through as node outputs.</p> <p>When the node is used with the <code>reify</code>option disabled, it will generate WhizzML code and send it through to the next node in the flow without hitting BigML. All WhizzML code created by this node (and others) when not in <code>reify</code> mode is accumulated and executed as a single WhizzML script by the first downstream <code>reified</code> node.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>Name <span class="property-type">:text</span> </dt> <dd>A name for this node.</dd> <dt>Description <span class="property-type">:text</span> </dt> <dd></dd> <dt>All numeric objectives <span class="property-type">:boolean</span> </dt> <dd>Whether to include all numeric fields in the input dataset in the objective fields list.</dd> <dt>Damped trend <span class="property-type">:boolean</span> </dt> <dd>Whether to use a damped trend when trend is either 1 (additive) or 2 (multiplicative) to find the best models. If trend is 0 (none), then only damped_trend=false models will be considered. If ommitted, both damped and non-damped trends will be tried and the best models returned.</dd> <dt>Default numeric value <span class="property-type">:select</span> </dt> <dd>Substitute missing numeric values across all the numeric fields in the dataset.</dd> <dt>Error <span class="property-type">:select</span> </dt> <dd>Any of the following values to specify types of ETS models.</dd> <dt>Field parameters <span class="property-type">:text</span> </dt> <dd>Field-specific ETS parameters used to optionally override the top-level parameters for a specific objective field.</dd> <dt>Fields <span class="property-type">:text</span> </dt> <dd>Updates the names, labels, and descriptions of the fields in the dataset.</dd> <dt>Horizon <span class="property-type">:text</span> </dt> <dd>This can be used to change the names of the fields in the timeseries with respect to the original names in the dataset or to tell BigML that certain fields should be preferred.</dd> <dt>Objective field <span class="property-type">:text</span> </dt> <dd>Specifies the default objective field.</dd> <dt>Period <span class="property-type">:number</span> </dt> <dd>The number of data points per period.</dd> <dt>Range <span class="property-type">:number</span> </dt> <dd>The range of successive instances to build the model.</dd> <dt>Seasonality <span class="property-type">:select</span> </dt> <dd>Any of the following values to specify types of ETS models.</dd> <dt>Time range <span class="property-type">:text</span> </dt> <dd></dd> <dt>Trend <span class="property-type">:select</span> </dt> <dd>Any of the following values to specify types of ETS models.</dd> <dt>Tags <span class="property-type">:text</span> </dt> <dd>A list of tags to identify the resource.</dd> <dt>Category <span class="property-type">:select</span> </dt> <dd></dd> <dt>Webhook <span class="property-type">:text</span> </dt> <dd>A webhook url and an optional secret phrase.</dd> <dt>Reify <span class="property-type">:boolean</span> </dt> <dd>Execute the WhizzML code generated at this (and upstream) node(s). You need to enable this option if you want to get a result from your flow that you can pass to a non-BigML node.</dd> </dl> <h3>Outputs</h3> <ol class="node-ports"> <dl class="message-properties"> <dt>payload <span class="property-type">string or JSON</span></dt> <dd>the <code>timeseries</code> of the created BigML entity.</dd> <dt>whizzml <span class="property-type">string</dt> <dd>(only for <code>reified</code> nodes) the generated WhizzML code which is fed into the next node. <dt>wzStack <span class="property-type">object</dt> <dd>(only for <code>reified</code> nodes) private. </dl> </ol> </script>