public class XNV extends RandomizableClassifier implements TechnicalInformationHandler
@inproceedings{McWilliams2013,
author = {Brian McWilliams and David Balduzzi and Joachim M. Buhmann},
booktitle = {Proc 27th Annual Conference on Neural Information Processing Systems},
pages = {440--448},
title = {Correlated random features for fast semi-supervised learning},
year = {2013},
URL = {http://papers.nips.cc/paper/5000-correlated-random-features-for-fast-semi-supervised-learning.pdf}
}
-S <num> Random number seed. (default 1)
-G The regularization parameter gamma.
-M The sample size for the Nystroem method.
-K <kernel specification> The kernel function to use.
-S If true, standardization will not be performed.
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-num-decimal-places The number of decimal places for the output of numbers in the model (default 2).
-batch-size The desired batch size for batch prediction (default 100).
| Modifier and Type | Field and Description |
|---|---|
protected no.uib.cipr.matrix.Matrix |
m_B1
The CCA projection
|
protected boolean |
m_doNotStandardize
Whether to apply standardization or not.
|
protected double |
m_Gamma
The regularization parameter.
|
protected Kernel |
m_Kernel
The kernel function to use.
|
protected int |
m_M
The sample size for each Nystroem filter
|
protected ReplaceMissingValues |
m_Missing
The filter used to get rid of missing values.
|
protected Nystroem |
m_N1
The two Nystroem filters to be used
|
protected Nystroem |
m_N2 |
protected NominalToBinary |
m_NominalToBinary
The filter used to make attributes numeric.
|
protected int |
m_numLabeled
Stores the number of labeled instances found in the training set.
|
protected Standardize |
m_Standardize
The filter used for standardizing the data
|
protected no.uib.cipr.matrix.Matrix |
m_wCCA
The coefficients from CCA regression
|
protected double |
m_x0 |
protected double |
m_x1
Coefficients used compensate for standardization of the target
|
m_SeedBATCH_SIZE_DEFAULT, m_BatchSize, m_Debug, m_DoNotCheckCapabilities, m_numDecimalPlaces, NUM_DECIMAL_PLACES_DEFAULT| Constructor and Description |
|---|
XNV() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances data)
Builds the XNV regressor.
|
static no.uib.cipr.matrix.EVD |
CCA(no.uib.cipr.matrix.Matrix X1,
no.uib.cipr.matrix.Matrix X2)
Performs Canonical Correlation Analysis (CCA).
|
double[] |
distributionForInstance(Instance inst)
Returns prediction for an instance.
|
double[][] |
distributionsForInstances(Instances insts)
Returns predictions for a whole set of instances.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
boolean |
getDoNotStandardize() |
double |
getGamma() |
Kernel |
getKernel() |
int |
getM() |
static no.uib.cipr.matrix.DenseMatrix |
getMatrix(Instances data,
boolean center,
boolean transpose)
Turns the given set of instances into a data matrix.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns a reference to the algorithm implemented by this class.
|
java.lang.String |
globalInfo()
Provides information regarding this class.
|
boolean |
implementsMoreEfficientBatchPrediction()
This class implements efficient batch prediction.
|
static no.uib.cipr.matrix.Matrix |
inverse(no.uib.cipr.matrix.Matrix M)
Returns the inverse of the given matrix.
|
static void |
main(java.lang.String[] argv)
Generates an XNV predictor.
|
void |
setDoNotStandardize(boolean v) |
void |
setGamma(double v) |
void |
setKernel(Kernel kernel) |
void |
setM(int v) |
java.lang.String |
toString()
Outputs the coefficients of the classifier.
|
getOptions, getSeed, listOptions, seedTipText, setOptions, setSeedbatchSizeTipText, classifyInstance, debugTipText, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacesprotected Nystroem m_N1
protected Nystroem m_N2
protected no.uib.cipr.matrix.Matrix m_wCCA
protected no.uib.cipr.matrix.Matrix m_B1
protected Standardize m_Standardize
protected NominalToBinary m_NominalToBinary
protected ReplaceMissingValues m_Missing
protected double m_x1
protected double m_x0
protected int m_M
protected Kernel m_Kernel
protected double m_Gamma
protected int m_numLabeled
protected boolean m_doNotStandardize
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandler@OptionMetadata(displayName="Regularization parameter gamma", description="The regularization parameter gamma.", displayOrder=1, commandLineParamName="G", commandLineParamSynopsis="-G") public double getGamma()
public void setGamma(double v)
@OptionMetadata(displayName="Sample size for Nystroem method", description="The sample size for the Nystroem method.", displayOrder=2, commandLineParamName="M", commandLineParamSynopsis="-M") public int getM()
public void setM(int v)
@OptionMetadata(displayName="Kernel function", description="The kernel function to use.", displayOrder=3, commandLineParamName="K", commandLineParamSynopsis="-K <kernel specification>") public void setKernel(Kernel kernel)
public Kernel getKernel()
@OptionMetadata(displayName="Do not apply standardization", description="If true, standardization will not be performed.", displayOrder=4, commandLineParamName="S", commandLineParamSynopsis="-S") public boolean getDoNotStandardize()
public void setDoNotStandardize(boolean v)
public static no.uib.cipr.matrix.DenseMatrix getMatrix(Instances data, boolean center, boolean transpose)
data - set of instancescenter - whether to center the matrixtranspose - whether to transpose the matrixpublic static no.uib.cipr.matrix.Matrix inverse(no.uib.cipr.matrix.Matrix M)
throws java.lang.Exception
M - the matrix to invertjava.lang.Exceptionpublic static no.uib.cipr.matrix.EVD CCA(no.uib.cipr.matrix.Matrix X1,
no.uib.cipr.matrix.Matrix X2)
throws java.lang.Exception
X1 - the first data matrixX2 - the second data matrixjava.lang.Exceptionpublic void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier in interface Classifierdata - set of instances serving as training datajava.lang.Exceptionpublic double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinst - java.lang.Exception - if distribution could not be computed successfullypublic boolean implementsMoreEfficientBatchPrediction()
implementsMoreEfficientBatchPrediction in interface BatchPredictorimplementsMoreEfficientBatchPrediction in class AbstractClassifierpublic double[][] distributionsForInstances(Instances insts) throws java.lang.Exception
distributionsForInstances in interface BatchPredictordistributionsForInstances in class AbstractClassifierinsts - the instances to make predictions forjava.lang.Exception - if a problem occurs.public java.lang.String toString()
toString in class java.lang.Objectpublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(java.lang.String[] argv)
throws java.lang.Exception
argv - the optionsjava.lang.Exception