官术网_书友最值得收藏!

The estimator algorithm

An estimator is another algorithm that can produce a transformer by fitting on a DataFrame. For instance, a learning algorithm can train on a dataset and produce a model. This produces a transformer by learning an algorithm. It uses the fit() method to produce a transformer. For instance, the Na?ve Bayes learning algorithm is an estimator that calls the fit() method and trains a Na?ve Bayes model, which is a transformer. We will use the following code to train the model:

import org.apache.spark.ml.classification.NaiveBayes

val nb = new NaiveBayes().setModelType("multinomial")

val model = nb.fit(Training_DataDF)
主站蜘蛛池模板: 沧州市| 邛崃市| 嵊泗县| 牡丹江市| 元谋县| 神池县| 拜泉县| 海门市| 铁岭县| 岳阳县| 临猗县| 昭平县| 集贤县| 东光县| 桦甸市| 塔河县| 江山市| 洪江市| 普定县| 桐梓县| 龙泉市| 长治市| 阿克苏市| 密云县| 闸北区| 齐河县| 中方县| 祁门县| 榆中县| 乡宁县| 曲沃县| 荥阳市| 阿合奇县| 宜君县| 旌德县| 武宁县| 东明县| 视频| 卫辉市| 盖州市| 甘肃省|