Filling in missing nutrients using list of ingredients and subset of nutrients on product label
Currently Cronometer has detailed nutrient info for generic foods but for most brand name products it only has nutrient info for the subset of nutrients shown on the product label. However using the subset of nutrient info that we do have, the list of ingredients, and the full nutrient info for raw ingredients, it is possible to calculate the full nutrient info even for brand name product using some linear algebra.
I worked out an example of this here for White Cheddar Cheez-It (which is in NCCDB so it allowed me to check my answer). The 14 by 5 matrix which I've colored in red (which we can call A) contains nutrient data for the subset of nutrients listed on the Cheez-It product label for the ingredients listed on the label, and the column vector in blue (which we can call b) contains the amounts of these nutrients in a single serving of Cheez-It. We can then solve the equation Ax=b for x=(0.03281516, 0.00095824, -0.20663541, 0.46697774, 0.53396558), which gives the amounts of each ingredient in a single serving of Cheez-It. It is then possible to use x to find the amounts of nutrients not listed on the product label, such as magnesium, phosphorus, and manganese (colored in yellow). When I did this, I got 9.5mg of magnesium (compared to 6.1mg for actual Cheez-It), 78mg of phosphorus (compared to 34.2mg for actual Cheez-It), and 0.16mg manganese (compared to 0.2mg for actual Cheez-It). As you can see, the amounts can be off by quite a bit, probably because I had to guess the kind of flour and cheese used. But this still seems better than nothing. (One subtlety is that as the number of ingredients goes up, it becomes harder to ensure that a unique solution exists.)
I'd like to have the process above automated so that if I enter a brand name product (especially in cases where no equivalent generic product exists), it is possible to include info on all nutrients, not just those listed on the product label.
I found one user, robartsd, who did something similar and even made a spreadsheet to make this math easier, but there is still way more friction than I would like.