Top Banner
JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python
12

JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

Dec 17, 2015

Download

Documents

Loren Bradley
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

J E N N I F E R C A R L S O NS C O TT K E L L E Y

A L TA F O L L AE L L I E VO L O S I N

G P H 5 9 8 : G E O C O M P U TAT I O NF I N A L P R O J E C T

FA L L 2 0 1 1

Kernel Density Estimationin Python

Page 2: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

INTRODUCTION

KERNEL

Page 3: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

INTRODUCTION

UTILITY

Page 4: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

INTRODUCTION

CENTRALIZING PySAL and STARS

Page 5: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

KERNEL CALCULATIONS

Display of kernel calculations Images

Page 6: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

KERNEL CALCULATIONS

EQUATION TABLE GAUSSIAN, TRIANGULAR, UNIFORM Equations + Image examples

Page 7: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

KERNEL CALCULATION IMAGES

Page 8: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

INPUTS AND OUTPUTS

IN: List (x1,y1,x2,y2,…xn,yn)

OUT: Kernel value Throughout AOI - Matrix

(x1,y1, z….xn2, yn

2, z) At user-specified point

(x,y,z)

Page 9: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

PROGRAMMING FLOW CHART

Create Class

KernelInput Points

Bandwidth and

Resolution

Function: preplists

Format Input

Observation Points

Format Output Grid

Points

Choose your

Calculation Function

Create Kernel

Values for Points in

Grid

Create Kernel

Values for a Specific

Point

Page 10: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

CALCULATION FUNCTION

User never sees this function For now only includes Gaussian, Triangular, and Unifrom

methods

def calculation (mu, xi, sig, method)if method is Gaussian run the Gaussian calculation for given inputs

elif method is Triangular is the grid point within the bandwidth? run the triangular calculation for given inputs

elif method is Unifrom is the grid point within the bandwidth? run the uniform calculation for given inputs

Page 11: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

KERNEL DENSITY FUNCTIONS

Three “grid” functions are available to run on a variable k that is class Kernel: k.gaussian() k.triangular() k.uniform()

Three “point” functions are also available k.gaussian_point (x-value, y-value) k.triangular_point (x-value, y-value) k.uniform_point (x-value, y-value)

The point functions require the user to enter the x and y values while the grid functions simply use the inputs from the Kernel class definition

Page 12: JENNIFER CARLSON SCOTT KELLEY AL TAFOLLA ELLIE VOLOSIN GPH 598: GEOCOMPUTATION FINAL PROJECT FALL 2011 Kernel Density Estimation in Python.

METHOD FUNCTION FLOW

When using the grid functions there are two for loops One for loop cycles

through output grid points

An inner for loop cycles through input observation points

When using the point functions there is only one for loop Loops through the input

observation points