SUMMARYThis paper presents a new data mining method that integrates adaptive B-spline regression and traffic flow theory to develop multi-regime traffic stream models (TSMs). Parameter estimation is implemented adaptively and optimally through a constrained bi-level programming method. The slave programming determines positions of knots and coefficients of the B-spline by minimizing the error of B-spline regression. The master programming model determines the number of knots through a regularized function, which balances model accuracy and model complexity. This bi-level programming method produces the best fitting to speed-density observations under specific order of splines and possesses great flexibility to accommodate the exhibited nonlinearity in speed-density relationships. Jam density can be estimated naturally using spline TSM, which is sometimes hardly obtainable in many other TSM. Derivative continuity up to one order lower than the highest spline degree can be preserved, a desirable property in some application. A five-regime B-spline model is found to exist for generalized speed-density relationships to accommodate five traffic operating conditions: free flow, transition, synchronized flow, stop and go traffic, and jam condition. A typical two-regime B-spline form is also explicitly given, depending only on free-flow speed, optimal speed, optimal density, and jam density.