A man has admitted murdering his partner at a house in West Yorkshire.