Transfer function analysis (TFA) is extensively used to assess human physiological functions. However, extracting parameters from TFA is not usually optimized for detecting impaired function. In this study, we proposed to use data-driven approaches to improve the performance of TFA in assessing blood flow control in the brain (dynamic cerebral autoregulation – dCA). Data were collected from two distinct groups of subjects deemed to have normal and impaired dCA. Continuous arterial blood pressure (ABP) and cerebral blood flow velocity (CBFV) were simultaneously recorded for approximately 10 mins in 82 subjects (including 41 healthy controls) to give 328 labeled samples of the TFA variables. The recordings were further divided into 4,294 short data segments to generate 17,176 unlabeled samples of the TFA variables. We optimized TFA post-processing with a generic semi-supervised learning strategy and a novel semi-supervised stacked ensemble learning (SSEL) strategy for classification into normal and impaired dCA. The generic strategy led to a performance with no significant difference to that of the conventional dCA analysis methods, whereas the proposed new strategy boosted the performance of TFA to an accuracy of 93.3%. To our knowledge, this is the best dCA discrimination performance obtained to date and the first attempt at optimizing TFA through machine learning techniques. Equivalent methods can potentially also be applied to assessing a wide spectrum of other human physiological functions.