Test Result Set¶
- class test_result_set.TestResultSet(folder_relative_path)¶
This is the Test Result Set class. Its main functionality is to read all the files (measurements) within a given path and extract the features. It will return a data frame where the rows are the measurements and the columns correspond to the extracted features.
- Parameters:
folder_relative_path (str) – (required) the relative folder path
- Example:
>>> import pdkit >>> testResultSet = pdkit.TestResultSet(folderpath) >>> dataframe = testResultSet.process
where folderpath is the relative folder with the different measurements. For CloudUPDRS there are measurements in the following folder ./tests/data/S5.
- Example:
>>> testResultSet.write_output(dataframe, name)
To write the data frame to a output file (name)
- process()¶
This method reads all the directories that contain files (measurements) within a given relative path and extracts the features. the resulting dataframe with all the features processed is saved in testResultSet.features Where features Dataframe the rows are the measurements and the columns correspond to the extracted features. The data frame will have a column ‘id’ with the name of the measurement.
- write_output(filename, output_format='csv')¶
This method writes to a file the features data frame.
- Parameters:
filename (string) – the name to give to the file
output_format (string) – the format of the file to write (‘csv’, ‘json’ or ‘sql’)