Database Reference
In-Depth Information
inputMetaData.getMiningAttribute( modelTargetAttribute.
getName() );
// Classification:
int nall ¼ 0;
int nwrong ¼ 0;
while ( inputData.next() ) {
// Make prediction:
MiningVector vector ¼ inputData.read();
double predicted ¼ model.applyModelFunction(vector);
Category predCateg ¼ modelTargetAttribute.getCategory
(predicted);
double real ¼ vector.getValue(inputTargetAttribute);
Category realCateg ¼ inputTargetAttribute.getCategory
(real);
// Compare;
if (! predCateg.equals(tarCateg) )
nwrong ¼ nwrong + 1;
nall ¼ nall + 1;
};
¼
System.out.println("classification rate
" + (100.0 -
wrong*100.0/nall) );
12.1.4 The Mathematics Package
XELOPES is equipped with a useful package Math of basic mathematical
operations. It is only a utility package for the XELOPES analysis algorithms
and does not claim to be a complete mathematical library. Nevertheless, espe-
cially for numerical linear algebra, it contains some remarkable implementations
of general interest.
The Math package contains the following subpackages:
Algebra : vectors, matrices, tensors, and important solver and factorizations
Analysis : functions, derivatives, etc.
Approximation: basic approximation methods
Optimization: basic optimization methods
Tools: useful tools
In the following, we want to delve into the package Algebra . It has three
subpackages:
Search WWH ::




Custom Search