Module 2: Introduction to Pairwise Distance Algorithm and Black-Scholes Using Data Parallel Essentials for Python

Praveen Kundurthy and Bob Chesebrough, Intel
Webinar Beginner
Module 3

The pairwise distance application takes a set of multidimensional points and computes the Euclidean and/or cosine distance between every pair of points. For n observations, a common sub-task of different data analysis algorithms is to compute the symmetric matrix of distances between each pair of observations. Intel Extension for Scikit-learn* provides pair wise distances for cosine and correlation metrics.

The Black-Scholes program computes the price of a portfolio of options using partial differential equations. The entire computation performed by Black-Scholes is data-parallel, where each option can be priced independent of other options.

We will cover Pairwise and Black Scholes as examples to demonstrate the implementation of these algorithms with live sample code on the Intel DevCloud and / or JLSE.

Hands-on Agenda

The talk covers how to calculate the above algorithms using the @Numba JIT method and using @kernel decorator.

  • Code walk-thru of using the @numba.jit implementation and @numba_dppy.kernel implementation of the Pairwise and Black Scholes algorithms.
  • Introduce to Intel Extension for Scikit-learn*
  • Code walk-thru of cosine distance pairwise implementation using Intel® Extension for Scikit-learn*
  • Visualize the Pairwise and Black Scholes algorithms using matplotlib.
  • Compile and execute the same algorithms code sample on CPU and GPU offload