bigml-nodered
Version:
BigML bindings for Nodered
289 lines (259 loc) • 11 kB
HTML
<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('evaluation', {
category: 'BigML',
color: '#454957',
defaults: {"resource":{"value":null},"range":{"value":0},"dataset":{"value":""},"replacement":{"value":false},"fields_map":{"value":""},"tags":{"value":""},"name":{"value":"evaluation","required":true},"reify":{"value":false},"seed":{"value":""},"excluded_fields":{"value":""},"missing_strategy":{"value":0},"operating_kind":{"value":null},"category":{"value":0},"webhook":{"value":""},"operating_point":{"value":""},"out_of_bag":{"value":false},"description":{"value":""},"sample_rate":{"value":1.0},"input_fields":{"value":""}},
inputs:1,
outputs:1,
inputLabels: '[test-dataset,model]',
outputLabels: 'evaluation',
icon: 'icon_evaluation.png',
label: function() {
return this.name || 'Evaluation';
},
labelStyle: function() {
return this.name?"bigml_node_label":"";
},
});
</script>
<script type="text/x-red" data-template-name="evaluation">
<div class="form-row">
<label for="node-input-name">
<i class="icon-tag"></i> Name
</label>
<input type=text id=node-input-name value='evaluation'>
</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-resource">
<i class="icon-tag"></i> Resource
</label>
<input type=text id=node-input-resource >
</div>
<div class="form-row">
<label for="node-input-dataset">
<i class="icon-tag"></i> Dataset
</label>
<input type=text id=node-input-dataset placeholder='dataset/4f66a80803ce8940c5000006' >
</div>
<div class="form-row">
<label for="node-input-excluded_fields">
<i class="icon-tag"></i> Excluded fields
</label>
<input type=text id=node-input-excluded_fields placeholder='["000000", "000002"]' >
</div>
<div class="form-row">
<label for="node-input-fields_map">
<i class="icon-tag"></i> Fields map
</label>
<input type=text id=node-input-fields_map placeholder='{"000000":"00000a", "000001":"000002", "000002":"000001", "000003":"000020", "000004":"000004"}' >
</div>
<div class="form-row">
<label for="node-input-input_fields">
<i class="icon-tag"></i> Input fields
</label>
<input type=text id=node-input-input_fields placeholder='["000001", "000003"]' >
</div>
<div class="form-row">
<label for="node-input-missing_strategy">
<i class="icon-tag"></i> Missing strategy
</label>
<select id=node-input-missing_strategy value='0'><option value=0>Last prediction</option> <option value=1>Proportional</option></select>
</div>
<div class="form-row">
<label for="node-input-operating_kind">
<i class="icon-tag"></i> Operating kind
</label>
<select id=node-input-operating_kind ><option value=confidence>Confidence</option> <option value=probability>Probability</option> <option value=votes>Votes</option></select>
</div>
<div class="form-row">
<label for="node-input-operating_point">
<i class="icon-tag"></i> Operating point
</label>
<input type=text id=node-input-operating_point placeholder='{ "kind": "probability",
"positive_class": "Iris-setosa",
"threshold": 0.42 }' >
</div>
<div class="form-row">
<label for="node-input-out_of_bag">
<i class="icon-tag"></i> Out of bag
</label>
<input type=checkbox id=node-input-out_of_bag value='false'>
</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-replacement">
<i class="icon-tag"></i> Replacement
</label>
<input type=checkbox id=node-input-replacement value='false'>
</div>
<div class="form-row">
<label for="node-input-sample_rate">
<i class="icon-tag"></i> Sample rate
</label>
<input type=number step=any id=node-input-sample_rate value='1.0'>
</div>
<div class="form-row">
<label for="node-input-seed">
<i class="icon-tag"></i> Seed
</label>
<input type=text id=node-input-seed >
</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="evaluation">
<p>Create BigML Evaluation.</p>
<h3>Details</h3>
<p>This node support all inputs defined in
<a href='https://bigml.com/api/evaluations' target=blank>BigML REST
API</a>. By default, it expects to receive
a <code>[test-dataset,model]</code> input (see below for more details) and
it will output the <code>evaluation</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>Resource
<span class="property-type">:text</span>
</dt>
<dd>The BigML model (model, ensemble, logistic regression, deepnet, fusion, or timeseries) to evaluate.</dd>
<dt>Dataset
<span class="property-type">:text</span>
</dt>
<dd>A valid dataset/id</dd>
<dt>Excluded fields
<span class="property-type">:text</span>
</dt>
<dd>Specifies the fields that won't be included in the dataset.</dd>
<dt>Fields map
<span class="property-type">:text</span>
</dt>
<dd>A dictionary of identifiers of the fields to use from the model under test mapped to their corresponding identifiers in the input dataset.</dd>
<dt>Input fields
<span class="property-type">:text</span>
</dt>
<dd>Specifies the fields in the dataset to be considered to create the evaluation.</dd>
<dt>Missing strategy
<span class="property-type">:select</span>
</dt>
<dd>Specifies the method that should be used for the model, ensemble or fusion when a missing split is found.</dd>
<dt>Operating kind
<span class="property-type">:select</span>
</dt>
<dd>The operating threshold kind corresponding to the confusion matrix to perform the evaluation.</dd>
<dt>Operating point
<span class="property-type">:text</span>
</dt>
<dd>The specification of an operating point for classification problems.</dd>
<dt>Out of bag
<span class="property-type">:boolean</span>
</dt>
<dd>Setting this parameter to true will return a sequence of the out-of-bag instances instead of the sampled instances.</dd>
<dt>Range
<span class="property-type">:number</span>
</dt>
<dd>The range of successive instances to build the model.</dd>
<dt>Replacement
<span class="property-type">:boolean</span>
</dt>
<dd>Whether sampling should be performed with or without replacement.</dd>
<dt>Sample rate
<span class="property-type">:float</span>
</dt>
<dd>A real number between 0 and 1 specifying the sample rate.</dd>
<dt>Seed
<span class="property-type">:text</span>
</dt>
<dd>A string to be hashed to generate deterministic samples.</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>evaluation</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>