Spendthrift: Machine learning based resource and frequency scaling for ambient energy harvesting nonvolatile processors | IEEE Conference Publication | IEEE Xplore