  The detection and characterization of filamentary structures in the cosmic
web allows cosmologists to constrain parameters that dictates the evolution of
the Universe. While many filament estimators have been proposed, they generally
lack estimates of uncertainty, reducing their inferential power. In this paper,
we demonstrate how one may apply the Subspace Constrained Mean Shift (SCMS)
algorithm (Ozertem and Erdogmus (2011); Genovese et al. (2012)) to uncover
filamentary structure in galaxy data. The SCMS algorithm is a gradient ascent
method that models filaments as density ridges, one-dimensional smooth curves
that trace high-density regions within the point cloud. We also demonstrate how
augmenting the SCMS algorithm with bootstrap-based methods of uncertainty
estimation allows one to place uncertainty bands around putative filaments. We
apply the SCMS method to datasets sampled from the P3M N-body simulation, with
galaxy number densities consistent with SDSS and WFIRST-AFTA and to LOWZ and
CMASS data from the Baryon Oscillation Spectroscopic Survey (BOSS). To further
assess the efficacy of SCMS, we compare the relative locations of BOSS
filaments with galaxy clusters in the redMaPPer catalog, and find that
redMaPPer clusters are significantly closer (with p-values $< 10^{-9}$) to
SCMS-detected filaments than to randomly selected galaxies.
