  Mass and radius are two fundamental properties for characterising exoplanets,
but only for a relatively small fraction of exoplanets are they both available.
Mass is often derived from radial velocity measurements, while the radius is
almost always measured using the transit method. For a large number of
exoplanets, either the radius or the mass is unknown, while the host star has
been characterised. Several mass-radius relations that are dependent on the
planet's type have been published that often allow us to predict the radius.
Our goal is to derive the radius of exoplanets using only observables extracted
from spectra used primarily to determine radial velocities and spectral
parameters. Our objective is to obtain a mass-radius relation independent of
the planet's type. We worked with a database of confirmed exoplanets with known
radii and masses, as well as the planets from our Solar System. Using random
forests, a machine learning algorithm, we computed the radius of exoplanets and
compared the results to the published radii. Our code, Bem, is available
online. The estimated radii reproduces the spread in radius found for high mass
planets better than previous mass-radius relations. The average radius error is
1.8 $R_{\oplus}$ across the whole range of radii from 1-22 $R_{\oplus}$. We
find that a random forest algorithm is able to derive reliable radii,
especially for planets between 4 $R_{\oplus}$ and 20 $R_{\oplus}$ for which the
error is under 25$\%$. The algorithm has a low bias yet a high variance, which
could be reduced by limiting the growth of the forest, or adding more data. The
random forest algorithm is a promising method for deriving exoplanet
properties. We show that the exoplanet's mass and equilibrium temperature are
the relevant properties that constrain the radius, and do so with higher
accuracy than the previous methods.
