Rory McIlroy has admitted that walking out of last week's Honda Classic was "not the right thing to do".