Although electrogastrography (EGG) could be a critical tool in the diagnosis and treatment of patients with gastrointestinal (GI) disease, it remains under-utilized. The lack of spatial and temporal resolution using current EGG methods presents a significant roadblock to more widespread usage. Human and preclinical studies have shown that GI myoelectric electrodes can record signals containing significantly more information than can be derived abdominal surface electrodes. The current study sought to assess the efficacy of multi-electrode arrays, surgically implanted on the serosal surface of the GI tract, from gastric fundus to duodenum, in recording myoelectric signals. It also examines the potential for machine learning algorithms to predict functional states, such as retching and emesis, from GI signal features.Studies were performed using ferrets, a gold standard model for emesis testing. Our results include simultaneous recordings from up to six GI recording sites in both anesthetized and chronically implanted free-moving ferrets. Testing conditions to produce different gastric states included gastric distension, intragastric infusion of emetine (a prototypical emetic agent), and feeding. Despite the observed variability in GI signals, machine learning algorithms, including k nearest neighbors and support vector machines, were able to detect the state of the stomach with high overall accuracy (>80%). The present study is the first demonstration of machine learning algorithms to detect the physiological state of the stomach and onset of retching and could provide insight into methodologies to treat GI diseases and control symptoms such as nausea and vomiting.