Parameter and Structure Learning Techniques for Sum Product Networks