Classification is a machine learning technique that uses known data to define how the new data should be classified into a set of existing categories. For instance,
While classifying a given set of facts, the classifier system performs the following moves:
Mahout uses the Naive Bayes classifier algorithm. It uses two implementations:
Naive Bayes is a modest method for constructing classifiers. It is not a single algorithm for training such classifiers, but a family of algorithms. A Bayes classifier constructs models to classify problem instances. These classifications are made using the available data.
An advantage of naive Bayes is that it only requires a small amount of training data to estimate the parameters necessary for classification.
For some types of probability models, naive Bayes classifiers can be trained very efficiently in a supervised learning setting.
Despite its oversimplified assumptions, naive Bayes classifiers have worked quite well in many complex real-world situations.
The following steps are to be followed to implement Classification:
Generate or download the data to be classified. For example, you can get the20 newsgroups example data from the following link:http://people.csail.mit.edu/jrennie/20Newsgroups/20news-bydate.tar.gz
Create a directory for storing input data. Download the example as shown below.
Create sequence file from the example using seqdirectory utility. The syntax to generate sequence is given below:
Create vector files from sequence files using seq2parse utility. The options ofseq2parse utility are given below:
Train the generated vectors using the trainnb utility. The options to use trainnb utility are given below:
Test the vectors using testnb utility. The options to use testnb utility are given below:
Mahout Related Interview Questions
|Adv Java Interview Questions||Hadoop Interview Questions|
|Apache Pig Interview Questions||Apache Kafka Interview Questions|
|Apache Ant Interview Questions||Apache ZooKeeper Interview Questions|
|MongoDB Interview Questions||Advanced SAS Interview Questions|
|Apache Struts 2 Interview Questions||Base Sas Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.