A system for ranking alimentary combinations using machine learning, the system comprising:
- a computing device, the computing device configured to:
- receive, from a user device, an affliction relating to a user of the user device;
- generate a nutrient instruction set including a plurality of nutrient quantities, wherein each nutrient quantity in the plurality of nutrient quantities is associated with a subject period, wherein generating the nutrient instruction set further comprises:
- receiving nutrient training data correlating nutrient quantities to amelioration of afflictions;
- training a nutrient machine-learning model as a function of the nutrient training data;
- and
- generating the nutrient instruction set as a function of the nutrient machine-learning model and the affliction;
- derive, as a function of the nutrient instruction set and at least the subject period, a per-combination alimentary instruction set;
- receive, from each alimentary provider device of a plurality of alimentary provider devices, a plurality of provider alimentary combinations;
- generate a ranked list of alimentary combinations as a function of the plurality of provider alimentary combinations and the per-combination alimentary instruction set, wherein generating the ranked list of alimentary combinations comprises:
- determining a nutrient list corresponding to each alimentary combination of the plurality of provider alimentary combinations;
- calculating a distance from the nutrient list to the per-combination alimentary instruction set, wherein the distance comprises a degree of similarity between a vector representing the nutrient list and another vector representing the per-combination alimentary instruction set;
- and
- selecting at least an alimentary list that minimizes the distance;
- identify at least a recommended alimentary combination as a function of the plurality of provider alimentary combinations and the nutrient instruction set, wherein identifying the at least a recommended alimentary combination comprises:
- determining a provider ingredient combination for each provider alimentary combination from the plurality of provider alimentary combinations;
- calculating a provider distance from each provider ingredient combination to the nutrient instruction set;
- comparing the provider distance for each provider alimentary combination to a preconfigured threshold, wherein the preconfigured threshold is set by finding a top quartile of proximity in a series of distance determinations over time, and wherein the series of distance determinations are quantitative values indicating a degree of similarity between the provider distance for each provider alimentary combination to the preconfigured threshold;
- and
- identifying the at least a recommended alimentary combination as a function of the calculated provider distance and the comparison of each provider alimentary combination to the preconfigured threshold;
- and
- display the ranked list and the at least a recommended alimentary combination on the user device.