SG++
tools.py File Reference

Classes

class  python.tools.Matrix
 Class Matrix that incorporates settings and actions for applying the matrix C and computing the RHS b. More...
 

Namespaces

 python.tools
 

Functions

def python.tools.appendToDict (dict, key, val)
 A value pair is added to a dictionary's value entry. More...
 
def python.tools.checkData (data)
 Validates Dataset. More...
 
def python.tools.gzOpen (filename, mode="r")
 Opens a file. More...
 
def python.tools.isARFFFile (filename)
 Checks whether a file given by a filename is an ARFF-file. More...
 
def python.tools.makedir (path, verbose=False)
 (Recursively) creates a directory if not yet existant. More...
 
def python.tools.normalize (data, border=0.0, filename=None, minvals=None, maxvals=None, verbose=False)
 Normalize values of input vectors on the segment [0,1]. More...
 
def python.tools.normalizeClasses (data, border=0.0, minborder=-sys.maxint-1, verbose=False)
 Divides the class values in two categories. More...
 
def python.tools.readAlpha (filename)
 Opens and reads the onedimensional data of an ARFF (or plain whitespace-separated data) file. More...
 
def python.tools.readAlphaARFF (filename)
 Reads in onedimensional data from an ARFF file. More...
 
def python.tools.readAlphaTrivial (filename, delim=None)
 Reads in onedimensional data from a delimiter separated data file. More...
 
def python.tools.readCheckpoint (filename)
 read checkpoint More...
 
def python.tools.readData (filename)
 Opens and read the (multidimensional) data of an ARFF (or plain whitespace-separated data) file. More...
 
def python.tools.readDataARFF (filename)
 Reads in (multidimensional) data from an ARFF file. More...
 
def python.tools.readDataTrivial (filename, delim=None, hasclass=True)
 Reads in (multidimensional) data from a delimiter separated data file. More...
 
def python.tools.readGrid (filename)
 Unserialize a Grid from a file. More...
 
def python.tools.readGridAlpha (fnamegrid, fnamealpha)
 
def python.tools.readNormfile (filename)
 Reads information that is needed for the normalization of data from a file. More...
 
def python.tools.split_DataVector_by_proportion (data, proportion)
 perform sequential split of a DataVector into two DataVectors More...
 
def python.tools.split_DataVectors_by_proportion_stratified (data, classes, proportion)
 perform stratified split of a data set given by two DataVectors into two DataVectors each More...
 
def python.tools.split_n_folds (data, num_partitions, seed=None)
 
def python.tools.split_n_folds_sequential (data, num_partitions)
 
def python.tools.split_n_folds_stratified (data, num_partitions, seed=None)
 
def python.tools.writeAlphaARFF (filename, alpha)
 Writes DataVector to arff file. More...
 
def python.tools.writeCheckpoint (filename, grid, alpha, adaption=None, fold=None)
 Write whole checkpoint data to file. More...
 
def python.tools.writeDataARFF (data, merge=False)
 write ARFF data More...
 
def python.tools.writeDataMaple (data, merge)
 Writes a data object to a file, specified by data["filename"]+".maple". More...
 
def python.tools.writeDataVectorMaple (data, filename, format="%s", maple_name="X", check=True)
 Writes a DataVector object to a file, specified by filename. More...
 
def python.tools.writeGnuplot (filename, grid, alpha, resolution, mode="w", data=None, fvals=None)
 Evaluates function on a full grid in the domain, and writes evaluation points to a file. More...
 
def python.tools.writeGnuplotFctn (filename, dim, fctn, resolution, mode="w")
 Evaluates function on a full grid in the domain, and writes evaluation points to a file. More...
 
def python.tools.writeGnuplotGrid (filename, grid)
 Writes coordinates of a grid into a file, suitable for gnuplot. More...
 
def python.tools.writeGrid (filename, grid)
 Serialize a Grid to a file. More...
 
def python.tools.writeLockFile (filename, txt, mode="a")
 Writes a String txt to File filename, appends by default. More...
 
def python.tools.writeNormfile (filename, border, minvals, maxvals)
 Writes information that is needed for the normalization of data to a file. More...
 
def python.tools.writeStats (filename, txt, mode="a")
 writes statistics More...
 
def python.tools.writeStringToFile (s, filename, check=True)
 Writes String to File and checks if file existant. More...
 

Variables

int python.tools.ARFF = 1
 
dictionary python.tools.base_types
 base function types More...
 
dictionary python.tools.CModes
 An array containing all modes and descriptions. More...
 
int python.tools.NOTAFILE = -1
 
int python.tools.SIMPLE = 0