Dream to Learn is shutting down...

We are very sorry to say that Dream to Learn will be shutting down as of December 28th, 2019. If you have content that you wish to keep, you should make a copy of it before that date.


1COMMENTS1RECOMMENDS

Betti Barcodes for Beginners (or "R Code for your Barcode")

48
POSTED IN: Data Analytics & Visualization Blog

Our Dream to Learn  Data Analytics Community is learning about Topological Data Analysis, and last session were running through a complex data set.  

WIKI > "In algebraic topology, the Betti numbers are used to distinguish topological spaces based on the connectivity of n-dimensional simplicial complexes. For the most reasonable finite-dimensional spaces (such as compact manifolds, finite simplicial complexes or CW complexes), the sequence of Betti numbers is 0 from some points onward (Betti numbers vanish above the dimension of a space), and they are all finite."  see http://en.wikipedia.org/wiki/Betti_number and http://en.wikipedia.org/wiki/Topological_data_analysis 

I was having some trouble getting my head around the higher dimensional concepts, and in particular I did not fully understand how the Betti Barcodes worked.

 So I dove in to the papers, illustrations, and a few videos. 

Watching this nice video a few times really helped me.  On left you can see three tiers/groups of Betti Barcodes - B0 (points); B1(loops); and B2(voids); (end-state maps to slide above) . 

You can see the B0 reducing from many down to one.  Also can see what attributes persist as torus becomes 'stable'

I'll run through the code on our Google hangout next sunday - and probably record session for a Hangout On air (youtube) for anyone that is new/green (like me) and interested in cracking this nut.  the good news is, once you 'get it' - you really 'get it'  :)  - and even if you're not a stats person or data scientist, it's very 'gettable'.  

Images below and this sample R code ( phom package ) help you on your exploration:  https://dreamtolearn.com/doc/DT8DQ0ZQRMRPOA7GSTOKBVULD

Good luck! and feel free to ping me if you have questions - I'll do my best to help.  Caveat that I'm a newbie - so may be some errors in code and in the concepts - so handle with a bit of care :)

Imagine each data point has a little bubble around it.  Now imagine that the bubbles GROW.  Eventually they 'join up' and touch each other.  When that happens, the shape changes and the number of loops, dots, tubes evolves.  The betti barcodes are simply a tracking of this evolution - as the bubbles expand. If the bubbles get big enough, and join up, in most cases you're left with one big lump (Betti 0 = 1)  " epsilon  is now considered the RADIUS OF A CIRCLE # centered at each point in the point cloud. When two circles OVERLAP, this forms a # connection between the two points, as this process is continued, more simplices will # show up with more Betti numbers as well."  Below on Betti 0 Plot each horizontal line corresponds to a point.  

Interested in more content by this author?

About the Author

Ryan Anderson

Ryan Anderson

Hi! I like to play with data, analytics and hack around with robots and gadgets in my garage. Lately I've been learning about machine learning.

About this blog

Description is...<br/>Data Analytics & Visualization Blog - Generating insights from Data since 2013

Created: July 25, 2014

Englishfrançais

Up Next