Database Reference
In-Depth Information
Warehouse Process
Warehouse Operation
Management
Transformation
OLAP
Data
Mining
Business
Nomenclature
Information
Visualization
Analysis
Relational
Record
Multidimensional
XML
Resource
Business
Information
Data
Types
Software
Deployment
Key
Indexes
Expres
sions
Type
Mapping
Foundation
Core
Behavioral
Relationships
Instance
Object
Fig. 12.6 CWM packages used in MiningVector
Example 12.5 Example of a mining vector for the meal basis of the previous
section:
// Create and fill value vector:
double[] mealValues ¼ new double[3];
mealValues[0] ¼ 33000; // calory number
mealValues[1] ¼ 5; // 5 guests
mealValues[2] ¼ cutlery.getKey( new Category("spoon") );
// spoon
// Create mining vector object with values:
MiningVector mealVector ¼ new MiningVector( mealValues );
// Add 'meal' metadata to mining vector:
mealVector.setMetaData( meal );
// Show (double) values of mining vector:
for (int i ¼ 0; i < mealVector.getValues().length; i++)
System.out.println("value["+i+"]
¼
" + mealVector.
getValue(i));
For sparse vectors, i.e., vectors which mainly contain zero coordinate values, the
class MiningSparseVector could be used which extends MiningVector . It stores
sparse vectors more efficiently by means of an additional array of indexes of the
nonzero coordinate values. For binary sparse vectors, i.e., sparse vectors where the
nonzero values are always one, the class MiningBinarySparseVector should be
utilized which in turn extends MiningSparseVector .
12.1.2.3 The Data Matrix: MiningInputStream
So far we have defined the class MiningVector that models a data vector. In order to
model a whole data matrix, we use the abstract MiningInputStream class. MiningIn-
putStream is a virtual collection of mining vectors. Like each of its mining vectors,
MiningInputStream contains a reference metaData to the basis of the attribute space.
 
Search WWH ::




Custom Search