Skip to content

maximilianmbeck/viz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

viz

This repo will serve as a collection of any special visualizations related to machine learning. I try to update it from time to time, whenever I have made up any fancy new plots.

Gradient Descent Visualization

The module gd contains visualizations in 2D and 3D of gradient descent on arbitrary loss surfaces using interpolation and finite difference gradients. It also contains the the code to create the animation.

Code for the plots shown below can be found in the notebook 3d_gd_subgd.ipynb.

The notebook was originally created for our paper Few-Shot Learning by Dimensionality Reduction in Gradient Space.

Gradient Descent Plotly 3D

Gradient Descent Matplotlib 2D/3D

Presenting Data with Tables and Plots in Notebooks

In the module data_viz I my best practice for visualization of tabular data in Jupyter notebooks. It is also a good example of how to keep your code for data preprocessing and plotting separated and thus modular. Just have a look at the notebook data_viz_nb.ipynb.

The code was originally created for our publication Ensemble Learning for Domain Adaptation by Importance Weighted Least Squares.

Accuracy in combination with other information.

Gradient Descent Matplotlib 2D/3D

Tips for using Matplotlib with LaTex:

In order to make matplotlib use tex internally install Tex Live, for e.g. in a user directory, i.e. ~/.texlive2021.

Add the following lines in a cell in the plotting jupyter notebook:

os.environ["PATH"] = "~/.texlive2021/bin/x86_64-linux" + os.pathsep + os.environ["PATH"] 

rc('text', usetex=True) # this makes matplotlib use tex internally for plots

Useful References for Creating Nice Plots

  • TUEPlot Library: Helps you to create scientific plots for papers. See Github and Documentation.
  • dataframe-image: Create .png or .pdf files from for pandas dataframe outputs in jupyter notebooks. See Github and PyPi
  • TeX Live with rc('text', usetex=True): Make matplotlib plots with LaTex support. Install Tex Live by following these instructions.

About

Collection of code snippets for any kinds of visualizations related to machine learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors