A model for automatic generation of multi-partite graphs from arbitrary data