In [130]:
using DataFrames
using JSON
using Iterators
using taxis
using HDF5, JLD
using Stats
using kNN
using sequenceCompare
#reload("taxis")
#reload("sequenceCompare")
nprocs()


Warning: using taxis.GetTableOrderedSubset in module Main conflicts with an existing identifier.
Warning: using taxis.ConstructCoordsDatabase in module Main conflicts with an existing identifier.
Out[130]:
8

In [131]:
taxi_df, taxi_validation_df = taxis.LoadData("/home/tony/ML/taxi/taxi2_time/train_200k.csv", "/home/tony/ML/taxi/taxi2_time/test.csv")
0


Begin
loading csv files
loading coords
getting coords counts
deleting unneeded data rows/columns
done!
Out[131]:
0

In [133]:
train_coords = taxi_df[:COORDS_TEST][1:4]
#train_lens = [c[:,1:int(ceil(rand(1)[1]*size(c,2)))] for c in train_coords]


Out[133]:
4-element DataArray{Any,1}:
 2x9 Array{Float64,2}:
 -8.61864  -8.6185  -8.62033  -8.62215  …  -8.62737  -8.63023  -8.63275
 41.1414   41.1414  41.1425   41.1438      41.1447   41.1452   41.1469    
 2x11 Array{Float64,2}:
 -8.63985  -8.64035  -8.6422  -8.64446  …  -8.66018  -8.66311  -8.66624
 41.1598   41.1599   41.1601  41.1605      41.1632   41.1637   41.1642   
 2x57 Array{Float64,2}:
 -8.61296  -8.61338  -8.61421  -8.61477  …  -8.63534  -8.63328  -8.63151
 41.1404   41.1403   41.1403   41.1404      41.148    41.1472   41.1461 
 2x31 Array{Float64,2}:
 -8.57468  -8.5747  -8.5747  -8.57466  …  -8.59882  -8.60019  -8.60106
 41.152    41.1519  41.1519  41.152       41.1461   41.1462   41.1461     

In [240]:
println("looking at taxi id information")

head(taxi_df)
taxi_ids = taxi_df[:TAXI_ID]
taxi_ids_dict = Dict{Int64, Int64}()
for id in taxi_ids
    taxi_ids_dict[id] = get(taxi_ids_dict, id, 0) + 1 
end

taxi_id_counts = [x::Int64 for x in values(taxi_ids_dict)]
describe(taxi_id_counts)
println("number less than 10: ", sum(taxi_id_counts .< 20)) 
println("number of taxi ids: ", length(keys(taxi_ids_dict)))

#taxis_by_id = [id => taxi_df[taxi_df[:TAXI_ID].==id,:] for id in keys(taxi_ids_dict)]

val_ids = [get(taxi_ids_dict, x, 0)::Int64 for x in taxi_validation_df[:TAXI_ID]]
sum(val_ids .== 0)


looking at taxi id information
Summary Stats:
Mean:         463.465116
Minimum:      1.000000
1st Quartile: 329.250000
Median:       428.500000
3rd Quartile: 607.000000
Maximum:      1067.000000
number less than 10: 3
number of taxi ids: 430
Out[240]:
6

In [104]:
println("finding unique number of coords")
all_coords_val = hcat(taxi_validation_df[:COORDS]...)
all_coords = hcat(taxi_df[:COORDS]...)


finding unique number of coords
Out[104]:
2x4774976 Array{Float64,2}:
 -8.61864  -8.6185  -8.62033  -8.62215  …  -8.6304  -8.63042  -8.63041
 41.1414   41.1414  41.1425   41.1438      41.1579  41.158    41.1579 

Creating coord dict


In [53]:
small_taxi_df = GetTableOrderedSubset(taxi_df, 190000)
coordsDB = ConstructCoordsDatabase(small_taxi_df, 2)
describe([length(x)::Int64 for x in values(coordsDB)])


190000, 190000Summary Stats:
Mean:         1616.671036
Minimum:      1.000000
1st Quartile: 4.000000
Median:       10.000000
3rd Quartile: 37.000000
Maximum:      963095.000000

In [63]:
taxi_df[:GRID_START] = [round(c,2) for c in taxi_df[:START]]
taxi_validation_df[:GRID_START] = [round(c,2) for c in taxi_validation_df[:START]]
taxi_df[:GRID_END] = [round(c,2) for c in taxi_df[:END]]
taxi_validation_df[:GRID_END] = [round(c,2) for c in taxi_validation_df[:END]]


Out[63]:
320-element Array{Any,1}:
 [-8.58,41.15]
 [-8.6,41.16] 
 [-8.57,41.17]
 [-8.61,41.14]
 [-8.62,41.15]
 [-8.63,41.17]
 [-8.58,41.15]
 [-8.58,41.19]
 [-8.61,41.13]
 [-8.59,41.2] 
 [-8.59,41.17]
 [-8.6,41.15] 
 [-8.58,41.16]
 ⋮            
 [-8.59,41.15]
 [-8.64,41.14]
 [-8.68,41.15]
 [-8.68,41.17]
 [-8.59,41.15]
 [-8.53,41.14]
 [-8.6,41.2]  
 [-8.59,41.15]
 [-8.63,41.15]
 [-8.64,41.15]
 [-8.57,41.17]
 [-8.59,41.19]

In [ ]:


In [128]:
function getGridDicts(train_df, test_df, grid_delta=.01)

    train_df[:GRID_START] = [round(c,2) for c in train_df[:START]]
    test_df[:GRID_START]  = [round(c,2) for c in test_df[:START] ]
    train_df[:GRID_END]   = [round(c,2) for c in train_df[:END]  ]
    test_df[:GRID_END]    = [round(c,2) for c in test_df[:END]   ]
    grids_dict = Dict()

    for i in 1:length(train_df[:GRID_START])
        coord_pair = train_df[:GRID_START][i]
        res = get(grids_dict, coord_pair, Any[])
        push!(res, train_df[:COORDS][i])
        grids_dict[coord_pair] = res 
    end

    mean_length_dict = Dict()
    mean_dest_dict = Dict()

    for grid_coord in keys(grids_dict)
        paths = grids_dict[grid_coord]
        endpoints = [x[:,end] for x in paths]
        path_lens = [int(length(x)/2)::Int64 for x in paths]
        #println("hey")
        mean_dest_dict[grid_coord] = mean(endpoints)
        #println("2222")
        mean_length_dict[grid_coord] = round(mean(path_lens))
    end

    return mean_length_dict, mean_dest_dict    

end

mean_length_dict, mean_dest_dict = getGridDicts()

In [129]:
values(mean_length_dict)


Out[129]:
ValueIterator for a Dict{Any,Any} with 419 entries. Values:
  63.0
  45.0
  54.0
  10.0
  44.0
  33.0
  61.0
  76.0
  44.0
  88.0
  129.0
  79.0
  48.0
  31.0
  53.0
  52.0
  55.0
  50.0
  54.0
  58.0
  71.0
  132.0
  391.0
  67.0
  ⋮

In [122]:
pairs = collect(keys(grids_dict))
grid_coord = pairs[1]

p = grids_dict[grid_coord]
println("num paths: ", length(p))
endpoints = [x[:,end] for x in p]
paths_lens = [int(length(x)/2)::Int64 for x in p]
println("endpoiktns and paths")
println(mean(paths_lens))

println(length(p[1]))

for x in p
    println(length(x)) 
end
println(mean(endpoints))


num paths: 6
endpoiktns and paths
99646.0
199292
199292
199292
199292
199292
199292
199292
`convert` has no method matching convert(::Type{Float64}, ::Array{Float64,2})
while loading In[122], in expression starting on line 16

 in setindex! at array.jl:307
 in / at /home/tony/.julia/v0.3/DataArrays/src/operators.jl:294
 in mean at statistics.jl:17

In [90]:
sum([haskey(grids_dict, x) for x in taxi_validation_df[:GRID_START]])
mean([c for c in train_df[:END][1:5]])
median(train_df[:NUM_COORDS][1:5])


Out[90]:
29.0

Creating new features


In [ ]:
function GetDateInfo(df)
    if haskey(df, :DAYOFWEEK)
        return df
end

function GetDistanceData(df)
    if haskey(df, :DISTANCE)
        return df
end

Training models


In [48]:
function euclideanDist(p1, p2)
    return sqrt((p1[1]-p2[1])^2 + (p1[2]-p2[2])^2)
end

function findClosestTrainingExample2(all_train_coords, test_path, w=1)
    num_paths = length(all_train_coords)
    best_dist = 9999.0
    best_path = all_train_coords[1]
    for k=1:num_paths
        train_path = all_train_coords[k]
        if w <= 1
            dist = DTWDistance(train_path, test_path) 
        else
            dist = DTWDistance(train_path, test_path, w) 
        end
        #println("k=", k, " dist=", dist)
        if dist < best_dist
            #println(k, ", old best: ", best_dist, " new best: ", dist)
            best_dist = dist
            best_path = all_train_coords[k]
        end
    end
    
    return best_path
end

# Create a DTW/START_DIFF metric
function findClosestTrainingExample3(all_train_coords, test_path, w=1)
    num_paths = length(all_train_coords)
    best_score = 999999.0
    best_path = all_train_coords[1]
    for k=1:num_paths
        
        train_path = all_train_coords[k]
        test_path = test_path[:,1:min(end, size(train_path,2)+2)]
        
        if size(train_path,2) < size(test_path, 2)
            continue
        end
        
        if w <= 1
            dist = DTWDistance(train_path, test_path) 
        else
            dist = DTWDistance(train_path, test_path, w) 
        end
        
        start_diff = float(euclideanDist(test_path[:,1], train_path[:,1])+0.000001)
        
        # score is 1/dist * 1/start_diff = 1/(dist*start_diff)
        # we'll minimize score = (dist*start_diff)
        score = float(dist * start_diff)
        
        if score < best_score
            best_score = score
            best_path = all_train_coords[k]
        end
    end
    
    return best_path
end

function findClosestTrainingExamplesDTWstarDiffAvg(all_train_coords, test_path, w=2, num_avg=30)
    num_paths = length(all_train_coords)
    
    dists = [float(DTWDistance(train_path, test_path, w)) for train_path in all_train_coords]
    start_diffs = [float(euclideanDist(test_path[:,1], train_path[:,1])+0.0000001) for train_path in all_train_coords]
    num_coords = [size(train_path,2) for train_path in all_train_coords]
    
    
    df = DataFrame(DISTS = dists, START_DIFF = start_diffs, NUM_COORDS = num_coords, DTW_START_DIFF = dists .* start_diffs)
    sort!(df, cols=[:DTW_START_DIFF])
    avg_length = median(df[:NUM_COORDS][1:min(end,num_avg)])
    
    return int(avg_length)
end


function findClosestTrainingExampleForTestSet2(train_df, test_df, max_subset=1000, w=1)
    all_train_paths = train_df[:COORDS]
    all_test_paths  = test_df[:COORDS]
    num_train_paths = length(all_train_paths)
    num_test_paths = length(all_test_paths)
    train_paths_subset = all_train_paths[7000:(7000+max_subset)]
    closest_examples = cell(num_test_paths)
    
    for k=1:num_test_paths
        if k % 20 == 0
            println(k, "/", num_test_paths, " for ", num_train_paths, " train path examples") 
        end
        test_path = all_test_paths[k]
        test_path_len = size(test_path, 2)
        test_taxi_id = test_df[:TAXI_ID][k]
        
        same_taxi_df = train_df[train_df[:TAXI_ID] .== test_taxi_id,:]
        if size(same_taxi_df,1) == 0        
            println("no taxi ids found for ", test_taxi_id)
            closest_training_example = findClosestTrainingExample(train_paths_subset, test_path, w) 
            closest_examples[k] = closest_training_example
        else 
            #println(size(same_taxi_df,1), "    - number of taxi id's routes")
            #println("test path length: ", test_path_len)
            #println("taxi id: ", test_taxi_id)
            same_taxi_paths = same_taxi_df[same_taxi_df[:NUM_COORDS] .>= test_path_len,:][:COORDS][1:min(end,max_subset)]
            println(size(same_taxi_df,1), "    - number of taxi id's routes with ", length(same_taxi_paths),
            " greater than length ", test_path_len,"!")

            if length(same_taxi_paths) == 0
                println("all paths filtered out!  resorting to random search again!")
                closest_training_example = findClosestTrainingExample(train_paths_subset, test_path, w) 
                closest_examples[k] = closest_training_example
            else
                closest_training_example = findClosestTrainingExample(same_taxi_paths, test_path, w) 
                closest_examples[k] = closest_training_example                
            end
        end
    end
    
    return closest_examples
end

function findClosestTrainingExampleForTestSet3(train_df, test_df, max_subset=4000, w=1)
    all_train_paths = train_df[:COORDS]
    all_test_paths  = test_df[:COORDS]
    num_train_paths = length(all_train_paths)
    num_test_paths = length(all_test_paths)
    train_paths_subset = all_train_paths[7000:(7000+max_subset)]
    closest_examples = cell(num_test_paths)
    
    for k=1:num_test_paths
        if k % 20 == 0
            println(k, "/", num_test_paths, " for ", num_train_paths, " train path examples") 
        end
        test_path = all_test_paths[k]
        test_path_len = size(test_path, 2)
        test_taxi_id = test_df[:TAXI_ID][k]
        
        same_taxi_df = train_df[train_df[:TAXI_ID] .== test_taxi_id,:]
        if size(same_taxi_df,1) == 0        
            println("no taxi ids found for ", test_taxi_id)
            closest_training_example = findClosestTrainingExample3(train_paths_subset, test_path, w) 
            closest_examples[k] = closest_training_example
        else 
            #println(size(same_taxi_df,1), "    - number of taxi id's routes")
            #println("test path length: ", test_path_len)
            #println("taxi id: ", test_taxi_id)
            same_taxi_paths = same_taxi_df[same_taxi_df[:NUM_COORDS] .>= test_path_len,:][:COORDS]
            println(size(same_taxi_df,1), "    - number of taxi id's routes with ", length(same_taxi_paths),
            " greater than length ", test_path_len,"!")

            if length(same_taxi_paths) == 0
                println("all paths filtered out!  resorting to random search again!")
                closest_training_example = findClosestTrainingExample3(train_paths_subset, test_path, w) 
                closest_examples[k] = closest_training_example
            else
                closest_training_example = findClosestTrainingExample3(same_taxi_paths, test_path, w) 
                closest_examples[k] = closest_training_example                
            end
        end
    end
    
    return closest_examples
end

function avgDTWstartDiffScore(train_df, test_df, max_subset=4000, w=2, num_avg=30)
    all_train_paths = train_df[:COORDS]
    all_test_paths  = test_df[:COORDS]
    num_train_paths = length(all_train_paths)
    num_test_paths = length(all_test_paths)
    train_paths_subset = all_train_paths[7000:(7000+max_subset)]
    closest_examples = cell(num_test_paths)
    
    for k=1:num_test_paths
        if k % 20 == 0
            println(k, "/", num_test_paths, " for ", num_train_paths, " train path examples") 
        end
        test_path = all_test_paths[k]
        test_path_len = size(test_path, 2)
        test_taxi_id = test_df[:TAXI_ID][k]
        
        same_taxi_df = train_df[train_df[:TAXI_ID] .== test_taxi_id,:]
        if size(same_taxi_df,1) == 0        
            println("no taxi ids found for ", test_taxi_id)
            closest_training_example = findClosestTrainingExamplesDTWstarDiffAvg(train_paths_subset, test_path, w, num_avg) 
            closest_examples[k] = closest_training_example
        else 
            #println(size(same_taxi_df,1), "    - number of taxi id's routes")
            #println("test path length: ", test_path_len)
            #println("taxi id: ", test_taxi_id)
            same_taxi_paths = same_taxi_df[same_taxi_df[:NUM_COORDS] .>= test_path_len,:][:COORDS]
            println(size(same_taxi_df,1), "    - number of taxi id's routes with ", length(same_taxi_paths),
            " greater than length ", test_path_len,"!")

            if length(same_taxi_paths) == 0
                println("all paths filtered out!  resorting to random search again!")
                closest_training_example = findClosestTrainingExamplesDTWstarDiffAvg(train_paths_subset, test_path, w, num_avg) 
                closest_examples[k] = closest_training_example
            else
                closest_training_example = findClosestTrainingExamplesDTWstarDiffAvg(same_taxi_paths, test_path, w, num_avg) 
                closest_examples[k] = closest_training_example   
            end
        end
    end
    
    return closest_examples
end


Out[48]:
avgDTWstartDiffScore (generic function with 4 methods)

In [ ]:
function startEndPrediction(train_paths, test_paths)
    num_test_examples = length(test_paths)
    
end

In [16]:
println("SUBMISSION PREDICTION")

# 1. Using subset of all_train_coords and scanning it for each test example

#all_train_coords = taxi_df[:COORDS][1:20]
#all_validation_coords = taxi_validation_df[:COORDS]
#test_guess_paths = findClosestTrainingExampleForTestSet(all_train_coords, all_validation_coords)
#taxi_validation_df[:GUESS_PATHS] = test_guess_paths

# 2. Scanning paths of same taxi


all_train_coords = taxi_df[:COORDS]
all_validation_coords = taxi_validation_df[:COORDS]
test_guess_lengths = avgDTWstartDiffScore(taxi_df, taxi_validation_df, 4000, 2, 30)
taxi_validation_df[:GUESS_NUM_COORDS] = test_guess_lengths


SUBMISSION PREDICTION
744    - number of taxi id's routes with 701 greater than length 11!
820    - number of taxi id's routes with 366 greater than length 40!
602    - number of taxi id's routes with 231 greater than length 40!
847    - number of taxi id's routes with 830 greater than length 8!
899    - number of taxi id's routes with 897 greater than length 2!
437    - number of taxi id's routes with 53 greater than length 137!
794    - number of taxi id's routes with 684 greater than length 24!
367    - number of taxi id's routes with 345 greater than length 17!
706    - number of taxi id's routes with 245 greater than length 43!
309    - number of taxi id's routes with 27 greater than length 79!
560    - number of taxi id's routes with 100 greater than length 63!
595    - number of taxi id's routes with 567 greater than length 17!
368    - number of taxi id's routes with 366 greater than length 5!
103    - number of taxi id's routes with 46 greater than length 76!
608    - number of taxi id's routes with 155 greater than length 54!
431    - number of taxi id's routes with 24 greater than length 97!
363    - number of taxi id's routes with 318 greater than length 27!
528    - number of taxi id's routes with 135 greater than length 63!
708    - number of taxi id's routes with 534 greater than length 31!
20/320 for 199290 train path examples
311    - number of taxi id's routes with 3 greater than length 164!
368    - number of taxi id's routes with 363 greater than length 6!
660    - number of taxi id's routes with 637 greater than length 13!
496    - number of taxi id's routes with 436 greater than length 18!
361    - number of taxi id's routes with 357 greater than length 4!
234    - number of taxi id's routes with 229 greater than length 10!
356    - number of taxi id's routes with 345 greater than length 12!
723    - number of taxi id's routes with 718 greater than length 5!
270    - number of taxi id's routes with 267 greater than length 3!
562    - number of taxi id's routes with 211 greater than length 51!
161    - number of taxi id's routes with 102 greater than length 40!
543    - number of taxi id's routes with 188 greater than length 45!
316    - number of taxi id's routes with 275 greater than length 27!
708    - number of taxi id's routes with 387 greater than length 38!
691    - number of taxi id's routes with 691 greater than length 1!
551    - number of taxi id's routes with 235 greater than length 48!
510    - number of taxi id's routes with 4 greater than length 157!
240    - number of taxi id's routes with 56 greater than length 70!
254    - number of taxi id's routes with 216 greater than length 24!
309    - number of taxi id's routes with 308 greater than length 7!
40/320 for 199290 train path examples
643    - number of taxi id's routes with 575 greater than length 21!
276    - number of taxi id's routes with 88 greater than length 48!
328    - number of taxi id's routes with 324 greater than length 7!
563    - number of taxi id's routes with 340 greater than length 40!
500    - number of taxi id's routes with 86 greater than length 59!
779    - number of taxi id's routes with 740 greater than length 16!
640    - number of taxi id's routes with 620 greater than length 13!
601    - number of taxi id's routes with 430 greater than length 31!
359    - number of taxi id's routes with 337 greater than length 18!
399    - number of taxi id's routes with 280 greater than length 39!
615    - number of taxi id's routes with 136 greater than length 57!
607    - number of taxi id's routes with 149 greater than length 64!
223    - number of taxi id's routes with 179 greater than length 23!
445    - number of taxi id's routes with 415 greater than length 19!
761    - number of taxi id's routes with 337 greater than length 44!
702    - number of taxi id's routes with 430 greater than length 39!
556    - number of taxi id's routes with 466 greater than length 23!
251    - number of taxi id's routes with 53 greater than length 53!
337    - number of taxi id's routes with 296 greater than length 22!
435    - number of taxi id's routes with 24 greater than length 134!
60/320 for 199290 train path examples
357    - number of taxi id's routes with 207 greater than length 38!
408    - number of taxi id's routes with 394 greater than length 16!
562    - number of taxi id's routes with 541 greater than length 10!
677    - number of taxi id's routes with 585 greater than length 20!
511    - number of taxi id's routes with 466 greater than length 24!
337    - number of taxi id's routes with 254 greater than length 23!
348    - number of taxi id's routes with 83 greater than length 59!
819    - number of taxi id's routes with 645 greater than length 26!
548    - number of taxi id's routes with 399 greater than length 24!
319    - number of taxi id's routes with 228 greater than length 41!
288    - number of taxi id's routes with 285 greater than length 9!
655    - number of taxi id's routes with 1 greater than length 470!
623    - number of taxi id's routes with 17 greater than length 112!
477    - number of taxi id's routes with 458 greater than length 11!
558    - number of taxi id's routes with 78 greater than length 78!
337    - number of taxi id's routes with 51 greater than length 68!
706    - number of taxi id's routes with 686 greater than length 11!
655    - number of taxi id's routes with 646 greater than length 2!
331    - number of taxi id's routes with 245 greater than length 33!
511    - number of taxi id's routes with 426 greater than length 12!
80/320 for 199290 train path examples
612    - number of taxi id's routes with 92 greater than length 80!
576    - number of taxi id's routes with 389 greater than length 33!
562    - number of taxi id's routes with 527 greater than length 19!
371    - number of taxi id's routes with 156 greater than length 49!
629    - number of taxi id's routes with 56 greater than length 97!
370    - number of taxi id's routes with 311 greater than length 25!
504    - number of taxi id's routes with 236 greater than length 42!
179    - number of taxi id's routes with 97 greater than length 43!
400    - number of taxi id's routes with 232 greater than length 37!
415    - number of taxi id's routes with 248 greater than length 35!
698    - number of taxi id's routes with 343 greater than length 42!
495    - number of taxi id's routes with 58 greater than length 70!
705    - number of taxi id's routes with 281 greater than length 42!
924    - number of taxi id's routes with 682 greater than length 29!
134    - number of taxi id's routes with 134 greater than length 3!
671    - number of taxi id's routes with 10 greater than length 225!
600    - number of taxi id's routes with 78 greater than length 138!
560    - number of taxi id's routes with 527 greater than length 17!
551    - number of taxi id's routes with 143 greater than length 67!
382    - number of taxi id's routes with 348 greater than length 22!
100/320 for 199290 train path examples
355    - number of taxi id's routes with 296 greater than length 20!
395    - number of taxi id's routes with 92 greater than length 66!
295    - number of taxi id's routes with 123 greater than length 47!
785    - number of taxi id's routes with 641 greater than length 25!
429    - number of taxi id's routes with 427 greater than length 9!
310    - number of taxi id's routes with 248 greater than length 10!
606    - number of taxi id's routes with 578 greater than length 15!
504    - number of taxi id's routes with 490 greater than length 9!
476    - number of taxi id's routes with 71 greater than length 64!
339    - number of taxi id's routes with 322 greater than length 10!
471    - number of taxi id's routes with 353 greater than length 29!
339    - number of taxi id's routes with 255 greater than length 32!
345    - number of taxi id's routes with 213 greater than length 35!
345    - number of taxi id's routes with 329 greater than length 19!
292    - number of taxi id's routes with 233 greater than length 23!
288    - number of taxi id's routes with 260 greater than length 21!
309    - number of taxi id's routes with 296 greater than length 19!
357    - number of taxi id's routes with 85 greater than length 64!
391    - number of taxi id's routes with 3 greater than length 152!
403    - number of taxi id's routes with 114 greater than length 51!
120/320 for 199290 train path examples
579    - number of taxi id's routes with 573 greater than length 11!
no taxi ids found for 20000248
385    - number of taxi id's routes with 385 greater than length 1!
548    - number of taxi id's routes with 545 greater than length 2!
799    - number of taxi id's routes with 790 greater than length 5!
735    - number of taxi id's routes with 502 greater than length 30!
500    - number of taxi id's routes with 0 greater than length 387!
all paths filtered out!  resorting to random search again!
410    - number of taxi id's routes with 266 greater than length 29!
375    - number of taxi id's routes with 239 greater than length 35!
701    - number of taxi id's routes with 121 greater than length 62!
521    - number of taxi id's routes with 444 greater than length 22!
700    - number of taxi id's routes with 687 greater than length 9!
311    - number of taxi id's routes with 133 greater than length 46!
706    - number of taxi id's routes with 1 greater than length 192!
575    - number of taxi id's routes with 567 greater than length 11!
396    - number of taxi id's routes with 370 greater than length 11!
399    - number of taxi id's routes with 234 greater than length 45!
240    - number of taxi id's routes with 225 greater than length 21!
393    - number of taxi id's routes with 304 greater than length 29!
361    - number of taxi id's routes with 227 greater than length 37!
140/320 for 199290 train path examples
261    - number of taxi id's routes with 131 greater than length 44!
395    - number of taxi id's routes with 346 greater than length 25!
330    - number of taxi id's routes with 316 greater than length 15!
375    - number of taxi id's routes with 27 greater than length 83!
39    - number of taxi id's routes with 3 greater than length 155!
717    - number of taxi id's routes with 592 greater than length 23!
545    - number of taxi id's routes with 512 greater than length 20!
409    - number of taxi id's routes with 353 greater than length 13!
431    - number of taxi id's routes with 331 greater than length 29!
460    - number of taxi id's routes with 294 greater than length 32!
182    - number of taxi id's routes with 35 greater than length 71!
368    - number of taxi id's routes with 352 greater than length 12!
no taxi ids found for 20000698
500    - number of taxi id's routes with 425 greater than length 23!
606    - number of taxi id's routes with 595 greater than length 11!
517    - number of taxi id's routes with 144 greater than length 49!
698    - number of taxi id's routes with 663 greater than length 19!
717    - number of taxi id's routes with 599 greater than length 22!
393    - number of taxi id's routes with 379 greater than length 5!
127    - number of taxi id's routes with 60 greater than length 44!
160/320 for 199290 train path examples
379    - number of taxi id's routes with 335 greater than length 26!
257    - number of taxi id's routes with 180 greater than length 33!
677    - number of taxi id's routes with 254 greater than length 46!
358    - number of taxi id's routes with 284 greater than length 25!
286    - number of taxi id's routes with 87 greater than length 48!
381    - number of taxi id's routes with 353 greater than length 20!
415    - number of taxi id's routes with 66 greater than length 60!
400    - number of taxi id's routes with 0 greater than length 369!
all paths filtered out!  resorting to random search again!
522    - number of taxi id's routes with 449 greater than length 19!
612    - number of taxi id's routes with 611 greater than length 3!
454    - number of taxi id's routes with 446 greater than length 8!
350    - number of taxi id's routes with 50 greater than length 72!
312    - number of taxi id's routes with 38 greater than length 71!
1067    - number of taxi id's routes with 790 greater than length 17!
878    - number of taxi id's routes with 36 greater than length 110!
325    - number of taxi id's routes with 320 greater than length 2!
684    - number of taxi id's routes with 676 greater than length 3!
361    - number of taxi id's routes with 51 greater than length 79!
494    - number of taxi id's routes with 466 greater than length 7!
303    - number of taxi id's routes with 75 greater than length 57!
180/320 for 199290 train path examples
427    - number of taxi id's routes with 330 greater than length 25!
629    - number of taxi id's routes with 214 greater than length 57!
860    - number of taxi id's routes with 842 greater than length 7!
779    - number of taxi id's routes with 544 greater than length 30!
347    - number of taxi id's routes with 340 greater than length 8!
370    - number of taxi id's routes with 204 greater than length 34!
no taxi ids found for 20000121
337    - number of taxi id's routes with 255 greater than length 27!
192    - number of taxi id's routes with 192 greater than length 6!
691    - number of taxi id's routes with 633 greater than length 13!
345    - number of taxi id's routes with 22 greater than length 220!
402    - number of taxi id's routes with 380 greater than length 21!
449    - number of taxi id's routes with 173 greater than length 45!
395    - number of taxi id's routes with 388 greater than length 14!
579    - number of taxi id's routes with 444 greater than length 30!
785    - number of taxi id's routes with 322 greater than length 46!
258    - number of taxi id's routes with 252 greater than length 12!
528    - number of taxi id's routes with 526 greater than length 4!
510    - number of taxi id's routes with 319 greater than length 34!
99    - number of taxi id's routes with 0 greater than length 327!
all paths filtered out!  resorting to random search again!
200/320 for 199290 train path examples
459    - number of taxi id's routes with 31 greater than length 80!
557    - number of taxi id's routes with 0 greater than length 612!
all paths filtered out!  resorting to random search again!
103    - number of taxi id's routes with 101 greater than length 9!
385    - number of taxi id's routes with 346 greater than length 19!
392    - number of taxi id's routes with 14 greater than length 107!
620    - number of taxi id's routes with 602 greater than length 13!
411    - number of taxi id's routes with 260 greater than length 34!
17    - number of taxi id's routes with 4 greater than length 43!
707    - number of taxi id's routes with 701 greater than length 6!
771    - number of taxi id's routes with 731 greater than length 10!
510    - number of taxi id's routes with 14 greater than length 111!
427    - number of taxi id's routes with 25 greater than length 84!
357    - number of taxi id's routes with 341 greater than length 14!
432    - number of taxi id's routes with 58 greater than length 163!
no taxi ids found for 20000362
607    - number of taxi id's routes with 221 greater than length 54!
558    - number of taxi id's routes with 13 greater than length 115!
560    - number of taxi id's routes with 8 greater than length 238!
495    - number of taxi id's routes with 22 greater than length 94!
686    - number of taxi id's routes with 621 greater than length 21!
220/320 for 199290 train path examples
477    - number of taxi id's routes with 395 greater than length 26!
640    - number of taxi id's routes with 8 greater than length 215!
306    - number of taxi id's routes with 244 greater than length 29!
551    - number of taxi id's routes with 1 greater than length 361!
330    - number of taxi id's routes with 104 greater than length 54!
432    - number of taxi id's routes with 426 greater than length 4!
836    - number of taxi id's routes with 382 greater than length 31!
435    - number of taxi id's routes with 422 greater than length 18!
699    - number of taxi id's routes with 571 greater than length 22!
673    - number of taxi id's routes with 670 greater than length 3!
828    - number of taxi id's routes with 683 greater than length 24!
625    - number of taxi id's routes with 242 greater than length 36!
382    - number of taxi id's routes with 227 greater than length 38!
no taxi ids found for 20000185
470    - number of taxi id's routes with 259 greater than length 38!
445    - number of taxi id's routes with 397 greater than length 22!
970    - number of taxi id's routes with 638 greater than length 28!
563    - number of taxi id's routes with 544 greater than length 11!
310    - number of taxi id's routes with 166 greater than length 37!
529    - number of taxi id's routes with 86 greater than length 65!
240/320 for 199290 train path examples
337    - number of taxi id's routes with 234 greater than length 31!
647    - number of taxi id's routes with 581 greater than length 19!
820    - number of taxi id's routes with 738 greater than length 15!
847    - number of taxi id's routes with 658 greater than length 23!
560    - number of taxi id's routes with 556 greater than length 6!
706    - number of taxi id's routes with 460 greater than length 28!
558    - number of taxi id's routes with 60 greater than length 85!
643    - number of taxi id's routes with 637 greater than length 5!
562    - number of taxi id's routes with 420 greater than length 31!
551    - number of taxi id's routes with 418 greater than length 30!
555    - number of taxi id's routes with 368 greater than length 31!
665    - number of taxi id's routes with 660 greater than length 5!
371    - number of taxi id's routes with 367 greater than length 4!
465    - number of taxi id's routes with 194 greater than length 48!
549    - number of taxi id's routes with 122 greater than length 59!
392    - number of taxi id's routes with 256 greater than length 33!
691    - number of taxi id's routes with 629 greater than length 15!
122    - number of taxi id's routes with 122 greater than length 7!
723    - number of taxi id's routes with 441 greater than length 35!
581    - number of taxi id's routes with 575 greater than length 5!
260/320 for 199290 train path examples
476    - number of taxi id's routes with 464 greater than length 15!
410    - number of taxi id's routes with 377 greater than length 19!
901    - number of taxi id's routes with 849 greater than length 15!
823    - number of taxi id's routes with 439 greater than length 38!
844    - number of taxi id's routes with 350 greater than length 45!
705    - number of taxi id's routes with 694 greater than length 8!
598    - number of taxi id's routes with 536 greater than length 19!
735    - number of taxi id's routes with 731 greater than length 8!
no taxi ids found for 20000079
799    - number of taxi id's routes with 424 greater than length 35!
737    - number of taxi id's routes with 170 greater than length 71!
711    - number of taxi id's routes with 603 greater than length 22!
619    - number of taxi id's routes with 615 greater than length 2!
770    - number of taxi id's routes with 105 greater than length 63!
700    - number of taxi id's routes with 542 greater than length 20!
752    - number of taxi id's routes with 724 greater than length 17!
635    - number of taxi id's routes with 624 greater than length 12!
699    - number of taxi id's routes with 686 greater than length 8!
619    - number of taxi id's routes with 609 greater than length 6!
600    - number of taxi id's routes with 517 greater than length 22!
280/320 for 199290 train path examples
201    - number of taxi id's routes with 200 greater than length 3!
477    - number of taxi id's routes with 465 greater than length 7!
701    - number of taxi id's routes with 678 greater than length 3!
415    - number of taxi id's routes with 325 greater than length 23!
380    - number of taxi id's routes with 366 greater than length 14!
368    - number of taxi id's routes with 253 greater than length 33!
296    - number of taxi id's routes with 21 greater than length 71!
370    - number of taxi id's routes with 319 greater than length 21!
361    - number of taxi id's routes with 170 greater than length 46!
407    - number of taxi id's routes with 379 greater than length 19!
348    - number of taxi id's routes with 314 greater than length 18!
460    - number of taxi id's routes with 428 greater than length 16!
254    - number of taxi id's routes with 203 greater than length 28!
557    - number of taxi id's routes with 128 greater than length 53!
248    - number of taxi id's routes with 53 greater than length 73!
707    - number of taxi id's routes with 510 greater than length 30!
558    - number of taxi id's routes with 551 greater than length 3!
495    - number of taxi id's routes with 487 greater than length 10!
644    - number of taxi id's routes with 479 greater than length 30!
288    - number of taxi id's routes with 278 greater than length 15!
300/320 for 199290 train path examples
445    - number of taxi id's routes with 50 greater than length 76!
744    - number of taxi id's routes with 372 greater than length 38!
379    - number of taxi id's routes with 377 greater than length 4!
122    - number of taxi id's routes with 120 greater than length 14!
356    - number of taxi id's routes with 232 greater than length 34!
410    - number of taxi id's routes with 325 greater than length 26!
357    - number of taxi id's routes with 294 greater than length 26!
662    - number of taxi id's routes with 621 greater than length 20!
730    - number of taxi id's routes with 643 greater than length 22!
402    - number of taxi id's routes with 342 greater than length 21!
629    - number of taxi id's routes with 527 greater than length 25!
818    - number of taxi id's routes with 735 greater than length 19!
405    - number of taxi id's routes with 55 greater than length 72!
607    - number of taxi id's routes with 227 greater than length 45!
357    - number of taxi id's routes with 3 greater than length 267!
500    - number of taxi id's routes with 190 greater than length 47!
532    - number of taxi id's routes with 187 greater than length 48!
270    - number of taxi id's routes with 14 greater than length 94!
545    - number of taxi id's routes with 543 greater than length 6!
417    - number of taxi id's routes with 396 greater than length 15!
320/320 for 199290 train path examples
556    - number of taxi id's routes with 165 greater than length 52!
Out[16]:
320-element Array{Any,1}:
 2x12 Array{Float64,2}:
 -8.58567  -8.58601  -8.58618  -8.58641  …  -8.57888  -8.57812  -8.57977
 41.1486   41.149    41.1488   41.1477      41.1457   41.1445   41.1439  
 2x61 Array{Float64,2}:
 -8.61078  -8.61078  -8.61034  -8.61022  …  -8.60307  -8.60139  -8.60044
 41.1457   41.1458   41.1462   41.1463      41.1836   41.1832   41.1829  
 2x57 Array{Float64,2}:
 -8.58567  -8.58589  -8.58612  -8.58651  …  -8.55481  -8.55429  -8.55346
 41.1485   41.149    41.1487   41.1477      41.1812   41.1811   41.1811  
 2x16 Array{Float64,2}:
 -8.61394  -8.6147  -8.6144  -8.61492  …  -8.61522  -8.61518  -8.61513
 41.1412   41.1415  41.1425  41.1428      41.1467   41.1467   41.1467      
 2x11 Array{Float64,2}:
 -8.61994  -8.61994  -8.61993  -8.62003  …  -8.61973  -8.6189  -8.61873
 41.148    41.148    41.148    41.1479      41.1524   41.1522  41.1523    
 2x141 Array{Float64,2}:
 -8.64465  -8.64515  -8.64402  -8.64381  …  -8.64481  -8.64479  -8.64475
 41.1577   41.1583   41.159    41.159       41.1587   41.1586   41.1586 
 2x25 Array{Float64,2}:
 -8.61005  -8.60996  -8.60854  -8.60576  …  -8.58614  -8.58614  -8.58614
 41.1409   41.1409   41.1411   41.1417      41.148    41.1481   41.1481  
 2x18 Array{Float64,2}:
 -8.58187  -8.58188  -8.58188  -8.5819  …  -8.57413  -8.57426  -8.57426
 41.1818   41.1818   41.1818   41.1818     41.1864   41.1858   41.1858    
 2x48 Array{Float64,2}:
 -8.61083  -8.61076  -8.61036  -8.6095  …  -8.58159  -8.57991  -8.58024
 41.1457   41.1458   41.146    41.1465     41.1252   41.1261   41.1275    
 2x96 Array{Float64,2}:
 -8.58557  -8.58559  -8.58559  -8.58559  …  -8.57639  -8.5764  -8.57642
 41.1485   41.1485   41.1485   41.1485      41.1932   41.1932  41.1932    
 2x82 Array{Float64,2}:
 -8.60707  -8.60707  -8.6071  -8.60712  …  -8.57124  -8.57069  -8.57068
 41.1504   41.1502   41.1502  41.1502      41.1595   41.1601   41.1601    
 2x22 Array{Float64,2}:
 -8.58572  -8.58578  -8.58632  -8.58802  …  -8.6016  -8.60393  -8.60486
 41.1486   41.149    41.149    41.1493      41.1489  41.1494   41.1496    
 2x8 Array{Float64,2}:
 -8.58004  -8.58087  -8.58199  -8.58479  …  -8.59039  -8.59458  -8.59657
 41.1595   41.1594   41.1587   41.158       41.1569   41.1564   41.158    
 ⋮                                                                                                                                                                        
 2x36 Array{Float64,2}:
 -8.60652  -8.60718  -8.60764  -8.60773  …  -8.58887  -8.58814  -8.58722
 41.1447   41.1445   41.1438   41.1438      41.1475   41.1492   41.1491  
 2x28 Array{Float64,2}:
 -8.63068  -8.63142  -8.63242  -8.63348  …  -8.63332  -8.63464  -8.63582
 41.155    41.1543   41.1528   41.1513      41.1405   41.1414   41.1432  
 2x23 Array{Float64,2}:
 -8.68929  -8.68902  -8.68793  -8.68704  …  -8.67507  -8.67508  -8.67507
 41.1681   41.1674   41.1667   41.1651      41.1484   41.1484   41.1484  
 2x75 Array{Float64,2}:
 -8.61089  -8.61092  -8.61082  -8.6107  …  -8.66494  -8.66553  -8.66553
 41.1456   41.1457   41.1458   41.146      41.1618   41.1624   41.1623    
 2x45 Array{Float64,2}:
 -8.60417  -8.60412  -8.60393  -8.60392  …  -8.57283  -8.57307  -8.57309
 41.1611   41.1612   41.1616   41.1616      41.1421   41.1417   41.1417  
 2x318 Array{Float64,2}:
 -8.58559  -8.58562  -8.58575  -8.58638  …  -8.58563  -8.58571  -8.58577
 41.1485   41.1485   41.1489   41.149       41.1488   41.1488   41.1488 
 2x49 Array{Float64,2}:
 -8.60645  -8.60645  -8.60645  -8.60645  …  -8.60181  -8.60188  -8.60188
 41.1447   41.1447   41.1447   41.1447      41.1573   41.1573   41.1573  
 2x55 Array{Float64,2}:
 -8.56936  -8.57016  -8.57046  -8.57162  …  -8.61579  -8.61606  -8.61614
 41.1593   41.159    41.1602   41.1595      41.1482   41.1488   41.1488  
 2x154 Array{Float64,2}:
 -8.60888  -8.60881  -8.60877  -8.60815  …  -8.60612  -8.60611  -8.6061
 41.1535   41.1536   41.1536   41.1535      41.1608   41.1608   41.1609  
 2x126 Array{Float64,2}:
 -8.6481  -8.6473  -8.64661  -8.64601  …  -8.64813  -8.64813  -8.64814
 41.1525  41.1524  41.1533   41.1543      41.1525   41.1525   41.1525     
 2x28 Array{Float64,2}:
 -8.56832  -8.56832  -8.56841  -8.56883  …  -8.58464  -8.58457  -8.58456
 41.1516   41.1516   41.1516   41.1523      41.1687   41.1688   41.1688  
 2x56 Array{Float64,2}:
 -8.5828  -8.58186  -8.58106  -8.57999  …  -8.56178  -8.56185  -8.56178
 41.1811  41.1818   41.183    41.1841      41.2116   41.2116   41.2116    

In [50]:
println("Local prediction")

#scanning subset of train paths for all test paths

#all_train_coords = taxi_df[:COORDS][10000:10400]
#test_df = tail(taxi_df, 100)
#all_test_coords = test_df[:COORDS_TEST]
#test_guess_paths = findClosestTrainingExampleForTestSet(all_train_coords, all_test_coords, 2)
#test_df[:GUESS_PATHS] = test_guess_paths

#looking at paths for same driver
train_df = taxi_df[1:90000,:]
test_df = tail(taxi_df, 10)
test_coords = test_df[:COORDS]
test_df[:COORDS] = test_df[:COORDS_TEST]
test_guess_lengths = avgDTWstartDiffScore(train_df, test_df, 1000, 2, 140)
test_df[:GUESS_NUM_COORDS] = test_guess_lengths
test_df[:COORDS] = test_coords #change it back for scoring

score_coords_guess(test_df)


Local prediction
avgDTWstartDiffScore not defined
while loading In[50], in expression starting on line 16

In [52]:
function score_path_guess(test_df)
    pred_paths = test_df[:GUESS_PATHS]
    actual_paths = test_df[:COORDS]
    pred_times = [((size(x,2)-1)*15)::Int64 for x in pred_paths]
    actual_times = [((size(x,2)-1)*15)::Int64 for x in actual_paths]
    score = sqrt(mean((log(max(pred_times, 660)+1)-log(actual_times+1)).^2))
    println("time score: ", score) 
    for k=1:length(pred_times)
        println("pred: ", pred_times[k], ", actual: ", actual_times[k], ", delta error: ", pred_times[k]-actual_times[k])
    end
