|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.clusterers.assigners.MPCKMeansAssigner
weka.clusterers.assigners.LPAssigner
Field Summary | |
static int |
ENGINE_JMATLINK
Different engines that can be used to solve the LP |
static int |
ENGINE_MATLAB
|
static int |
ENGINE_OCTAVE
|
static int |
ENGINE_TOMLAB
|
protected Instances |
m_centroids
|
protected java.util.HashMap |
m_constraintHash
|
protected java.lang.String |
m_dataFilename
|
protected java.lang.String |
m_dataFilenameBase
|
protected jmatlink.JMatLink |
m_engine
The matlab engine |
protected int |
m_engineType
The engine |
protected Instances |
m_instances
fields to be initialized from m_clusterer |
protected double[] |
m_maxCLDistances
|
protected Metric |
m_metric
|
protected LearnableMetric[] |
m_metrics
|
protected int |
m_numCLConstraints
|
protected int |
m_numClusters
|
protected int |
m_numConstraints
|
protected int |
m_numConstraintVars
|
protected int |
m_numInstances
|
protected int |
m_numLabelVars
|
protected int |
m_numMLConstraints
|
protected int |
m_numVars
|
protected java.lang.String |
m_outFilename
|
protected java.lang.String |
m_outFilenameBase
|
protected java.lang.String |
m_progFilename
|
protected java.io.File |
m_tempDirFile
|
protected java.lang.String |
m_tempDirPath
Path to the directory where temporary files will be stored |
protected boolean |
m_useMultipleMetrics
|
static Tag[] |
TAGS_ENGINE_TYPE
|
Fields inherited from class weka.clusterers.assigners.MPCKMeansAssigner |
m_clusterer |
Constructor Summary | |
LPAssigner()
|
Method Summary | |
protected void |
accumulateConstraintCoeffs(double[] objCoeffs)
Accumulate contribution from constraints |
protected void |
accumulateDistortionCoeffs(double[] objCoeffs)
go through all instances and all clusters and accumulate the distortion contributions |
protected void |
addPairPenalties(InstancePair pair,
int idx,
double[] objCoeffs)
accumulate penalties associated with a given constraint |
int |
assign()
The main method |
protected double[] |
calculateMaxDistances(Instance[][] maxCLPoints)
|
protected void |
dumpData(double[] objCoeffs,
double[][] A_eq,
double[] b_eq,
double[][] A,
double[] b)
Dump data matrix into a file |
protected void |
dumpDataTomLab(double[] objCoeffs,
double[][] A_eq,
double[] b_eq,
double[][] A,
double[] b)
Dump data matrix into a file |
SelectedTag |
getEngineType()
Get the engine type |
java.lang.String[] |
getOptions()
Gets the current option settings for the OptionHandler. |
protected double[][] |
getSolution()
Read the solution from the output file of Octave |
protected void |
initialize()
Initialize fields from the current clustererer |
boolean |
isSequential()
This is a sequential assignment method |
java.util.Enumeration |
listOptions()
Returns an enumeration of all the available options.. |
void |
prepareEngine()
Create octave m-file |
int |
runEngine()
Run octave in command line with a given argument |
void |
setEngineType(SelectedTag engineType)
Set the engine type |
void |
setOptions(java.lang.String[] options)
Sets the OptionHandler's options using the given list. |
Methods inherited from class weka.clusterers.assigners.MPCKMeansAssigner |
setClusterer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Instances m_instances
protected java.util.HashMap m_constraintHash
protected int m_numInstances
protected int m_numClusters
protected int m_numConstraints
protected int m_numCLConstraints
protected int m_numMLConstraints
protected int m_numLabelVars
protected int m_numConstraintVars
protected int m_numVars
protected boolean m_useMultipleMetrics
protected Metric m_metric
protected LearnableMetric[] m_metrics
protected double[] m_maxCLDistances
protected Instances m_centroids
public static final int ENGINE_JMATLINK
public static final int ENGINE_OCTAVE
public static final int ENGINE_MATLAB
public static final int ENGINE_TOMLAB
public static final Tag[] TAGS_ENGINE_TYPE
protected int m_engineType
protected jmatlink.JMatLink m_engine
protected java.lang.String m_tempDirPath
protected java.io.File m_tempDirFile
protected java.lang.String m_progFilename
protected java.lang.String m_dataFilenameBase
protected java.lang.String m_dataFilename
protected java.lang.String m_outFilenameBase
protected java.lang.String m_outFilename
Constructor Detail |
public LPAssigner()
Method Detail |
public boolean isSequential()
isSequential
in class MPCKMeansAssigner
protected void initialize() throws java.lang.Exception
java.lang.Exception
public int assign() throws java.lang.Exception
assign
in class MPCKMeansAssigner
java.lang.Exception
protected void accumulateDistortionCoeffs(double[] objCoeffs) throws java.lang.Exception
java.lang.Exception
protected void accumulateConstraintCoeffs(double[] objCoeffs) throws java.lang.Exception
java.lang.Exception
protected void addPairPenalties(InstancePair pair, int idx, double[] objCoeffs) throws java.lang.Exception
java.lang.Exception
protected void dumpData(double[] objCoeffs, double[][] A_eq, double[] b_eq, double[][] A, double[] b)
protected void dumpDataTomLab(double[] objCoeffs, double[][] A_eq, double[] b_eq, double[][] A, double[] b)
protected double[][] getSolution()
public void prepareEngine()
public int runEngine()
protected double[] calculateMaxDistances(Instance[][] maxCLPoints) throws java.lang.Exception
java.lang.Exception
public void setEngineType(SelectedTag engineType)
public SelectedTag getEngineType()
public void setOptions(java.lang.String[] options) throws java.lang.Exception
OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.util.Enumeration listOptions()
OptionHandler
public java.lang.String[] getOptions()
OptionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |