torchdms.plot

Plotting functions.

Functions

beta_coefficients

This function takes in a (ideally trained) model and plots the values of the weights corresponding to the inputs, dubbed "beta coefficients".

build_2d_nonlinearity_df

Build a dataframe that contains the value of the nonlinearity for the domain of the range of values seen in the geplot_df.

build_geplot_df

Build data frame for making a global epistasis plot.

df_with_named_columns_of_np_array

plot_2d_geplot

plot_error

plot_exploded_binarymap_dataframe_summary

plot_geplot

plot_heatmap

This function takes in a model and plots the single mutant predictions.

plot_observed_2d_scores

If a dataset has two targets, create a scatterplot of the scores.

plot_svd

This function plots the log singular values and the cummulative sum of each of a trained model's beta coefficent matricies.

plot_svd_profiles

Plots heatmaps of amino acid profiles (U) and site profiles (V) from SVD output after final gradient step of training.

plot_test_correlation

Plot scatter plot and correlation values between predicted and observed for each target.

pretty_breaks

series_min_max

torchdms.plot.plot_test_correlation(evaluation_dict, model, out, cmap='plasma')[source]

Plot scatter plot and correlation values between predicted and observed for each target.

torchdms.plot.plot_heatmap(model, path)[source]

This function takes in a model and plots the single mutant predictions.

We plot this as a heatmap where the rows are substitutions nucleotides, and the columns are the sequence positions for each mutation.

torchdms.plot.beta_coefficients(model, test_data, out)[source]

This function takes in a (ideally trained) model and plots the values of the weights corresponding to the inputs, dubbed “beta coefficients”.

We plot this as a heatmap where the rows are substitutions nucleotides, and the columns are the sequence positions for each mutation.

torchdms.plot.build_geplot_df(model, data, device='cpu')[source]

Build data frame for making a global epistasis plot.

torchdms.plot.build_2d_nonlinearity_df(model, geplot_df, steps)[source]

Build a dataframe that contains the value of the nonlinearity for the domain of the range of values seen in the geplot_df.

torchdms.plot.plot_svd(model, test_data, out)[source]

This function plots the log singular values and the cummulative sum of each of a trained model’s beta coefficent matricies.

torchdms.plot.plot_svd_profiles(model, test_data, out)[source]

Plots heatmaps of amino acid profiles (U) and site profiles (V) from SVD output after final gradient step of training.

torchdms.plot.plot_observed_2d_scores(data, targets, out)[source]

If a dataset has two targets, create a scatterplot of the scores.