runSGD edited to take in a feature extractor function'