Naive Bayes  0.0.1
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
DataSet Class Reference

Public Member Functions

 DataSet (Attribute[] attrs, String[] labels)
 
void addInstance (String[] values, String label)
 

Detailed Description

DataSet Class. Parse a file into a data set, used both for training set and test set.

The attribute IS order in each dataset inside, but not required to be in the same order in different data set.

To find the value of an arbitary attribute, the best way is to use insts.attributes(trainSet.attri.indexOf("SomeAttribute")) WhatTF???????

Constructor & Destructor Documentation

DataSet.DataSet ( Attribute[]  attrs,
String[]  labels 
)
inline

Constructor of DataSet

Parameters
attrsAttribute array of this data set to use
labelsString arrray of the labels

Member Function Documentation

void DataSet.addInstance ( String[]  values,
String  label 
)
inline

Add an instance into the data set

Parameters
valuesValue of each attribute, in the order of attributes field
labelLabel of this instance

The documentation for this class was generated from the following file: