Skip to content

Instantly share code, notes, and snippets.

@axsk
Last active October 8, 2015 12:15
Show Gist options
  • Save axsk/91fcf1e313f4f330889a to your computer and use it in GitHub Desktop.
Save axsk/91fcf1e313f4f330889a to your computer and use it in GitHub Desktop.
not terminating
for method=methods, i=imgs, n=[clusternums[i]-1:clusternums[i]+1], mirrored = [false,true], left = [true,false], kernel=kernels
# print log
println(" image: $i, n: $n, mirrored: $mirrored, left: $left, method: $method, kernel: $kernel ")
# skip already computed data
if hasentry(hdf, i, n, mirrored, left, method, kernel)
println(", skipping...")
p.n = p.n-1
continue
end
# select data
subd = data[(data[:image].=="$i.jpg") & (data[:mirrored].==mirrored) & (data[:left].==left),:]
# cluster data
@time hdf = vcat(hdf,
Hokusai.compute(subd,n,τs,σs, method=method, kernel=kernel),
Hokusai.compute(subd,n,0,0, method=:kmeans))
# save results
save(filename, "hdf", hdf)
next!(p)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment