Back to Influxdb

naiveBayesClassifier.naiveBayes() function

content/flux/v0/stdlib/contrib/RohanSreerama5/naiveBayesClassifier/naivebayes.md

latest1.4 KB
Original Source
<!------------------------------------------------------------------------------ IMPORTANT: This page was generated from comments in the Flux source code. Any edits made directly to this page will be overwritten the next time the documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: https://github.com/influxdata/flux/blob/master/stdlib/contrib/RohanSreerama5/naiveBayesClassifier/naiveBayesClassifier.flux#L30-L124 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md ------------------------------------------------------------------------------->

naiveBayesClassifier.naiveBayes() performs a naive Bayes classification.

Function type signature
js
(
    <-tables: stream[{C with _time: time, _measurement: E, _field: D}],
    myClass: string,
    myField: A,
    myMeasurement: B,
) => stream[F] where A: Equatable, B: Equatable, D: Equatable, E: Equatable, F: Record

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

myMeasurement

({{< req >}}) Measurement to use as training data.

myField

({{< req >}}) Field to use as training data.

myClass

({{< req >}}) Class to classify against.

tables

Input data. Default is piped-forward data (<-).