Acoustic Touch Recognition
Public Member Functions | Public Attributes | List of all members
atrlearning.arff_tools.ARFFLoader Class Reference
Inheritance diagram for atrlearning.arff_tools.ARFFLoader:

Public Member Functions

def __init__ (self, in_path, out_path=None)
 
def load_dataset (self, in_path=None, out_path=None, mode='pandas')
 
def dump_dataset (self, df)
 

Public Attributes

 save_file_
 
 train_file_
 
 in_dataset
 
 out_dataset
 

Detailed Description

This class implements a weka's ARFF format reader. The name of the files
changes according to some ROS parameters fixed in the launch file.
The rest of 'harcoded' information regarding the filename is set in the
other nodes in this package, and therefore is cohesive with them.

Constructor & Destructor Documentation

◆ __init__()

def atrlearning.arff_tools.ARFFLoader.__init__ (   self,
  in_path,
  out_path = None 
)

Member Function Documentation

◆ dump_dataset()

def atrlearning.arff_tools.ARFFLoader.dump_dataset (   self,
  df 
)
Dumps a dataframe into an ARFF file.

:param      df:   The input dataset to dump
:type       df:   Pandas' Dataframe object

◆ load_dataset()

def atrlearning.arff_tools.ARFFLoader.load_dataset (   self,
  in_path = None,
  out_path = None,
  mode = 'pandas' 
)
Loads a dataset. It can also overwrite the input and output file paths
if necessary

:param      in_path:   Input file path
:type       in_path:   String object
:param      out_path:  The output file path
:type       out_path:  String object
:param      mode:      The type of dataset that this function returns
:type       mode:      string

:returns:   Returns the ARFF file data
:rtype:     Either a Pandas' dataframe or a set of numpy arrays

Member Data Documentation

◆ in_dataset

atrlearning.arff_tools.ARFFLoader.in_dataset

◆ out_dataset

atrlearning.arff_tools.ARFFLoader.out_dataset

◆ save_file_

atrlearning.arff_tools.ARFFLoader.save_file_

◆ train_file_

atrlearning.arff_tools.ARFFLoader.train_file_

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