Graph Matérn Fields With Applications In Inverse Problems And Machine Learning