end

function score_coords_guess(test_df)
    pred_num_coords = test_df[:GUESS_NUM_COORDS]
    actual_paths = test_df[:COORDS]
    pred_times = [((x-1)*15)::Int64 for x in pred_num_coords]
    actual_times = [((size(x,2)-1)*15)::Int64 for x in actual_paths]
    score = sqrt(mean((log(max(pred_times, 660)+1)-log(actual_times+1)).^2))
    println("time score: ", score) 
    for k=1:length(pred_times)
        println("pred: ", pred_times[k], ", actual: ", actual_times[k], ", delta error: ", pred_times[k]-actual_times[k])
    end
end


score_path_guess(test_df)


time score: 1.574925625091306
pred: 900, actual: 660, delta error: 240
pred: 1560, actual: 1005, delta error: 555
pred: 0, actual: 0, delta error: 0
pred: 345, actual: 735, delta error: -390
pred: 240, actual: 360, delta error: -120
pred: 255, actual: 1065, delta error: -810
pred: 465, actual: 465, delta error: 0
pred: 960, actual: 1005, delta error: -45
pred: 420, actual: 540, delta error: -120
pred: 585, actual: 360, delta error: 225
pred: 465, actual: 615, delta error: -150
pred: 255, actual: 480, delta error: -225
pred: 735, actual: 1080, delta error: -345
pred: 1065, actual: 1005, delta error: 60
pred: 870, actual: 840, delta error: 30
pred: 30, actual: 75, delta error: -45
pred: 975, actual: 945, delta error: 30
pred: 240, actual: 255, delta error: -15
pred: 435, actual: 450, delta error: -15
pred: 540, actual: 555, delta error: -15

