  Complex systems performing spiking dynamics are widespread in Nature. They
cover from earthquakes, to neurons, variable stars, social networks, or stock
markets. Understanding and characterizing their dynamics is relevant in order
to detect transitions, or to predict unwanted extreme events. Here we study the
output intensity of a semiconductor laser with feedback, in a regime where it
develops a complex spiking behavior, under an ordinal patterns analysis. We
unveil that the complex dynamics presents two competing behaviors that can be
distinguished with a thresholding method, and we use temporal correlations to
forecast the extreme events, and transitions between dynamics.
