  In nonlinear dynamics, basins of attraction link a given set of initial
conditions to its corresponding final states. This notion appears in a broad
range of applications where several outcomes are possible, which is a common
situation in neuroscience, economy, astronomy, ecology and many other
disciplines. Depending on the nature of the basins, prediction can be difficult
even in systems that evolve under deterministic rules. From this respect, a
proper classification of this unpredictability is clearly required. To address
this issue, we introduce the basin entropy, a measure to quantify this
uncertainty. Its application is illustrated with several paradigmatic examples
that allow us to identify the ingredients that hinder the prediction of the
final state. The basin entropy provides an efficient method to probe the
behavior of a system when different parameters are varied. Additionally, we
provide a sufficient condition for the existence of fractal basin boundaries:
when the basin entropy of the boundaries is larger than $\log 2 $, the basin is
fractal.
