A rational model of causal inference with continuous causes