Experiment WEKA
Experiment WEKA
1. Download the software as your requirements from the below given link.
http://www.cs.waikato.ac.nz/ml/weka/downloading.html
2. The Java is mandatory for installation of WEKA so if you have already Java on your
machine then download only WEKA else download the software with JVM.
3. Then open the file location and double click on the file
4. Click Next
1
5. Click I Agree.
1
6. As your requirement do the necessary changes of settings and click Next. Full and
Associate files are the recommended settings.
1
8. If you want a shortcut then check the box and click Install.
9. The Installation will start wait for a while it will finish within a minute.
1
10. After complete installation click on Next.
11. Hurray !!!!!!! That’s all click on the Finish and take a shovel and start Mining. Best of
Luck.
1
This is the GUI you get when started. You have 4 options Explorer, Experimenter,
KnowledgeFlow and Simple CLI.
B.(ii)Understand the features of WEKA tool kit such as Explorer, Knowledge flow interface,
Experimenter, command-line interface.
Ans: WEKA
The Weka GUI Chooser (class weka.gui.GUIChooser) provides a starting point for
launching Weka’s main GUI applications and supporting tools. If one prefers a MDI (“multiple
document interface”) appearance, then this is provided by an alternative launcher called “Main”
1
(class weka.gui.Main). The GUI Chooser consists of four buttons—one for each of the four major Weka
applications—and four menus.
● Explorer An environment for exploring data with WEKA (the rest of this Documentation
deals with this application in more detail).
● Experimenter An environment for performing experiments and conducting statistical tests
between learning schemes.
● Knowledge Flow This environment supports essentially the same functions as the Explorer but
with a drag-and-drop interface. One advantage is that it supports incremental learning.
● SimpleCLI Provides a simple command-line interface that allows direct execution of WEKA
commands for operating systems that do not provide their own command line interface.
1
1. Explorer
Section Tabs
At the very top of the window, just below the title bar, is a row of tabs. When the Explorer
is first started only the first tab is active; the others are grayed out. This is because it is
necessary to open (and potentially pre-process) a data set before starting to explore the data.
The tabs are as follows:
Once the tabs are active, clicking on them flicks between different screens, on which the
respective actions can be performed. The bottom area of the window (including the status box, the
log button, and the Weka bird) stays visible regardless of which section you are in. The Explorer
can be easily extended with custom tabs. The Wiki article “Adding tabs in the Explorer”
explains this in detail.
2.Weka Experimenter:-
The Weka Experiment Environment enables the user to create, run, modify, and analyze
experiments in a more convenient manner than is possible when processing the schemes
individually. For example, the user can create an experiment that runs several schemes against a
series of datasets and then analyze the results to determine if one of the schemes is (statistically)
better than the other schemes.
1
The Experiment Environment can be run from the command line using the Simple CLI. For
example, the following commands could be typed into the CLI to run the OneR scheme on the Iris
dataset using a basic train and test process. (Note that the commands would be typed on one line
into the CLI.) While commands can be typed directly into the CLI, this technique is not particularly
convenient and the experiments are not easy to modify. The Experimenter comes in two flavors’,
either with a simple interface that provides most of the functionality one needs for experiments, or
with an interface with full access to the Experimenter’s capabilities. You can
choose between those two with the Experiment Configuration Mode radio buttons:
● Simple
● Advanced
Both setups allow you to setup standard experiments, that are run locally on a single machine,
or remote experiments, which are distributed between several hosts. The distribution of
experiments cuts down the time the experiments will take until completion, but on the other hand
the setup takes more time. The next section covers the standard experiments (both, simple and
advanced), followed by the remote experiments and finally the analyzing of the results.
1
3. Knowledge Flow
Introduction
The Knowledge Flow provides an alternative to the Explorer as a graphical front end to
WEKA’s core algorithms.
The Knowledge Flow presents a data-flow inspired interface to WEKA. The user can select
WEKA components from a palette, place them on a layout canvas and connect them together in
order to form a knowledge flow for processing and analyzing data. At present, all of WEKA’s
classifiers, filters, clusterers, associators, loaders and savers are available in the Knowledge
Flow along with some extra tools.
The Knowledge Flow can handle data either incrementally or in batches (the Explorer handles
batch data only). Of course learning from data incremen- tally requires a classifier that can
1
be updated on an instance by instance basis. Currently in WEKA there are ten classifiers that can handle
data incrementally.
The Simple CLI provides full access to all Weka classes, i.e., classifiers, filters, clusterers,
etc., but without the hassle of the CLASSPATH (it facilitates the one, with which Weka was
started). It offers a simple Weka shell with separated command line and output.
1
Commands
● Break
Stops the current thread, e.g., a running classifier, in a friendly manner kill stops the current
thread in an unfriendly fashion.
● Cls
Clears the output area
Lists the capabilities of the specified class, e.g., for a classifier with its.
● option:
● exit
● help [<command>]
1
Invocation
In order to invoke a Weka class, one has only to prefix the class with ”java”. This
command tells the Simple CLI to load a class and execute it with any given parameters. E.g., the
J48 classifier can be invoked on the iris dataset with the following command:
Command redirection
Note: the > must be preceded and followed by a space, otherwise it is not recognized as redirection,
but part of another parameter.
Command completion
Commands starting with java support completion for classnames and filenames via Tab
(Alt+BackSpace deletes parts of the command again). In case that there are several matches, Weka
lists all possible matches.
weka.classifiers
weka.clusterers
● Classname completion
1
java weka.classifiers.meta.A<Tab> lists the following classes
Possible matches:
weka.classifiers.meta.AdaBoostM1
weka.classifiers.meta.AdditiveRegression
weka.classifiers.meta.AttributeSelectedClassifier
● Filename Completion
In order for Weka to determine whether a the string under the cursor is a classname or a
filename, filenames need to be absolute (Unix/Linx: /some/path/file;Windows: C:\Some\Path\file)
or relative and starting with a dot (Unix/Linux:./some/other/path/file; Windows:
.\Some\Other\Path\file).
1
1