  Internal Linear Combination (ILC) methods are some of the most widely used
multi-frequency cleaning techniques employed in CMB data analysis. These
methods reduce foregrounds by minimizing the total variance in the coadded map
(subject to a signal-preservation constraint), although often significant
foreground residuals or biases remain. A modification to the ILC method is the
constrained ILC (cILC), which explicitly nulls certain foreground components;
however, this foreground nulling often comes at a high price for ground-based
CMB datasets, with the map noise increasing significantly on small scales. In
this paper we explore a new method, the partially constrained ILC (pcILC),
which allows us to optimize the tradeoff between foreground bias and variance
in ILC methods. In particular, this method allows us to minimize the variance
subject to an inequality constraint requiring that the constrained foregrounds
are reduced by at least a fixed factor, which can be chosen based on the
foreground sensitivity of the intended application. We test our method on
simulated sky maps for a Simons Observatory-like experiment; we find that for
cleaning thermal Sunyaev-Zel'dovich (tSZ) contamination at $\ell \in
[3000,4800]$, if a small tSZ residual of 20% of the standard ILC residual can
be tolerated, the variance of the CMB temperature map is reduced by at least
50% over the cILC value. We also demonstrate an application of this method to
reduce noise in CMB lensing reconstruction.
