Some parameter Optimization Capability

Can now optimize parameters for regression, although classification is
still broken