Hypergraph reconstruction from network data