edu.udo.cs.yale.operator.features.transformation
Class GHAModel
java.lang.Object
edu.udo.cs.yale.operator.AbstractIOObject
edu.udo.cs.yale.operator.ResultObjectAdapter
edu.udo.cs.yale.operator.AbstractModel
edu.udo.cs.yale.operator.IOModel
edu.udo.cs.yale.operator.features.transformation.GHAModel
- All Implemented Interfaces:
- ComponentWeightsCreatable, IOObject, Model, ResultObject, Saveable, java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener
public class GHAModel
- extends IOModel
- implements java.awt.event.ActionListener, java.awt.event.ItemListener, ComponentWeightsCreatable
This is the transformation model of the GHA
The number of
components is initially specified by the GHA
. Additionally
the user can specify a lower number in the ModelApplier
. You
can add two prediction parameter:
- nr_components integer Specify a lower number of
components
- keep_attributes true|false If true, the original
features are not removed.
- Version:
- $Id: GHAModel.java,v 1.14 2006/09/30 00:05:31 ingomierswa Exp $
- Author:
- Daniel Hakenjos
- See Also:
GHA
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nr_attributes
private int nr_attributes
nr_components
private int nr_components
mean
private double[] mean
attname
private java.lang.String[] attname
eigenvalues
private double[] eigenvalues
weights
private double[][] weights
viscomp
private java.awt.Component[] viscomp
vispanel
private javax.swing.JPanel vispanel
eigenvalue_table
javax.swing.JRadioButton eigenvalue_table
eigenvector_table
javax.swing.JRadioButton eigenvector_table
cumvariance_plot
javax.swing.JRadioButton cumvariance_plot
last_selected_index
private int last_selected_index
att_index
private int[] att_index
sorted_eigenvectors
private double[][] sorted_eigenvectors
sortindex
private int sortindex
keep_attributes
private boolean keep_attributes
GHAModel
public GHAModel()
GHAModel
public GHAModel(ExampleSet eSet,
double[] eigenvalues,
double[][] weights,
double[] mean)
getWeights
public double[][] getWeights()
getMean
public double[] getMean()
getNrOfComponents
public double getNrOfComponents()
apply
public void apply(ExampleSet eSet)
throws OperatorException
- Description copied from interface:
Model
- Applies the model on the given example set.
- Specified by:
apply
in interface Model
- Throws:
OperatorException
writeData
public void writeData(java.io.ObjectOutputStream out)
throws java.io.IOException
- Description copied from class:
AbstractModel
- Writes the model to a stream.
- Specified by:
writeData
in class AbstractModel
- Throws:
java.io.IOException
readData
public void readData(java.io.ObjectInputStream in)
throws java.io.IOException
- Description copied from class:
IOModel
- Reads the model data from the stream.
- Specified by:
readData
in class IOModel
- Throws:
java.io.IOException
setParameter
public void setParameter(java.lang.String name,
java.lang.Object object)
throws OperatorException
- Description copied from class:
AbstractModel
- Throws a UserError since most models should not allow additional
parameters during application. However, subclasses may overwrite this
method.
- Specified by:
setParameter
in interface Model
- Overrides:
setParameter
in class AbstractModel
- Throws:
OperatorException
toHTML
public java.lang.String toHTML()
getEigenvalueTable
private java.awt.Component getEigenvalueTable()
getEigenvectorTable
private java.awt.Component getEigenvectorTable()
getVariancePlot
private javax.swing.JComponent getVariancePlot()
getVisualisationComponent
public java.awt.Component getVisualisationComponent(IOContainer container)
- Description copied from class:
ResultObjectAdapter
- Returns a label that displays the
ResultObjectAdapter.toResultString()
result
encoded as html. Please note that the returned label is already enclosed
by a scroll pane. If you overwrite this method you should again ensure that
the returned component is scrollable. The given container is totally ignored.
- Specified by:
getVisualisationComponent
in interface ResultObject
- Overrides:
getVisualisationComponent
in class ResultObjectAdapter
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent arg0)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
- Specified by:
itemStateChanged
in interface java.awt.event.ItemListener
quickSort2
private void quickSort2(double[][] array,
int index,
int links,
int rechts)
- Order the subarry from index anfang to index ende with QuickSort
- Parameters:
array
- links
- rechts
-
initSortedEigenvectors
private void initSortedEigenvectors()
getWeightsOfComponent
public AttributeWeights getWeightsOfComponent(int component)
throws OperatorException
- Specified by:
getWeightsOfComponent
in interface ComponentWeightsCreatable
- Throws:
OperatorException
Copyright © 2001-2006