  We introduce \cosha{}: a Code for Stellar properties Heuristic Assignment. In
order to estimate the stellar properties, \cosha{} implements a Gradient Tree
Boosting algorithm to label each star across the parameter space
($T_\mathrm{eff}$, $\log{g}$, $[\mathrm{Fe}/\mathrm{H}]$, and
$[\alpha/\mathrm{Fe}]$). We use \cosha{} to estimate these stellar atmospheric
parameters of $22\,$k unique stars in the MaNGA Stellar Library (MaStar). To
quantify the reliability of our approach, we run both internal tests using the
G\"ottingen Stellar Library (GSL, a theoretical library) and the first data
release of MaStar, and external tests by comparing the resulting distributions
in the parameter space with the APOGEE estimates of the same properties. In
summary, our parameter estimates span in the ranges:
$T_\mathrm{eff}=[2900,12000]\,$K, $\log{g}=[-0.5,5.6]$,
$[\mathrm{Fe}/\mathrm{H}]=[-3.74,0.81]$, $[\alpha/\mathrm{Fe}]=[-0.22,1.17]$.
{We report internal (external) uncertainties of the properties of
$\sigma_{T_\mathrm{eff}}\sim43\,(240)\,$K, $\sigma_{\log{g}}\sim0.2\,(0.4)$,
$\sigma_{[\mathrm{Fe}/\mathrm{H}]}\sim0.16\,(0.24)$,
$\sigma_{[\alpha/\mathrm{Fe}]}\sim0.09\,(0.08)$.} These uncertainties are
comparable to those of other methods with similar objectives. Despite the fact
that \cosha{} is not aware of the spatial distribution of these physical
properties in the Milky Way, we are able to recover the main trends known in
the literature. The catalog of physical properties for MaStar can be accessed
in \url{http://ifs.astroscu.unam.mx/MaStar}.
