SG++
python.data.CSVAdapter.CSVAdapter Class Reference

Class implements the interface of DataAdapter for storing and restoring of input data into / from files in CSV-format. More...

Inheritance diagram for python.data.CSVAdapter.CSVAdapter:

Public Member Functions

def __init__ (self, filename="")
 Constructor. More...
 
def loadData (self, name="train", delimiter=', target_col=-1)
 Reads dataset from file. More...
 
def loadSpecification (self, delimiter=')
 Loads attribute specification from file. More...
 
def save (self, points, values=None, attributes=None)
 Store data into file. More...
 

Static Public Attributes

 filename = None
 Filename associated with data. More...
 

Detailed Description

Class implements the interface of DataAdapter for storing and restoring of input data into / from files in CSV-format.

Constructor & Destructor Documentation

def python.data.CSVAdapter.CSVAdapter.__init__ (   self,
  filename = "" 
)

Member Function Documentation

def python.data.CSVAdapter.CSVAdapter.loadData (   self,
  name = "train",
  delimiter = ',
  target_col = -1 
)

Reads dataset from file.

Parameters
nameString for category of data set (train or test), default "train"
delimiteroptional delimiter character. Default: ','
target_coloptional number of target column. Default: -1
Returns
DataContainer with data set

References python.data.ARFFAdapter.ARFFAdapter.__gzOpen(), python.data.CSVAdapter.CSVAdapter.__gzOpen(), python.controller.InfoToFile.InfoToFile.filename, python.data.ARFFAdapter.ARFFAdapter.filename, and python.data.CSVAdapter.CSVAdapter.filename.

def python.data.CSVAdapter.CSVAdapter.loadSpecification (   self,
  delimiter = ' 
)

Loads attribute specification from file.

Returns
dictionary with attribute specification

References python.data.ARFFAdapter.ARFFAdapter.__gzOpen(), python.data.CSVAdapter.CSVAdapter.__gzOpen(), python.controller.InfoToFile.InfoToFile.filename, python.data.ARFFAdapter.ARFFAdapter.filename, and python.data.CSVAdapter.CSVAdapter.filename.

def python.data.CSVAdapter.CSVAdapter.save (   self,
  points,
  values = None,
  attributes = None 
)

Store data into file.

Parameters
pointsDataVector with points
valuesDataVector with values, default None
attributesdictionary with attributes of dataset, default None

References python.data.ARFFAdapter.ARFFAdapter.__gzOpen(), python.data.CSVAdapter.CSVAdapter.__gzOpen(), python.controller.InfoToFile.InfoToFile.filename, python.data.ARFFAdapter.ARFFAdapter.filename, python.data.CSVAdapter.CSVAdapter.filename, and sgpp::combigrid.join().

Member Data Documentation


The documentation for this class was generated from the following file: