building conversion between occurrence matrix and cooccurrence matrix