  Exoplanetary atmospheric observations require an exquisite precision in the
measurement of the relative flux among wavelengths. In this paper, we aim to
provide a new adaptive method to treat light curves before fitting transit
parameters in order to minimize systematic effects that affect, for instance,
ground-based observations of exo-atmospheres. We propose a neural-network-based
method that uses a reference built from the data itself with parameters that
are chosen in an unsupervised fashion. To improve the performance of proposed
method, K-means clustering and Silhouette criteria are used for identifying
similar wavelengths in each cluster. We also constrain under which
circumstances our method improves the measurement of planetary-to-stellar
radius ratio without producing significant systematic offset. We tested our
method in high quality data from WASP-19b and low quality data from GJ-1214. We
succeed in providing smaller error bars for the former when using JKTEBOP, but
GJ-1214 light curve was beyond the capabilities of this method to improve as it
was expected from our validation tests.
