Adaptive Resource Allocation for Virtualized Base Stations in O-RAN with Online Learning