Jackknife on Data for Geoprofiling Analysis

Jackknife on Data for Geoprofiling Analysis

Supplementary material of the article: Tracking the origin of the invading Caulerpa (Caulerpales, Chlorophyta) with Geographic Profiling, a criminological technique for a killer alga

by Alessio Papini, Stefano Mosti, Ugo Santosuosso

Jackknife on data for geoprofiling analysis

We performed a preliminary jackknife analysis by eliminating 3 of 17 observations for 20 replicates.

It is a preliminary analysis since we did not yet evaluate theoretically how many observations should be deleted for each replicate; how many replicates would be necessary and if it is better to use Jackknife or Bootstrap as a robustness measure of the data set with respect to the geographic profiling analysis.

Taking three elements for each replicate corresponds to a calculation of combinations with repetition (elements can be taken more than one time):

Total combinations = (n+k-1)!/((n-1)!k!)

with n=17 and k=14:

The total possible combinations are then much more than the sampling of 20 replicates that we created.

We wrote a simple Python program that simply sums each new red (10% highest probability pixels) and green (further 10%) pixels found with a n-replicate jackknife data set on the original map. The result is shown in Fig. 1S and Fig. 2S (detail). The results appeared as quite robust, since the red pixels were concentrated on the coast between Menton-Monaco-Imperia, with the green ones reaching Varazze (some kms eastern).

Python Script (to be saved as text file) Finalimageafterjackknife.py

# Finalimageafterjackknife.py very preliminary version!!

# it is needed to change the name of the new added jackknife image by hand

# it starts with the image obtained from the previous jackknife file (imagedefjacktry.bmp) and adds the new red and greens pixels obtained with the new jackknife file: it saves the new image with the same name as the previous one: hence if You want to save an intermediate image you need to do it by hand

#the first image used is the geographical one used as start

# from a series of images from jackknikked data it produces a final images where all red and green points are shown

# Authors Alessio Papini e Ugo Santosuosso, Department of Plant Biology University of Florence Italy, Via La Pira, 4 Firenze, mail alpapiniATunifi.it

import os, sys

import math

#

#

from numpy import *

#------

import Image

i0="imagedefjacktry.bmp"

#i1="jack1.bmp"

i2="jack20.bmp"

im0 = Image.open(i0)

im1 = Image.open(i2)

WIDTH, HEIGHT = im1.size

for i in range (WIDTH):

for j in range (HEIGHT):

r,g,b=im1.getpixel((i,j))

if (r>220 and g<70 and b<70):

im0.putpixel((i,j),(255, 0, 0))

if (r<70 and g>220 and b<70):

im0.putpixel((i,j),(0, 255, 0))

im0.save("imagedefjacktry.bmp")

print('Resulting image saved with the indicated name')