SG++-Doxygen-Documentation
python.tools Namespace Reference

Classes

class  Matrix
 

Functions

def appendToDict (dict, key, val)
 
def checkData (data)
 
def gzOpen (filename, mode="r")
 
def isARFFFile (filename)
 
def makedir (path, verbose=False)
 
def normalize (data, border=0.0, filename=None, minvals=None, maxvals=None, verbose=False)
 
def normalizeClasses (data, border=0.0, minborder=-sys.maxsize-1, verbose=False)
 
def readAlpha (filename)
 
def readAlphaARFF (filename)
 
def readAlphaTrivial (filename, delim=None)
 
def readCheckpoint (filename)
 
def readData (filename)
 
def readDataARFF (filename)
 
def readDataTrivial (filename, delim=None, hasclass=True)
 
def readGrid (filename)
 
def readGridAlpha (fnamegrid, fnamealpha)
 
def readNormfile (filename)
 
def split_DataVector_by_proportion (data, proportion)
 
def split_DataVectors_by_proportion_stratified (data, classes, proportion)
 
def split_n_folds (data, num_partitions, seed=None)
 
def split_n_folds_sequential (data, num_partitions)
 
def split_n_folds_stratified (data, num_partitions, seed=None)
 
def writeAlphaARFF (filename, alpha)
 
def writeCheckpoint (filename, grid, alpha, adaption=None, fold=None)
 
def writeDataARFF (data, merge=False)
 
def writeDataMaple (data, merge)
 
def writeDataVectorMaple (data, filename, format="%s", maple_name="X", check=True)
 
def writeGnuplot (filename, grid, alpha, resolution, mode="w", data=None, fvals=None)
 
def writeGnuplotFctn (filename, dim, fctn, resolution, mode="w")
 
def writeGnuplotGrid (filename, grid)
 
def writeGrid (filename, grid)
 
def writeLockFile (filename, txt, mode="a")
 
def writeNormfile (filename, border, minvals, maxvals)
 
def writeStats (filename, txt, mode="a")
 
def writeStringToFile (s, filename, check=True)
 

Variables

int ARFF = 1
 
dictionary base_types
 
dictionary CModes
 
int NOTAFILE = -1
 
int SIMPLE = 0
 

Function Documentation

◆ appendToDict()

def python.tools.appendToDict (   dict,
  key,
  val 
)

◆ checkData()

def python.tools.checkData (   data)

◆ gzOpen()

◆ isARFFFile()

def python.tools.isARFFFile (   filename)

◆ makedir()

def python.tools.makedir (   path,
  verbose = False 
)

◆ normalize()

def python.tools.normalize (   data,
  border = 0.0,
  filename = None,
  minvals = None,
  maxvals = None,
  verbose = False 
)

◆ normalizeClasses()

def python.tools.normalizeClasses (   data,
  border = 0.0,
  minborder = -sys.maxsize-1,
  verbose = False 
)

◆ readAlpha()

◆ readAlphaARFF()

def python.tools.readAlphaARFF (   filename)

◆ readAlphaTrivial()

def python.tools.readAlphaTrivial (   filename,
  delim = None 
)

◆ readCheckpoint()

def python.tools.readCheckpoint (   filename)

◆ readData()

def python.tools.readData (   filename)

◆ readDataARFF()

◆ readDataTrivial()

def python.tools.readDataTrivial (   filename,
  delim = None,
  hasclass = True 
)

◆ readGrid()

◆ readGridAlpha()

def python.tools.readGridAlpha (   fnamegrid,
  fnamealpha 
)

◆ readNormfile()

def python.tools.readNormfile (   filename)

◆ split_DataVector_by_proportion()

def python.tools.split_DataVector_by_proportion (   data,
  proportion 
)

◆ split_DataVectors_by_proportion_stratified()

def python.tools.split_DataVectors_by_proportion_stratified (   data,
  classes,
  proportion 
)

◆ split_n_folds()

def python.tools.split_n_folds (   data,
  num_partitions,
  seed = None 
)

◆ split_n_folds_sequential()

def python.tools.split_n_folds_sequential (   data,
  num_partitions 
)

◆ split_n_folds_stratified()

def python.tools.split_n_folds_stratified (   data,
  num_partitions,
  seed = None 
)

◆ writeAlphaARFF()

◆ writeCheckpoint()

def python.tools.writeCheckpoint (   filename,
  grid,
  alpha,
  adaption = None,
  fold = None 
)

◆ writeDataARFF()

◆ writeDataMaple()

def python.tools.writeDataMaple (   data,
  merge 
)

◆ writeDataVectorMaple()

def python.tools.writeDataVectorMaple (   data,
  filename,
  format = "%s",
  maple_name = "X",
  check = True 
)

◆ writeGnuplot()

def python.tools.writeGnuplot (   filename,
  grid,
  alpha,
  resolution,
  mode = "w",
  data = None,
  fvals = None 
)

◆ writeGnuplotFctn()

def python.tools.writeGnuplotFctn (   filename,
  dim,
  fctn,
  resolution,
  mode = "w" 
)

References python.tools.gzOpen().

◆ writeGnuplotGrid()

def python.tools.writeGnuplotGrid (   filename,
  grid 
)

References analyse_erg.file.

◆ writeGrid()

◆ writeLockFile()

def python.tools.writeLockFile (   filename,
  txt,
  mode = "a" 
)

◆ writeNormfile()

def python.tools.writeNormfile (   filename,
  border,
  minvals,
  maxvals 
)

◆ writeStats()

def python.tools.writeStats (   filename,
  txt,
  mode = "a" 
)

◆ writeStringToFile()

def python.tools.writeStringToFile (   s,
  filename,
  check = True 
)

Variable Documentation

◆ ARFF

int python.tools.ARFF = 1

◆ base_types

dictionary python.tools.base_types
Initial value:
1 = {
2  # "linear" : {"base" : SLinearBase, "b" : SGridOperationB, "t" : test_dataset_linear, "laplace" : SGridOperationLaplace},
3  # "modlinear" : {"base" : SLinearModifiedBase, "b" : SGridModOperationB, "t" : test_dataset_modlin},
4  # "poly" : {"base" : "SPolyBase", },
5 }

◆ CModes

dictionary python.tools.CModes
Initial value:
1 = {
2  "laplace": "Classical Laplacian. See OpLaplaceAdaptive",
3  "identity": "Identity matrix, most efficient.",
4  "identity_no_level1": "Identity matrix, most efficient. But do not penalize Level 1",
5  "anisotropicpenalty": "Preferres quadratical supports. See OperationRegularizationDiagonal.",
6  "levelsum": "Sum of the levels, scaled by the gridlevel (usually 2 for adaptive SGs).",
7  "isotropicpenalty": "Energy-norm-like SGs. See OperationRegularizationDiagonal.",
8  "rowsum": "Sum of the rows of classical Laplacian. See OpLaplaceAdaptive",
9  "hkmix": "H^k_mix norm; requires parameter Hk",
10  "h0hklaplace": "Pseudo-Laplace with H^k in one, and 'H^0' in the remaining dimensions each; requires paramer Hk"}

◆ NOTAFILE

int python.tools.NOTAFILE = -1

◆ SIMPLE

int python.tools.SIMPLE = 0