The first modern study of fasting as a treatment for epilepsy was in France in 1911. Twenty epilepsy patients of all ages were "detoxified" by consuming a low-calorie vegetarian diet, combined with periods of fasting and purging. Two benefited enormously, but most failed to maintain compliance with the imposed restrictions. The diet improved the patients' mental capabilities, in contrast to their medication, potassium bromide, which dulled the mind.
Achieving optimal ketosis hinges on finding the right balance of macronutrients (or “macros” in keto-speak); these are the elements in your diet that account for the majority of your calories, a.k.a. energy—namely, fat, protein, and carbohydrates. By the way, it’s often “net grams” of carbohydrates that are counted toward your daily intake; “net” deducts the amount of fiber in a food from its carbohydrate total.