public class PMCC extends MCC
NOTE: this implementation was faster, because the chain was only rebuilt from the first node which was different -- this is no longer the case (due to updates to way classifier chains works, using the CNode class).
MCC
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected CC[] |
h |
protected double |
m_Beta |
protected int |
m_M |
protected int |
m_O |
protected double[] |
w |
m_InstancesTemplate
BATCH_SIZE_DEFAULT, m_BatchSize, m_Debug, m_DoNotCheckCapabilities, m_numDecimalPlaces, NUM_DECIMAL_PLACES_DEFAULT
BayesNet, Newick, NOT_DRAWABLE, TREE
Constructor and Description |
---|
PMCC() |
Modifier and Type | Method and Description |
---|---|
String |
betaTipText() |
protected CC |
buildCC(int[] s,
weka.core.Instances D)
BuildCC - Build a CC of chain-order 's' on dataset 'D'.
|
void |
buildClassifier(weka.core.Instances D) |
double[] |
distributionForInstance(weka.core.Instance x) |
double |
getBeta()
Get the temperature factor
|
protected static CC |
getClosest(HashMap<String,CC> map,
String sequence)
GetClosest - returns the 'CC' in 'map' which is built on the sequence most matched to 'sequence'.
|
int |
getM()
Get the population size
|
int |
getO()
Get the temperature switch
|
String[] |
getOptions() |
String |
globalInfo()
Description to display in the GUI.
|
Enumeration |
listOptions() |
static void |
main(String[] args) |
String |
mTipText() |
String |
oTipText() |
static int[] |
pi(int[] s,
Random r,
int t,
double beta)
pi - proposal distribution; swap elements in s, depending on iteration t (temperature).
|
protected CC |
rebuildCC(CC h_old,
int[] s_new,
weka.core.Instances D)
RebuildCC - rebuild a classifier chain 'h_old' to have a new sequence 's_new'.
|
void |
setBeta(double t)
Set the temperature factor
|
void |
setM(int M)
Set the population size
|
void |
setO(int t)
Set the temperature switch
|
void |
setOptions(String[] options) |
chainIterationsTipText, getChainIterations, getInferenceIterations, getPayoff, getTechnicalInformation, inferenceIterationsTipText, payoff, payoffTipText, setChainIterations, setInferenceIterations, setPayoff
getConfidences, getDefaultSeed, getModel, getSeed, getTransformTemplates, graph, graphType, prepareChain, prepareChain, probabilityForInstance, rebuildClassifier, retrieveChain, sampleForInstance, sampleForInstanceFast, seedTipText, setSeed, toString, transformInstance
defaultClassifierString, evaluation, getCapabilities, getRevision, getTemplate, makeCopies, runClassifier, testCapabilities
classifierTipText, defaultClassifierOptions, getClassifier, getClassifierSpec, postExecution, preExecution, setClassifier
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
debugTipText, getDebug, setDebug
protected int m_M
protected int m_O
protected double m_Beta
protected CC[] h
protected double[] w
protected static CC getClosest(HashMap<String,CC> map, String sequence)
protected CC rebuildCC(CC h_old, int[] s_new, weka.core.Instances D) throws Exception
Exception
protected CC buildCC(int[] s, weka.core.Instances D) throws Exception
Exception
public static int[] pi(int[] s, Random r, int t, double beta)
s
- a chain sequencer
- a random number generatort
- the current iterationpublic void buildClassifier(weka.core.Instances D) throws Exception
buildClassifier
in interface weka.classifiers.Classifier
buildClassifier
in class MCC
Exception
public double[] distributionForInstance(weka.core.Instance x) throws Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class MCC
Exception
public Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class MCC
public void setOptions(String[] options) throws Exception
setOptions
in interface weka.core.OptionHandler
setOptions
in class MCC
Exception
public String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class MCC
public void setBeta(double t)
public double getBeta()
public String betaTipText()
public void setO(int t)
public int getO()
public String oTipText()
public void setM(int M)
public int getM()
public String mTipText()
public String globalInfo()
CC
globalInfo
in class MCC
public static void main(String[] args)
Copyright © 2017. All Rights Reserved.