ode_Plotters

Functions for plotting data in ODE solution classes.

While available to user, not meant to be used. Meant to be used through object returned from solveODE calls, then calling plotting function of object calls plotting functions with correct data. See examples for how this is done.

We encourage users to plot data by getting data from object (epoch loss, solution prediciton, etc.), and then making specific plots for each problem. These provide quick, easy to visualize plots of data from model available from solving function.

plot_epoch_loss(epoch_loss, epochs, title)

Plotting epoch loss of trained model. Saves image in current directory.

Parameters:
  • epoch_loss (list) –

    Total loss from training

  • epochs (int) –

    Epochs trained for

  • title (string) –

    File title

No returns

plot_ivp_loss(ivp_loss, epochs, title)

Plotting just initial value loss of trained model. Saves image in current directory.

Parameters:
  • ivp_loss (list) –

    ivp loss from training

  • epochs (int) –

    Epochs trained for

  • title (string) –

    File title

No returns

plot_de_loss(de_loss, epochs, title)

Plotting just differential equation loss of trained model. Saves image in current directory.

Parameters:
  • de_loss (list) –

    de loss from training

  • epochs (int) –

    Epochs trained for

  • title (string) –

    File title

No returns

plot_solution_prediction(t, solPred, title)

Plotting predicted solution of trained model. Saves image in current directory.

Parameters:
  • t (list) –

    Equally spaced points along t for evaluating model

  • solPred (list) –

    Solution prediction of model along t

  • title (string) –

    File title

No returns

plot_all_losses(epoch_loss, de_loss, ivp_loss, epochs, title)

Plotting all different losses of trained model. Saves image in current directory.

Parameters:
  • epoch_loss (list) –

    Total loss from training

  • de_loss (list) –

    de loss from training

  • ivp_loss (list) –

    ivp loss from training

  • epochs (int) –

    Epochs trained for

  • title (string) –

    File title

No returns

plot_predicted_exact(t, solPred, exact, title)

Plotting predicted solution of model vs input function of solution. Saves image in current directory.

Parameters:
  • t (list) –

    Equally spaced points along t for evaluating model

  • solPred (list) –

    Solution prediction of model along t

  • exact (list) –

    list of exact solution evaluated along t

  • title (string) –

    File title

No returns

plot_solution_prediction_system(t, solPred, title)

Plotting predicted solutions of trained model. Saves image in current directory.

Parameters:
  • t (list) –

    Equally spaced points along t for evaluating model

  • solPred (list) –

    List of lists of solution predictions of model along t

  • title (string) –

    File title

No returns

plot_predicted_exact_system(t, solPred, exact, title)

Plotting predicted solutions of model vs input functions of solution. Saves image in current directory.

Parameters:
  • t (list) –

    Equally spaced points along t for evaluating model

  • solPred (list) –

    List of lists of solution predictions of model along t

  • exact (list) –

    lList of lists of exact solutions evaluated along t

  • title (string) –

    File title

No returns