In [126]:
log([1 2 3])


Out[126]:
1x3 Array{Float64,2}:
 0.0  0.693147  1.09861

In [17]:
#taxi_validation_df[:GUESS_PATHS] = test_guess_paths

#guess_times = [length(x)*15 for x in test_guess_paths]
num_test_examples = length(test_guess_paths)

guess_times = Array(Int64, num_test_examples)
dest_coords = cell(num_test_examples)

all_test_paths = taxi_validation_df[:COORDS]
test_guess_paths = taxi_validation_df[:GUESS_PATHS]
for k=1:num_test_examples
    test_path = all_test_paths[k]
    best_guess_path = test_guess_paths[k]
    
    test_path_time = length(test_path)*15
    best_guess_time = length(best_guess_path)*15
    
    if test_path_time > best_guess_time
        println(k, ":  guessing ", best_guess_time, " but existing time is ", test_path_time)
        #best_guess_time = test_path_time + 100
    end
    guess_times[k] = max(test_path_time, best_guess_time)
end

submission_validation = guess_times


121:  guessing 990 but existing time is 1080
126:  guessing 8220 but existing time is 11610
152:  guessing 30 but existing time is 300
167:  guessing 3450 but existing time is 11070
186:  guessing 30 but existing time is 60
199:  guessing 1200 but existing time is 9810
201:  guessing 1350 but existing time is 18360
214:  guessing 390 but existing time is 510
Out[17]:
18360

In [174]:
size(taxi_df[:COORDS][1],2)


Out[174]:
23

Generating Submission


In [18]:
# beat the benchmark example
#mean_time = mean(times_validation)
#submission_validation = [max(x, mean_time) for x in times_validation]

#submission_validation

df_submission = DataFrame()
df_submission[:TRIP_ID] = taxi_validation_df[:TRIP_ID]
df_submission[:TRAVEL_TIME] = submission_validation
writetable("7th_submission_DTW_START_DIFF.csv", df_submission)

