It's not necessarily 0 or 1 is it? E.g. a "short espresso" in the early morning hours at least from my sleep tracking / particular (heavy) physiology doesn't make a difference vs when I'm off of caffeine (on weekends usually). I'd start with dropping afternoon coffee and experiment backwards from there.