Our prediction models hold significant diagnostic implications for clinicians managing patients with cancer receiving a PD-1 or PD-L1 inhibitor. Here, PDCD1 is linked to cancer.