I'm new to machine learning so am quite confused with the above concepts. It seems to me both flexibility and complexity measures how well the model fit the data (in terms of the curvy-ness), so what's the difference between the two? In addition, I saw some websites say complexity can be indicated by the number of features in the model; but does 'feature' in this context mean variable, e.g. x and y (two variables), or term, e.g. x and x^2 (two terms), and is it different from 'predictor'? Also, I know flexibility can affect the generalization error, but except that, does flexibility affect any other aspects of model performance? Thanks for answering.