modify data array
support separated arguments: X and y
support arbitrary dimension of feature vectors
fix function-value computation