OAKLAND, Calif. (AP) â€” University of California President Janet Napolitano says a mass shooting in the community around UC Santa Barbara is “almost the kind of event that’s impossible to prevent and impossible to predict.”

The former secretary of Homeland Security who took over as head of the UC system in September made the remarks after a commencement speech in Oakland Saturday, a day after the rampage that authorities say left seven people including the gunman dead and seven others injured. UC Santa Barbara says students were among the victims.

Napolitano issued a statement saying she’s “shocked and deeply saddened” by the shooting and sending thoughts and prayers “to the victims of this tragedy, their families and the entire Santa Barbara community.”