BPt.Dataset.plot_bivar#

Dataset.plot_bivar(scope1, scope2, subjects='all', decode_values=True, show=True, reduce_func=<function mean>, n_jobs=-1)[source]#

This method can be used to plot the relationship between two variables. Different types of plots will be used based on the types of the underlying variables.

Parameters
scope1Scope

The name(s) of the first set of variables in which to plot against scopes2.

scope2str

The name(s) of the second set of variables in which to plot against scopes2.

subjectsSubjects

This argument can be any of the BPt accepted subject style inputs. E.g., None, ‘nan’ for subjects with any nan data, or ‘not not’ for subjects without any, the str location of a file formatted with one subject per line, or directly as an array-like of subjects, to list a few options.

See Subjects for all options, and a more detailed description of the already mentioned options.

decode_valuesbool, optional

When handling categorical variables that have been encoded through a BPt dataset method, e.g., Dataset.ordinalize(), then you may optionally either use either the original categorical values before encoding with decode_values = True, or use the current internal values with decode_values = False.

default = True
showbool, optional

If plt.show() from matplotlib should be called after plotting each column within the passed scope.

default = True
reduce_funcpython function, optional

The passed python function will be applied only if the requested col/column is a ‘data file’. In the case that it is, the function should accept as input the data from one data file, and should return a single scalar value. For example, the default value is numpy’s mean function, which returns one value.

default = np.mean
n_jobsint, optional

As with reduce_func, this parameter is only valid when the passed col/column is a ‘data file’. In that case, this specifies the number of cores to use in loading and applying the reduce_func to each data file. This can provide a significant speed up when passed the number of available cores, but can sometimes be memory intensive depending on the underlying size of the file.

If set to -1, will try to automatically use all available cores.

default = -1