Returns Map holding the values and frequencies as arrays with keys "values" and "frequencies"
the Map