Table of Contents

Class: MCCV compClust/mlx/wrapper/MCCV.py
Base Classes   
ML_Algorithm
Methods   
__computeFitnessAvg
__init__
clear
constructBestClustering
copy
createInversePartition
createRandomMarkSequence
createRandomPartition
getBestParam
getDefaultParameters
getFitnessTable
getLabeling
getModel
run
setParameters
validate
writeFitnessTable
writeSpecialFiles
  __computeFitnessAvg 
__computeFitnessAvg ( self,  fitnessTbl )

fitness list = __computeFitnessAvg(fitnessTbl)

Compute fitness average will run through the fitness tuples and compute the average score of all k_prime entries. If a score of NaN is found, it is not considered. If the sum of a series of k_primes is zero, then that average is not considered. A list of tuples [k_prime, avg] is returned.

  __init__ 
__init__ (
        self,
        dataset=None,
        parameters=None,
        algorithm=None,
        )

MCCV(dataset=None, parameters=None, algorithm=None)

  clear 
clear ( self )

  constructBestClustering 
constructBestClustering ( self )

MCCV.constructBestClustering()

Once an MCCV run is complete, this function returns the best clustering based on the parameters discovered.

  copy 
copy ( self )

  createInversePartition 
createInversePartition ( self,  partition )

createInversParitions()

let U be the set of all row numbers for the current datset let A be the partition set

return U - A = A'

  createRandomMarkSequence 
createRandomMarkSequence (
        self,
        total_size,
        mark_size,
        )

seq = createRandomMarkSequence(total_size, mark_size)

Creates a sequence containing total_size integers, either 0 or 1. Marks mark_size randomly chosen elements of the sequence as 1 and the remaining elements as 0.

This method is implemented efficiently, as it never needs to visit more than half the elements in the sequence.

Implementation based on da_random.c:random_mark_vector() by Joe Roden and Alex Gray.

  createRandomPartition 
createRandomPartition ( self,  fraction )

createRandomParitions()

Creates a list of rows which define a random subset of the dataset

  getBestParam 
getBestParam ( self )

  getDefaultParameters 
getDefaultParameters ( self )

getDefaultParameters():

returns a set of sensible parameters from running MCCV when the caller has no other information. Also used from within the constructor

  getFitnessTable 
getFitnessTable ( self )

  getLabeling 
getLabeling ( self )

Labeling = MCCV.getLabeling()

  getModel 
getModel ( self )

Model = MCCV.getModel()

  run 
run ( self )

value = run()

  setParameters 
setParameters ( self,  parameters )

setParameters(parameters):

Overloaded method to force the algorithm to have at least a bare amount of parameters.

  validate 
validate ( self )

validate()

Ensures that all parameters and environment variables nescessary to run the clustering algorithm (MCCV) are defined.

  writeFitnessTable 
writeFitnessTable (
        self,
        stream,
        array,
        best_param,
        )

writeFitnessTable(stream, label, array, best_param)

write the fitness table tuples out with a header that indicated the best parameter.

  writeSpecialFiles 
writeSpecialFiles ( self )

writeSpecialFiles(self)

After the MCCV loop has completed there may be auxiliary information that should be written out as well. This function does that. Currently, only the fitness table and a pickle.dump on the object are done.


Table of Contents

This document was automatically generated on Wed Aug 27 14:25:04 2003 by HappyDoc version 2.1