Added support for ML inputs for optimization
Changed documentation to reflect method logic.