Hi,
I successfully obtained anomaly likelihood from an input composed by timestamp + value using the following code:
multiInput.put("timestamp", new DateTime(record.getTimestamp()));
multiInput.put("consumption", record.getxValue());
Inference inference = network.computeImmediate(multiInput);
System.out.println(inference.getAnomalyScore());
Now I would like to perform same thing using a “record” composed in this way: timestamp + value1 + value2 + value3.
I would like obtaining three anomaly likelihoods. How is this possible?
I used getSensorFieldEncodingMap
function as (from the examples):
public static Map<String, Map<String, Object>> getSensorFieldEncodingMap() {
Map<String, Map<String, Object>> fieldEncodings = setupMap(
null,
0, // n
0, // w
0, 0, 0, 0, null, null, null,
"timestamp", "datetime", "DateEncoder");
fieldEncodings = setupMap(
fieldEncodings,
25,
3,
0, 0, 0, 0.1, null, null, null,
"consumption", "float", "RandomDistributedScalarEncoder");
fieldEncodings.get("timestamp").put(Parameters.KEY.DATEFIELD_DOFW.getFieldName(), new Tuple(1, 1.0)); // Day of week
fieldEncodings.get("timestamp").put(Parameters.KEY.DATEFIELD_TOFD.getFieldName(), new Tuple(5, 4.0)); // Time of day
fieldEncodings.get("timestamp").put(Parameters.KEY.DATEFIELD_PATTERN.getFieldName(), "MM/dd/YY HH:mm");
return fieldEncodings;
}
I don’t know how to set the code to perform triple anomaly detection.