Stream Data In¶
Streaming data into the Novelty Detector is simply a matter of making REST API calls. Two endpoints are available:
- Record and Score Observation:
POST /api/v2/model/{modelName}:record - Batch Record and Score Observations:
POST /api/v2/model/{modelName}:batchRecord
The only difference between these two endpoints is how many observations they receive. The single observation endpoint takes a single observation and returns a single result. The bulk endpoint accepts an array of observations and returns a single response containing an array of results. These two endpoints can be used together. Full interactive documentation for these and all other API endpoints is available in each running instance of thatDot Novelty Detector.
Feeding in results requires choosing a value for {namespace} in the POST URL. This value is chosen by the user and will be used as the name of the namespace for the provided observation(s). A namespace is just a group of observations. All observations passed to the same namespace will use previous observations in that namespace as a part of their novelty calculations. Namespaces with different names have absolutely no bearing on each other. Namespace names must be 1-16 characters, start with a letter, and contain only letters and digits.
Observations from Quine Enterprise¶
A Quine Enterprise standing query can stream its results into a Novelty model with the Stream to Novelty output. Quine Enterprise creates and manages one ingest per output on each Novelty instance it points at, named quine-novelty-<id>, and its definition carries a managedBy field identifying the output. Scores go back to Quine Enterprise, which writes them into its graph.
- Leave these ingests to Quine Enterprise. It recreates one that is deleted or stops, and deletes it when the output is removed. Pausing one is left alone.
- Rescores. If the model has rescores enabled, Novelty also sends rescores back to Quine Enterprise. The status of each such ingest reports
rescores.sentToQuineandrescores.dropped; rescores are dropped when no connection has room for them or none is open.