using Plot for some NBA statistical analysis at th...
# show-and-tell
d
using Plot for some NBA statistical analysis at the play-by-play level here's my current baby:
🙌 2
🏀 1
l
If this is a notebook, could we have a link? Have you ever played around with kernel smoothing?
Copy code
kernels = [
  ({name:'Uniform', function: (x,s) => (-s<=x && x<=s) ? .5/s : 0}),
  ({name:'Triangular', function: (x,s) => (-s<=x && x<=s) ? (1-Math.abs(x/s))/s : 0}),
  ({name:'Epanechnikov', function: (x,s) => (-s<=x && x<=s) ? 3/4/s*(1-(x/s)**2) : 0}),
  ({name:'Quartic', function: (x,s) => (-s<=x && x<=s) ? 15/16/s*(1-(x/s)**2)**2 : 0}),
  ({name:'Triweight', function: (x,s) => (-s<=x && x<=s) ? 35/32/s*(1-(x/s)**2)**3 : 0}),
  ({name:'Tricube', function: (x,s) => (-s<=x && x<=s) ? 70/81/s*(1-Math.abs(x/s)**3)**3 : 0}),
  ({name:'Cosine', function: (x,s) => (-s<=x && x<=s) ? Math.PI/4/s*Math.cos(Math.PI/2*x/s) : 0}),
  ({name:'Gaussian', function: (x,s) => 1/Math.sqrt(2*Math.PI)/s*Math.exp(-.5*(x/s)**2) }),
]