An introduction to inverse problems with applications in machine learning