Landslide Prevention and Innovation Challenge
Can you identify if a landslide occurred or not?
3 000 Zindi Points
Ended 4 months ago
172 active · 473 enrolled
Hong Kong
Good for beginners
CNN - some comments
Help · 3 Oct 2022, 12:31 · 3

I used CNN.

Nice idea, the 5x5 forms a spatial grid and the various features are channels in that grid. Makes a lot of sense, but also lots of hard work. Unlike GBM, you have to scale the channels and it is a really small grid, so just a few convolutions.

I'll just share one thing that improved my CV and LB a little bit. It is in code snippet below. I calculate the angle of each tile that points to the tile in the middle (13). This can then be combined with others (e.g. placurve or procurve) to get new features that e.g. calculate how much force is excerted on 13 - or that is the idea.

For a CNN this was a nice comp, as you could try ideas like this. But CNN failed compared to GBM it seems, perhaps because 5x5 is too small for CNN to benefit and still small enough for GBM to fit well?

# Angle pointing to 13
midpoint  = [ 135, 112.5, 90, 67.5, 45, 157.5, 135, 90, 45, 22.5, 180, 180, 0, 0, 0, 202.5, 225, 270, 315, 337.5, 225, 247.5, 270, 292.5, 315 ]

# Calculate
# (ix_aspect = 1_aspect, 2_aspect ...)
# (ix_point = 1_point, 2_point ...)
for x, y, a in zip ( ix_aspect, ix_point, midpoint ) :
	train.loc [ :, y ] = np.cos ( np.radians ( train.loc [ :, x ].to_numpy ( dtype = float ) - a ) )
	test.loc  [ :, y ] = np.cos ( np.radians ( test .loc [ :, x ].to_numpy ( dtype = float ) - a ) )

train.loc [ :, "13_point" ] = 1
test .loc [ :, "13_point" ] = 1

Discussion 3 answers

Thanks! Thats certainly a lot more advanced technique than what I used. Really helps learning to see what guys like you are doing!

4 Oct 2022, 10:24
Upvotes 0

He he, thanks @SimonGMurray - of course, I am just trying to be clever, better was to fit GBM and use distro features as e.g. @Babawale_Sodiq did. He used a number of nice features, but the one I liked best is the one that simply counts the number of unique geologies. This really packs a nice punch. I did not test it, but suppose that if you have multiple geologies they do not glue nicely and introduce weaknesses. I tried to calculate power exerted in certain directions and so on, a much more physical (as in physics) approach, but the GBM line was more a soft, distro fitting one, mapping observed distros to landslides. Anyhow, just some very opinionated and anecdotal comments. I know you like (C)NN stuff - you must give the worm one a go!

ok cool I will try the worm one... anybody looking for a team mate... DM me!