added Platt's scaling