API Reference

The Preference Learning Toolbox (PLT) is an open source software application and package which supports the key data modelling phases incorporating various popular data pre-processing, feature selection and preference learning methods.

This documentation describes the API of the PLT in detail.

Module contents

The graphical user interface (GUI) component of PLT is managed by the pyplt.gui subpackage and run via the pyplt.main_gui script. The remaining submodules and subpackages within this package focus on the backend functionality and the application programming interface (API) component of PLT.

Subpackages

Submodules

pyplt.autoencoder module

class pyplt.autoencoder.Autoencoder(input_size, code_size, encoder_topology, decoder_topology, activation_functions=None, learn_rate=0.001, error_threshold=0.001, epochs=10, batch_size=32)

Bases: object

Autoencoder class.

Initialize the Autoencoder.

Parameters:
  • input_size (int) – the number of input features that will be fed into the network. This determines the number of neurons in the input layer (and therefore also in the output layer).
  • code_size (int) – the number of neurons in the code layer (and therefore the size of the encoding).
  • encoder_topology (list of int) – specifies the number of neurons in each layer of the encoder part of the network, excluding the input layer and the code layer.
  • decoder_topology (list of int) – specifies the number of neurons in each layer of the decoder part of the network, excluding the code layer and the output layer.
  • activation_functions (list of pyplt.util.enums.ActivationType or None, optional) – a list of the activation functions to be used across the neurons for each layer of the ANN (excluding input layer) (default None); if None, all layers will use the Rectified Linear Unit (ReLU) function i.e. pyplt.util.enums.ActivationType.RELU, except for the output layer which will use the Logisitic Sigmoid function i.e. pyplt.util.enums.ActivationType.SIGMOID.
  • learn_rate (float, optional) – the learning rate used in the weight update step of the algorithm (default 0.1).
  • error_threshold (float, optional) – a threshold at or below which the error of a model is considered to be sufficiently trained (default 0.1).
  • epochs (int, optional) – the maximum number of iterations the algorithm should make over the entire set of training examples (default 10).
  • batch_size (int, optional) – number of samples per gradient update (default 32).
clean_up()

Close the tensorflow session once the algorithm class instance is no longer needed.

V.IMP. THIS FUNCTION MUST BE CALLED WHEN THE CLASS INSTANCE IS NO LONGER IN USE unless a context manager is used around the Autoencoder class instance!!!

encode(samples, progress_window=None, exec_stopper=None)

Encode the given samples by running the given samples through the encoder part of the network.

Parameters:
  • samples (array-like of shape n_samples x n_features) – the samples to be input into the autoencoder.
  • progress_window (pyplt.gui.experiment.progresswindow.ProgressWindow, optional) – a GUI object (extending the tkinter.Toplevel widget) used to display a progress log and progress bar during the experiment execution (default None).
  • exec_stopper (pyplt.util.AbortFlag, optional) – an abort flag object used to abort the execution before completion (default None).
Returns:

  • the encoded sample – if execution is completed successfully.
  • None – if experiment is aborted before completion by exec_stopper.

Return type:

array-like of shape n_samples x code_size

get_actfs()

Get the names of the activation functions of each layer in the network.

Returns:the names of the activation functions of each layer.
Return type:list of str
get_code_size()

Get the value of the code size parameter.

Returns:the code size value.
Return type:int
get_epochs()

Get the value of the epochs parameter.

Returns:the epochs value.
Return type:int
get_error_thresh()

Get the value of the error threshold parameter.

Returns:the error threshold value.
Return type:float
get_learn_rate()

Get the value of the learning rate parameter.

Returns:the learning rate value.
Return type:float
get_topology()

Get the topology of the network.

Returns:the topology.
Return type:list of int
get_topology_incl_input()

Get the topology of the network including the input layer.

Returns:the topology including the input layer.
Return type:list of int
init_train(progress_window=None, exec_stopper=None)

Initialize the model (topology).

This method is to be called if one wishes to initialize the model (topology) explicitly. This is done by declaring tensorflow placeholders, variables, and operations. If not called explicitly, the train() method will call it once implicitly.

Parameters:
  • progress_window (pyplt.gui.experiment.progresswindow.ProgressWindow, optional) – a GUI object (extending the tkinter.Toplevel widget) used to display a progress log and progress bar during the experiment execution (default None).
  • exec_stopper (pyplt.util.AbortFlag, optional) – an abort flag object used to abort the execution before completion (default None).
predict(samples)

Run the given samples through the entire autoencoder, thus obtaining a reconstruction of the input.