In [27]:
lats = [float(x[2,end])::Float64 for x in taxi_validation_df[:GUESS_PATHS]]
lons = [float(x[1,end])::Float64 for x in taxi_validation_df[:GUESS_PATHS]]

df_submission = DataFrame()
df_submission[:TRIP_ID] = taxi_validation_df[:TRIP_ID]
df_submission[:LATITUDE] = lats
df_submission[:LONGITUDE] = lons
writetable("1th_sub_endpoint_DTW_START_DIFF.csv", df_submission)

In [388]:
immutable Point2{T}
  x::T
  y::T
end

D = [Point2(1.,2.) => 42]
haskey(D, Point2(1., 2.))  #False!


Out[388]:
true

In [42]:



ArgumentError("setindex!(::DataFrame, ...) only broadcasts scalars, not arrays")
while loading In[42], in expression starting on line 2

 in setindex! at /home/tony/.julia/v0.3/DataFrames/src/dataframe/dataframe.jl:356
 in DataFrame at /home/tony/.julia/v0.3/DataFrames/src/dataframe/dataframe.jl:104

In [39]:
taxi_validation_df[:COORDS]


Out[39]:
320-element DataArray{Any,1}:
 2x11 Array{Float64,2}:
 -8.58568  -8.58571  -8.58568  -8.58573  …  -8.587   -8.58658  -8.58488
 41.1485   41.1486   41.1489   41.1489      41.1475  41.1472   41.1466    
 2x40 Array{Float64,2}:
 -8.61088  -8.61086  -8.6109  -8.61044  …  -8.60293  -8.60255  -8.60189
 41.1456   41.1456   41.1458  41.1462      41.1628   41.1631   41.1636    
 2x40 Array{Float64,2}:
 -8.58574  -8.58573  -8.58572  -8.58629  …  -8.57695  -8.5759  -8.5749
 41.1486   41.1488   41.149    41.149       41.1664   41.1672  41.1677     
 2x8 Array{Float64,2}:
 -8.61396  -8.61412  -8.61509  -8.61528  …  -8.61524  -8.61505  -8.61464
 41.1412   41.1411   41.1409   41.1408      41.1408   41.1408   41.141    
 2x2 Array{Float64,2}:
 -8.6199  -8.61989
 41.148   41.148                                                                                                                
 2x137 Array{Float64,2}:
 -8.63061  -8.63061  -8.63074  -8.63151  …  -8.62639  -8.6264  -8.62641
 41.1782   41.1782   41.1782   41.1781      41.172    41.172   41.172    
 2x24 Array{Float64,2}:
 -8.58562  -8.58564  -8.58592  -8.58637  …  -8.58156  -8.58181  -8.58205
 41.1489   41.1489   41.1489   41.1489      41.1533   41.1535   41.1538  
 2x17 Array{Float64,2}:
 -8.58292  -8.582   -8.58108  -8.58011  …  -8.57703  -8.57753  -8.57877
 41.1811   41.1818  41.183    41.184       41.1861   41.1861   41.1852    
 2x43 Array{Float64,2}:
 -8.60653  -8.60667  -8.6068  -8.60679  …  -8.60548  -8.60549  -8.60549
 41.1447   41.1447   41.1447  41.1447      41.1257   41.1258   41.1258    
 2x79 Array{Float64,2}:
 -8.58566  -8.5857  -8.58573  -8.58574  …  -8.59117  -8.58826  -8.58631
 41.1486   41.1486  41.1486   41.1486      41.1942   41.1974   41.1993    
 2x63 Array{Float64,2}:
 -8.59123  -8.59123  -8.59122  -8.591   …  -8.58767  -8.5881  -8.58823
 41.1627   41.1627   41.1627   41.1626     41.1687   41.1689  41.1689      
 2x17 Array{Float64,2}:
 -8.58569  -8.58576  -8.58571  -8.58576  …  -8.59455  -8.59592  -8.59665
 41.1486   41.1487   41.1489   41.149       41.1507   41.1499   41.1494  
 2x5 Array{Float64,2}:
 -8.5801  -8.58023  -8.58152  -8.58252  -8.58433
 41.1594  41.1594   41.1593   41.1589   41.1583                                                   
 ⋮                                                                                                                                                                        
 2x21 Array{Float64,2}:
 -8.61072  -8.61049  -8.6094  -8.6085  …  -8.59074  -8.58956  -8.58816
 41.1445   41.1437   41.1432  41.1431     41.1469   41.1471   41.1473      
 2x25 Array{Float64,2}:
 -8.6406  -8.64005  -8.64022  -8.63974  …  -8.63605  -8.63605  -8.63605
 41.1549  41.1547   41.1536   41.1533      41.1405   41.1405   41.1406    
 2x19 Array{Float64,2}:
 -8.68929  -8.6893  -8.68873  -8.68765  …  -8.678   -8.67778  -8.67773
 41.1682   41.1682  41.1674   41.1663      41.1521  41.1517   41.1515      
 2x72 Array{Float64,2}:
 -8.60636  -8.60636  -8.60711  -8.6073  …  -8.68831  -8.6866  -8.68486
 41.1445   41.1446   41.1451   41.1457     41.1728   41.1734  41.1734      
 2x45 Array{Float64,2}:
 -8.61253  -8.61253  -8.61287  -8.61289  …  -8.58566  -8.58584  -8.58584
 41.1595   41.1595   41.1595   41.1595      41.1489   41.149    41.149   
 2x267 Array{Float64,2}:
 -8.66747  -8.66735  -8.66717  -8.66798  …  -8.53496  -8.53497  -8.53498
 41.2381   41.2383   41.2384   41.2387      41.1433   41.1433   41.1433 
 2x47 Array{Float64,2}:
 -8.60647  -8.60648  -8.60649  -8.60667  …  -8.5917  -8.59579  -8.60045
 41.1447   41.1447   41.1447   41.1448      41.1973  41.1973   41.1988    
 2x48 Array{Float64,2}:
 -8.5702  -8.57019  -8.56947  -8.56733  …  -8.59311  -8.59333  -8.59331
 41.1595  41.159    41.1591   41.1606      41.1511   41.151    41.1511    
 2x94 Array{Float64,2}:
 -8.61387  -8.61388  -8.61472  -8.61584  …  -8.62978  -8.62977  -8.62979
 41.1412   41.1412   41.1411   41.1407      41.1526   41.1526   41.1527  
 2x6 Array{Float64,2}:
 -8.6481  -8.64746  -8.64688  -8.64593  -8.64534  -8.6433
 41.1525  41.1524   41.1531   41.1538   41.1544   41.1543                                
 2x15 Array{Float64,2}:
 -8.5717  -8.57058  -8.569   -8.57006  …  -8.5658  -8.56669  -8.56921
 41.1561  41.1559   41.1555  41.1561      41.1647  41.1667   41.1676        
 2x52 Array{Float64,2}:
 -8.57456  -8.57225  -8.57049  -8.56883  …  -8.59046  -8.59078  -8.59234
 41.1802   41.1799   41.1795   41.1806      41.1978   41.1952   41.1922  

In [ ]: