Energetic particles of galactic and solar origin charge the metal free-falling testmasses (TMs) of the interferometers for gravitational wave detection in space.The deposited charge couples with stray electric fields thus generating spuri-ous Coulomb forces between the TMs and the electrode housing that limit theinterferometer sensitivity. Long-term and short-term galactic cosmic-ray varia-tions are strongly energy-dependent and the TM charging varies with particleenergy distribution. We propose two different approaches involving Monte Carlosimulations and machine learning models to study the recurrent modulationof energy spectra of galactic particles ascribable to the passage of high-speedsolar wind streams. The transit of interplanetary counterparts of coronal massejections modifies the effects of high-speed streams. This work aims at betterunderstanding the energy-dependence of galactic cosmic-ray short-term varia-tions for the Laser Interferometer Space Antenna (LISA), the first interferometerfor gravitational wave detection in space, starting from lessons learned with LISAPathfinder. The outcomes of our models will be used to assess the TM chargingduring the time LISA will remain in orbit around the Sun.