Vertex and energy reconstruction in JUNO with machine learning methods