Parameters:samples (array-like of shape n_samples x n_features) – the samples to be input into the autoencoder.
Returns:the autoencoder output for the given input samples.
Return type:array-like of shape n_samples x n_features
train(training_examples, progress_window=None, exec_stopper=None)

Train the autoencoder.

Parameters:
  • training_examples (array-like of shape n_samples x n_features) – the input examples used to train the network.
  • progress_window (pyplt.gui.experiment.progresswindow.ProgressWindow, optional) – a GUI object (extending the tkinter.Toplevel widget) used to display a progress log and progress bar during the experiment execution (default None).
  • exec_stopper (pyplt.util.AbortFlag, optional) – an abort flag object used to abort the execution before completion (default None).
Returns:

  • training loss – if execution is completed successfully.
  • None – if experiment is aborted before completion by exec_stopper.

pyplt.exceptions module

This module contains the definitions for several exceptions, errors and warnings occurring specifically in PLT.

exception pyplt.exceptions.AutoencoderNormalizationValueError(norm_method, suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the normalization prior to use of autoencoder fails due to some non-numeric values.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:
  • norm_method (pyplt.util.enums.NormalizationType) – the attempted normalization method.
  • suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.DataSetValueWarning

Bases: UserWarning

Custom warning to inform users that the data set they are loading contains values which are not entirely numerical (i.e., cannot be converted to float or int).

Extends UserWarning.

exception pyplt.exceptions.FoldsRowsException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load a manual folds file with an invalid amount of rows.

Applies for KFoldCrossValidation.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.FoldsSampleIDsException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load a manual folds file with the wrong sample IDs.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.IDsException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load ranks containing anything other than IDs referring to objects.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.IncompatibleFoldIndicesException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the amount of user-specified fold indices does not match the amount of samples in the dataset.

Applies for KFoldCrossValidation.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.InvalidParameterValueException(parameter, value=None, method=None, is_algorithm=False, additional_msg='', suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to use an invalid value for the given parameter of an algorithm/method.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:
  • parameter (str) – the parameter for which the error was given.
  • value (object, optional) – the value (assigned to parameter) causing the error (default None).
  • is_algorithm (bool, optional) – specifies whether the parameter belonged to an algorithm (True) or method (False) (default False).
  • additional_msg (str, optional) – an additional message to include in the exception message.
  • suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.ManualFoldsFormatException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load a manual folds file with an invalid format.

A manual folds file is used to specify cross validation folds manually

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.MissingManualFoldsException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user chooses to specify folds manually without uploading a manual folds file.

Applies for KFoldCrossValidation.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.NoFeaturesError(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to run an experiment without any features to represent the objects.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.NoRanksDerivedError(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when no ranks could be derived from the given ratings-based dataset (single file format).

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.NonNumericFeatureException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load data containing non-numeric values.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.NonNumericValuesException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load data containing non-numeric values.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.NormalizationValueError(f_id, norm_method, f_name=None, suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts normalization on values that cannot be converted to int or float.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:
  • f_id (int) – ID number of the feature causing the error.
  • norm_method (pyplt.util.enums.NormalizationType) – the attempted normalization method.
  • f_name (str, optional) – name of the feature causing the error (default None).
  • suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.ObjectIDsFormatException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load objects containing non-numeric IDs.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.ObjectsFirstException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load ranks before first loading objects.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).
exception pyplt.exceptions.PLTException(summary, message, suppress=False)

Bases: Exception

Base class for exceptions occurring in PLT.

Extends the class Exception.

Initializes the exception with a summary and message.

Parameters:
  • summary (str) – a very brief description of the exception.
  • message (str) – an extended description of the exception.
  • suppress (bool, optional) – specifies whether (False) or not (True) to call the parent constructor (default False).
get_message()

Get the message of the exception.

Returns:the message of the exception.
Return type:str
get_summary()

Get the summary of the exception.

Returns:the summary of the exception.
Return type:str
exception pyplt.exceptions.ParamIgnoredWarning

Bases: UserWarning

Custom warning to inform user that one of the parameters passed to a method or function is being ignored in favour of another parameter passed to the method/function which overrides the former.

Extends UserWarning.

exception pyplt.exceptions.RanksFormatException(suppress=False)

Bases: pyplt.exceptions.PLTException

Exception for when the user attempts to load ranks with an invalid format.

Extends pyplt.exceptions.PLTException.

Set the exception details.

Parameters:suppress (bool) – specifies whether (False) or not (True) to call the constructor of parent class Exception (default False).

pyplt.experiment module

This module contains several backend classes and functions relating to the setting up a single experiment.

class pyplt.experiment.Experiment

Bases: object

Class encapsulating the set-up details of a single experiment.

get_autoencoder_details()

Get the details of the autoencoder used in the experiment (if applicable).

Returns:a dict containing the autoencoder parameter names as its keys and the parameter values as its values.
Return type:dict or None
get_autoencoder_loss()

Get the training loss of the autoencoder used in the experiment (if applicable).

Returns:the training loss.
Return type:float or None
get_data()

Get the loaded data.

If the single file format is used, a single pandas.DataFrame containing the data is returned. If the dual file format is used, a tuple containing both the objects and ranks (each a pandas.DataFrame) is returned.

Returns:the loaded data.
Return type:pandas.DataFrame or tuple of pandas.DataFrame (size 2)
get_features()

Get the features used in the experiment.

Returns:the names of the features used in the experiment.
Return type:list of str
get_norm_settings()

Get the normalization settings for each feature in the original objects data.

Returns:a dict with the indices of the features as the dict’s keys and the corresponding methods with which the features are to be normalized as the dict’s values.
Return type:dict of str (names of pyplt.util.enums.NormalizationType)
get_orig_features()

Get the original features used in the experiment.

If automatic feature extraction was enabled, this method will return the extracted features.

Returns:the names of the features.
Return type:list of str
get_pl_algorithm()

Get the preference learning algorithm used in the experiment.

Returns:the preference learning algorithm used in the experiment.
Return type:pyplt.plalgorithms.base.PLAlgorithm
get_time_meta_data()

Get meta data about the experiment related to time.

Returns:a list containing the start timestamp (UTC), end timestamp (UTC), and duration of the experiment.
Return type:list of float (size 3)
is_dual_format()

Indicate whether or not the data which has been loaded so far is in the dual file format.

Returns:specifies whether the data is in the dual file format or not (single file format).
Return type:bool
load_object_data(file_path, has_fnames=False, has_ids=False, separator=', ', col_names=None, na_filter=True)

Attempt to load an objects file as specified by the user and carries out validation checks.

If the data fails a validation check, a PLTException is raised.

Parameters:
  • file_path (str) – the path of the file to be loaded.
  • has_fnames (bool, optional) – specifies whether the file already contains feature names in the first row (default False).
  • has_ids (bool, optional) – specifies whether the file already contains object IDs in the first column (default False).
  • separator (str, optional) – the character separating items in the CSV file (default ‘,’).
  • col_names (list of str or None, optional) – specifies the column names to be used (default None).
  • na_filter (bool, optional) – specifies whether to detect missing value markers (default True).
Raises:
load_rank_data(file_path, has_fnames=False, has_ids=False, separator=', ', col_names=None, na_filter=True)

Attempt to load a ranks file as specified by the user and carries out validation checks.

If the data fails a validation check, a PLTException is raised.

Parameters:
  • file_path (str) – the path of the file to be loaded.
  • has_fnames (bool, optional) – specifies whether the file already contains feature names in the first row (default False).
  • has_ids (bool, optional) – specifies whether the file already contains object IDs in the first column (default False).
  • separator (str, optional) – the character separating items in the CSV file (default ‘,’).
  • col_names (list of str or None, optional) – specifies the column names to be used (default None).
  • na_filter (bool, optional) – a boolean indicating whether to detect missing value markers (default True).
Raises:
load_single_data(file_path, has_fnames=False, has_ids=False, separator=', ', col_names=None, na_filter=True, mdm=0.0, memory='all')

Attempt to load a single file as specified by the user and carries out validation checks.

When the experiment is run, pairwise preferences are automatically derived based on the ratings (last column in the given dataset) of the given objects/samples. The dataset is thus split into objects and ranks. The derivation of the pairwise preferences/ranks may be controlled via the optional minimum distance margin (mdm) and memory arguments of this method. If the data fails a validation check, a PLTException is raised.

Parameters:
  • file_path (str) – the path of the file to be loaded.
  • has_fnames (bool, optional) – specifies whether the file already contains feature names in the first row (default False).
  • has_ids (bool, optional) – specifies whether the file already contains object IDs in the first column (default False).
  • separator (str, optional) – the character separating items in the CSV file (default ‘,’).
  • col_names (list of str or None, optional) – specifies the column names to be used (default None).
  • na_filter (bool, optional) – a boolean indicating whether to detect missing value markers (default True).
  • mdm (float, optional) – the minimum distance margin i.e., the minimum difference between the ratings of a given pair of objects/samples that is required for the object pair to be considered a valid and clear preference (default 0.0).
  • memory (int or 'all', optional) – specifies how many neighbouring objects/samples are to be compared with a given object/sample when constructing the pairwise ranks (default ‘all’). If ‘all’, all objects/samples are compared to each other.
Raises:
  • ObjectIDsFormatException – if one or more non-numeric object IDs are detected.
  • NonNumericFeatureException – if the one or more feature with one or more non-numeric values are detected.
  • NoRanksDerivedError – if no pairwise preferences could be derived from the given data. This is either because there are no clear pairwise preferences in the data or because none of the clear pairwise preferences in the data conform to the chosen values for the rank derivation parameters (i.e., the minimum distance margin (mdm) and the memory (memory) parameters).
  • InvalidParameterValueException – if the user attempts to use a negative value (i.e., smaller than 0.0) for the mdm parameter.
print_objects()

Print the objects data used in the experiment to console.

print_ranks()

Print the pairwise rank data used in the experiment to console.

run(shuffle=False, random_state=None, debug=False, progress_window=None, exec_stopper=None)

Run the the experiment: feature selection first (if applicable), then preference learning.

Prior to running feature selection and preference learning, this method applies all specified pre-processing steps (e.g., fold-splitting, rank derivation, normalization) to the loaded data (if applicable). The method also stores the experiment details and returns the results for further use.

Parameters:
  • shuffle (bool, optional) – specifies whether or not to shuffle the data (samples in the case of the single file format; ranks in the case of the dual file format) at the start of executing the experiment; i.e., prior to fold splitting, rank derivation, and normalization (if applicable) (default False).
  • random_state (int or numpy.random.RandomState, optional) – seed for the random number generator (if int), or numpy RandomState object, used to shuffle the dataset if shuffle is True (default None).
  • debug (bool, optional) – specifies whether or not to print notes to console for debugging purposes (default False).
  • progress_window (pyplt.gui.experiment.progresswindow.ProgressWindow, optional) – a GUI object (extending the tkinter.Toplevel widget) used to display a progress log and progress bar during the experiment execution (default None).
  • exec_stopper (pyplt.util.AbortFlag, optional) – an abort flag object used to abort the execution before completion (default None).
Returns:

  • the experiment results – if experiment is completed successfully.
    • eval_metrics – the resulting average train and, if applicable, average test accuracies
    • fold_metrics – the fold-specific start timestamp, end timestamp, evaluation metrics, and a pandas.DataFrame representation of the trained model.
  • None – if aborted before completion by exec_stopper.

Return type:

  • eval_metrics – dict with keys:
    • Training Accuracy
    • Test Accuracy’ (if applicable)
  • fold_metrics – list of tuple, each containing:
    • start_time – datetime timestamp (UTC timezone)
    • end_time – datetime timestamp (UTC timezone)
    • eval_metrics – dict with keys:
      • Training Accuracy
      • Test Accuracy’ (if applicable)
    • model – pandas.DataFrame

Raises:
  • NoFeaturesError – if there are no features/attributes in the objects data.
  • NoRanksDerivedError – if rank derivation fails because no pairwise preferences could be derived from the given data. This is either because there are no clear pairwise preferences in the data or because none of the clear pairwise preferences in the data conform to the chosen values for the rank derivation parameters (i.e., the minimum distance margin (mdm) and the memory (memory) parameters).
  • InvalidParameterValueException – if the user attempted to use a negative value (i.e., smaller than 0.0) for the mdm rank derivation parameter.
  • NormalizationValueError – if normalization fails because one of the given values cannot be converted to int or float prior to the normalization.
  • IncompatibleFoldIndicesException – if the amount of user-specified fold indices for cross validation does not match the amount of samples in the dataset.
  • AutoencoderNormalizationValueError – if normalization prior to feature extraction via autoencoder fails due to the presence of non-numeric values in the dataset.
save_exp_log(timestamp, path='')

Save a log of the experiment to a Comma Separated Value (CSV) file at the path indicated by the user.

The file contains several log items. The first column of the file contains the type of information presented by the given item while the second column contains the information itself.

Parameters:
  • timestamp (float) – the timestamp to be included in the file name.
  • path (str, optional) – the path at which the file is to be saved (default “”). If “”, the file is saved to a logs folder in the project root directory by default.
save_model(timestamp, fold_idx=0, path='')

Save the model or one of the models inferred in the experiment to file at the path indicated by the user.

The resulting file is of a Comma Separated Value (CSV) format.

Parameters:
  • timestamp (float) – the timestamp to be included in the file name.
  • fold_idx (int, optional) – the index of the fold for which the model is to be saved (default 0). This parameter should only be used in the case of multiple folds (e.g., when K-Fold Cross Validation is used).
  • path (str, optional) – the path at which the file is to be saved (default “”). If “”, the file is saved to a logs folder in the project root directory by default.
set_autoencoder(autoencoder)

Set the autoencoder algorithm to be used to extract features from the dataset in the experiment.

Parameters:autoencoder (pyplt.autoencoder.Autoencoder or None) – the given autoencoder algorithm.
set_fs_algorithm(fs_algorithm)

Set the preference learning algorithm used in the feature selection phase of the experiment to the given algorithm.

Parameters:fs_algorithm (pyplt.plalgorithms.base.PLAlgorithm) – the given preference learning algorithm.
set_fs_evaluator(fs_evaluator)

Set the evaluation method used in the feature selection phase of the experiment to the given method.

Parameters:fs_evaluator (pyplt.evaluation.base.Evaluator) – the given evaluation method.
set_fs_method(fs_method)

Set the feature selection method of the experiment to the given method.

Parameters:fs_method (pyplt.fsmethods.base.FeatureSelectionMethod) – the given feature selection method.
set_normalization(feature_ids, norm_method)

Set the normalization method to be used for the given feature or features.

The actual application of the normalization method to the features occurs when the experiment is run.

N.B. If the dataset includes an object ID column as its first column, it is ignored by this method. Therefore, in such a case, an argument of 0 passed to the parameter feature_ids is taken to refer to the first feature in the dataset (the second column in the dataset) and not the object ID column.

Parameters:
  • feature_ids (int or list of ints) – the index of the feature or the list of features (columns in the dataset) for which the normalization method is to be set.
  • norm_method (pyplt.util.enums.NormalizationType) – the normalization method to be used.
set_pl_algorithm(pl_algorithm)

Set the preference learning algorithm of the experiment to the given algorithm.

Parameters:pl_algorithm (pyplt.plalgorithms.base.PLAlgorithm) – the given preference learning algorithm.
set_pl_evaluator(pl_evaluator)

Set the evaluation method of the experiment to the given method.

Parameters:pl_evaluator (pyplt.evaluation.base.Evaluator) – the given evaluation method.
set_rank_derivation_params(mdm=None, memory=None)

Set the values of the parameters used during the derivation of ranks from ratings.

These only apply if a single file format is used.

Parameters:
  • mdm (float or None, optional) – the minimum distance margin i.e., the minimum difference between the ratings of a given pair of objects/samples that is required for the object pair to be considered a valid and clear preference (default None). If None, a value of 0.0 is used by default during rank derivation.
  • memory (int or 'all' or None, optional) – specifies how many neighbouring objects/samples are to be compared with a given object/sample when constructing the pairwise ranks (default None). If None, a value of ‘all’ (i.e., all objects/samples are compared to each other) is used by default during rank derivation.

pyplt.experimentmanager module

This module contains the ExperimentManager class which enables the batching of experiments.

class pyplt.experimentmanager.ExperimentManager

Bases: object

Class for running a set of experiments in batch.

The user may add any number of experiments to the experiment list. The experiments may then be run in batch.

add_experiment(experiment: pyplt.experiment.Experiment)

Add an experiment to the list of experiments to be run in batch.

Parameters:experiment (pyplt.experiment.Experiment) – the experiment to be added to the list.
run_all()

Run each of the experiments in the list sequentially.

Raises:
  • NoFeaturesError – if there are no features/attributes in the objects data of a given experiment.
  • NoRanksDerivedError – if rank derivation fails because no pairwise preferences could be derived from the given data of a given experiment. This is either because there are no clear pairwise preferences in the data or because none of the clear pairwise preferences in the data conform to the chosen values for the rank derivation parameters (i.e., the minimum distance margin (mdm) and the memory (memory) parameters).
  • InvalidParameterValueException – if the user attempted to use a negative value (i.e., smaller than 0.0) for the mdm rank derivation parameter of a given experiment.
  • NormalizationValueError – if normalization fails for a given experiment because one of the given values cannot be converted to int or float prior to the normalization.

pyplt.main_gui module

This module runs the graphical user interface (GUI) of PLT.

The root widget of the GUI is a pyplt.gui.mainmenu.MainMenu widget. The rest of the GUI is managed by the pyplt.gui subpackage.