--- title: naiveBayesClassifier.naiveBayes() function description: > `naiveBayesClassifier.naiveBayes()` performs a naive Bayes classification. menu: flux_v0_ref: name: naiveBayesClassifier.naiveBayes parent: contrib/RohanSreerama5/naiveBayesClassifier identifier: contrib/RohanSreerama5/naiveBayesClassifier/naiveBayes weight: 301 flux/v0/tags: [transformations] --- `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](/flux/v0/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 (`<-`).