changed root square error to check for bad points (-1, -1) and ignore
them.