This application relates to the field of carpooling demand prediction technology, and particularly to a method, device, electronic device, and storage medium for predicting carpooling demand. The method includes: constructing a feature
tensor set based on historical order data, meteorological parameters, and regional static
feature data; transforming the target low-dimensional statistical features into target high-dimensional semantic features; and mapping the target high-dimensional semantic features to a target
orthogonal subspace to generate a
feature set that eliminates redundant temporal correlations. The
feature set is then used to optimize the hyperparameters of a pre-constructed
ensemble learning gradient boosting tree model until an iteration stopping condition is met, thus constructing a carpooling demand prediction model. This model outputs carpooling demand. This solves the problem that related technologies fail to couple the temporal and spatial dependencies of passenger travel demand, and that the prediction models are sensitive to hyperparameters, making it difficult to adapt to unconventional scenarios and output accurate carpooling demand.