Paper deep dive
A Comparative Study of Machine Learning Models for Hourly Forecasting of Air Temperature and Relative Humidity
Jiaqi Dong
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 98%
Last extracted: 3/26/2026, 1:46:08 AM
Summary
This study evaluates seven machine learning and deep learning models (XGBoost, Random Forest, SVR, MLP, Decision Tree, LSTM, and CNN-LSTM) for hourly air temperature and relative humidity forecasting in Chongqing, China. Using a unified framework of feature engineering and time-series cross-validation, the results demonstrate that XGBoost significantly outperforms other models, achieving the highest predictive accuracy and robustness.
Entities (4)
Relation Signals (3)
XGBoost â forecasts â Air Temperature
confidence 100% ¡ XGBoost achieves the best overall performance, with a test mean absolute error (MAE) of 0.302 °C for air temperature
XGBoost â forecasts â Relative Humidity
confidence 100% ¡ XGBoost achieves the best overall performance... 1.271% for relative humidity
XGBoost â outperforms â CNN-LSTM
confidence 95% ¡ XGBoost achieves the best overall performance... CNN-LSTM performsworstonthistask
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Accurate short-term forecasting of air temperature and relative humidity is critical for urban management, especially in topographically complex cities such as Chongqing, China. This study compares seven machine learning models: eXtreme Gradient Boosting (XGBoost), Random Forest, Support Vector Regression (SVR), Multi-Layer Perceptron (MLP), Decision Tree, Long Short-Term Memory (LSTM) networks, and Convolutional Neural Network (CNN)-LSTM (CNN-LSTM), for hourly prediction using real-world open data. Based on a unified framework of data preprocessing, lag-feature construction, rolling statistical features, and time-series validation, the models are systematically evaluated in terms of predictive accuracy and robustness. The results show that XGBoost achieves the best overall performance, with a test mean absolute error (MAE) of 0.302 °C for air temperature and 1.271% for relative humidity, together with an average R2 of 0.989 across the two forecasting tasks. These findings demonstrate the strong effectiveness of tree-based ensemble learning for structured meteorological time-series forecasting and provide practical guidance for intelligent meteorological forecasting in mountainous cities.
Tags
Links
- Source: https://arxiv.org/abs/2603.23282v1
- Canonical: https://arxiv.org/abs/2603.23282v1
Trouble viewing inline? Open PDF directly â
Full Text
26,768 characters extracted from source content.
Expand or collapse full text
ď AbstractâAccurateshort-termforecastingofair temperatureandrelativehumidityiscriticalforurban management,especiallyintopographicallycomplexcitiessuch asChongqing,China.Thisstudycomparessevenmachine learningmodels:eXtremeGradientBoosting(XGBoost), RandomForest,SupportVectorRegression(SVR),Multi-Layer Perceptron(MLP),DecisionTree,LongShort-TermMemory (LSTM)networks,andConvolutionalNeuralNetwork (CNN)-LSTM(CNN-LSTM),forhourlypredictionusing real-worldopendata.Basedonaunifiedframeworkofdata preprocessing,lag-featureconstruction,rollingstatistical features,andtime-seriesvalidation,themodelsare systematicallyevaluatedintermsofpredictiveaccuracyand robustness.TheresultsshowthatXGBoostachievesthebest overallperformance,withatestmeanabsoluteerror(MAE)of 0.302°Cforairtemperatureand1.271%forrelativehumidity, togetherwithanaverageR²of0.989acrossthetwoforecasting tasks.Thesefindingsdemonstratethestrongeffectivenessof tree-basedensemblelearningforstructuredmeteorological time-seriesforecastingandprovidepracticalguidancefor intelligentmeteorologicalforecastinginmountainouscities. I.I NTRODUCTION Accurateshort-termforecastingisofgreatsignificancefor safeguardingthesafeoperationofcities,improvingthe efficiencyofpublicservices,andrespondingtoextreme weatherevents.Amongvariousmeteorologicalelements,air temperatureandrelativehumidityarekeyindicatorsreflecting thethermalandwatervaporstatusofthenear-surface atmosphere,andtheirhourlyvariationsdirectlyaffectenergy loadscheduling,trafficmanagement,agriculturalactivities, humancomfort,andpublichealth.Asatypical mountain-valleycityinsouthwestChina,Chongqinghas complexlocalcirculationsduetoitsspecialtopographyand subtropicalmonsoonclimate.Thisposesgreatchallengesfor traditionalnumericalweatherpredictionmodelsincapturing thehighspatiotemporalresolutionevolutioncharacteristicsof temperatureandhumidity. Inrecentyears,withthecontinuousimprovementof meteorologicalobservationnetworksandtherapid developmentofbigdatatechnology,machinelearning methodsdrivenbyhistoricalobservationdatahaveprovideda newsolutionforshort-termmeteorologicalforecasting[1],[2]. Comparedwithtraditionalmodelsrelyingonphysical equations,data-drivenmodelscanautomaticallylearn nonlineardynamicrelationshipsfrommassivetime-seriesdata andachieveefficientandlow-costprediction.Arangeof machinelearninganddeeplearningmodelshasshownstrong potentialinthisfield.Forexample,eXtremeGradient Boosting(XGBoost)[3]hasdemonstratedhighaccuracyand JiaqiDongiswiththeMacaoPolytechnicUniversity,Macau,China, (correspondingauthor;e-mail:jiaqidong377@gmail.com). robustnessforstructuredtabulardata,LongShort-Term Memory(LSTM)networks[4]arewellsuitedforcapturing long-termtemporaldependencies,andConvolutionalNeural Network(CNN)-LSTM(CNN-LSTM)architectures[5]aim tocombinelocalfeatureextractionwithsequentialmodeling forcomplexenvironmentalforecastingtasks. Usinghourlyobservationsofairtemperatureandrelative humidityinChongqingfromSeptember9,2024,toJanuary13, 2026,thisstudyconductsasystematiccomparisonofmultiple forecastingmodels,includingclassicshallowmodels(e.g., SupportVectorRegression(SVR),DecisionTree(DT)), ensemblemethods(e.g.,RandomForest,XGBoost),and advanceddeeplearningarchitectures(LSTM,CNN-LSTM). Bydesigningrationalfeatureengineeringstrategiessuchas lagfeatures,slidingstatisticalwindows,andperiodicencoding, andadoptingarigoroustime-seriescross-validation frameworktoevaluatemodelperformance,thisstudyaimsto screenoutthehigh-precisionshort-termtemperatureand humidityforecastingschememostsuitableforChongqing underitscomplexgeographicalandclimaticbackground.The resultsprovideapracticalreferenceforintelligent meteorologicalpredictioninmountaincitieswithcomplex geographicalandclimaticbackgrounds. I.DATASET Thedatausedinthisstudywereobtainedfrompublicly accessiblewebsiteshttps://w.visualcrossing.com.Data consistsofhourlymeteorologicalobservationrecordsof ChongqingfromSeptember9,2024,toJanuary13,2026, coveringacompleteseasonalcyclewithfavorable representativenessandseasonaldiversity.Thedatasetincludes keymeteorologicalvariables:airtemperature(0~40°C)witha bimodalprobabilitydensitydistribution(peaksat15-20°C and25-30°C)andrelativehumiditywitharight-skewed distribution(peakat80%-100%),consistentwithChongqing's "mountaincity"and"fogcity"characteristics.Inaddition,the datasetcontainsauxiliaryvariablessuchasprecipitation (precip),windspeed(windspeed),sealevelpressure,cloud cover,andsolarradiation,togetherforminga multi-dimensionalandhigh-resolutionmeteorological observationsystem.Exploratorytimeseriesanalysisreveals thatairtemperaturepresentsdistinctannualperiodicityand diurnalvariationpatterns,whereashumidityshowsstrong short-termvolatilityandiscloselycorrelatedwith precipitationevents.AsshowninFig.1andFig.2,thetwo targetvariablesexhibitnotablydifferentdistributional characteristics.Thetemperaturehistogramshowsabroadand non-uniformdistribution,withapronouncedconcentrationin thelower-temperaturerangeandagradualspreadacross highervalues.Incontrast,therelativehumidityhistogramis stronglyright-skewed,indicatingthathigh-humidity conditionsoccurmostfrequently. AComparativeStudyofMachineLearningModelsforHourly ForecastingofAirTemperatureandRelativeHumidity JiaqiDong Figure1.Frequencydistributionplotofhourlytemperatureobservations. Figure2.Frequencydistributionplotofhourlyrelativehumidity. I.METHODOLOGY Basedonthehourlymeteorologicalobservationdatasetof ChongqingfromSeptember9,2024,toJanuary13,2026,this studyconductsacomparativeexperimentacrossmultiple forecastingmodels.Toensurethatallmodelsareevaluatedon aunifiedandreliablebasis,asystematicworkflowconsisting ofdatapreprocessing,featureengineering,modelconstruction, andperformanceevaluationwasimplemented. A.DataPreprocessing Firstly,the"datetime"fieldisparsedintotimestamps,and therecordsarestrictlysortedinchronologicalordertoensure thetemporalconsistencyofthetimeseries.Forthepossible fewmissingvaluesinthedata,acombinationofforward fillingandbackwardfillingwasadoptedtomaintain continuityinthehourlysequence.Subsequently,apreliminary statisticalcheckisconductedonallvariables,andobvious outlierscausedbysensormalfunctionsortransmission anomalies(suchasnegativehumidityandabnormal temperatures)areremoved.Eventually,ahigh-quality observationsequencewithacompletestructureandphysical rationalityisformed,providingreliableinputforsubsequent modeling. Tofurtherexaminetherelationshipsamong meteorologicalvariables,Pearsoncorrelationcoefficients werecomputedforallvariablesandvisualizedusinga correlationheatmap,asshowninFig.3.Theresultsreveal severalcleardependenciesamongthevariables,particularly thestrongnegativecorrelationbetweentemperatureand sea-levelpressure,thenegativecorrelationbetween temperatureandhumidity,andthepositivecorrelationsof humiditywithcloudcoverandsea-levelpressure. B.FeatureEngineering Basedonaunifieddatafoundation,thispaperconstructsa compositefeaturesystemfortimeseriespredictionaroundthe predictiontarget.Specifically,foreachtargetvariable,two typesoftimeseriesderivedfeaturesaresystematically Figure3.Weatherfeaturecorrelationheatmap. generated:lagfeatures,whichintroducehistorical observationsfrom2,3,6,12,and24hoursagotocapturethe short-termautoregressivedependenciesofthevariableitself; androllingstatisticsfeatures,whichcalculatethemoving averageandstandarddeviationwithwindowlengthsof3,6, 12,and24hourstorepresentlocaltrendchangesandvolatility intensity. Inaddition,theoriginalauxiliarymeteorologicalvariables, includingprecipitation,windspeed,sea-levelpressure,cloud cover,andsolarradiation,wereretainedasexternalcovariates. Aftercombiningallderivedfeatureswiththeoriginal variables,ahigh-dimensionalinputrepresentationwas obtained.Becauselagandrollingoperationsinevitably producemissingvaluesatthebeginningoftheseries,the correspondingsampleswereremovedtoensureacomplete modelingdataset.Thisfeature-engineeringschemecaptures temporaldependence,localdynamics,andmultivariable coupling,andprovidesacommoninformationbasisforall forecastingmodelsconsideredinthisstudy. C.ModelConstruction Tocomparedifferentlearningparadigmsforhourly forecasting,thisstudyconstructedsevenmodels:SVR, MultilayerPerceptron(MLP),RandomForest(RF),DT, LSTM,CNN-LSTM,andXGBoost.Sincethetaskinvolves predictingtwotargetvariables,airtemperatureandrelative humidity,simultaneously,differentmulti-outputstrategies wereadoptedaccordingtomodelcharacteristics. MultiOutputRegressorwasusedforSVRandXGBoost, whereasDT,RF,andMLPwereimplementeddirectlyfor dual-targetregression.ForLSTMandCNN-LSTM,the outputlayercontainedtwoneurons.Theinputfeaturesfor eachmodelincludedrawmeteorologicalvariablesaswellas theirderivedlagfeatures(2-24hours)androllingstatistics (meanandstandarddeviationwithawindowof3-24hours), whichfullycharacterizetheautocorrelationandlocal dynamiccharacteristicsofthetimeseries.Forthesemachine learningmodels,hyperparameterswereoptimizedusinggrid searchcombinedwithtime-seriescross-validation TimeSeriesSplit(í=5)toavoidtemporalinformationleakage, andtheaverageRMSEofthetwotargetswasusedformodel selection. a)SupportVectorRegression(SVR) TheSVRmodelwasadoptedasakernel-basednonlinear regressionmodel.SincethestandardSVRimplementation doesnotnativelysupportmulti-outputregression,itwas wrappedwithMultiOutputRegressor.Themodeladoptedthe RadialBasisFunction(RBF)asthekernelfunction,and systematicallyoptimizedthekeyhyperparameters,including theregularizationparameterCâ0.1,1,10,100,thekernel coefficientÎłâ0.001,0.01,0.1,1,andtheinsensitiveloss tubewidthÎľ â 0.01,0.1,0.2. b)Multi-LayerPerceptron(MLP) MLPwasimplementedusingMLPRegressortomodel nonlinearrelationshipsbetweenthemultipleinputvariables andthetwotargetvariables.Themodelwastrainedusingthe Adamoptimizerandemployedanearlystoppingmechanism topreventoverfittingandimprovegeneralization.Formodel optimization,varioushyperparameterconfigurationswere explored:Thehidden-layerstructurewasvariedamong[50], [100],[50,50],and[100,100];theL2regularization coefficientÎąwasselectedfrom0.0005,0.001,0.002;and thelearningratewasselectedfrom0.001,0.005,0.01,with themaximumiterationnumbersetto1500.Hyperparameter tuningwasperformedusingagridsearchstrategy. c)RandomForest(RF) RFwasimplementedusingRandomForestRegressorasan ensemblemodelbasedonbagging.Byaggregatingmultiple decisiontrees,itimprovesrobustnessandreducesoverfitting comparedwithasingle-treemodel.Intermsofmodel optimization,agridsearchcombinedwithtimeseries cross-validationwasappliedtoperformThemaintuned hyperparametersincludedthenumberoftrees (n_estimators â 10,50,100),themaximumproportionof featuresconsideredforeachsplit (max_features â 0.3,0.5,0.7),theminimumnumberof samplesrequiredforaleafnode(min_samples_leafâ1,2,4), andwhetherbootstrapsamplingisenabled(True,False). d)DecisionTree(DT) DTwasimplementedusingDecisionTreeRegressorasa baselinenonlinearmodel.Itrecursivelypartitionsthefeature spacetominimizepredictionerror,butismoreproneto overfittingthanensemblemethods.Tosomehowenhancethe generalizationabilityofthemodelandpreventoverfitting,a gridsearchwasperformedtooptimizethekey hyperparameters,includingthemaximumdepth(max_depthâ 3,5,7,10),theminimumnumberofsamplesrequiredfora leafnode(min_samples_leafâ1,2,4),thesplittingcriterion (criterionâ'squared_error','friedman_mse'),andthe maximumnumberoffeaturesconsideredforeachsplit (max_features â 'sqrt','log2',None). e)LongShort-TermMemory(LSTM) AsanimprovedarchitectureofRecurrentNeural Networks(RNNs),LSTMeffectivelymitigatesthegradient vanishingproblembyintroducingagatingmechanism, enablingittocapturelong-termdependenciesanddynamic patternsinmeteorologicaltimeseries.Themodelinputsare multivariatetimeseriessegmentsconstructedviaasliding window,whereeachtimestepincorporatesfeaturesincluding airtemperature,humidity,precipitation,windspeed,sealevel pressure,cloudcover,andsolarradiation;theoutputlayer consistsoftwoneurons,correspondingtothepredictedvalues ofairtemperatureandhumidityatfuturetimesteps, respectively. Intermsofmodeloptimization,theLSTMarchitectures comprisingdifferentnumbersofhiddenlayers1,2with50 or100units,coupledwiththeReLUactivationfunction,were evaluated.TheAdamoptimizerwasemployedforthetraining process,withtheinitiallearningratesetto0.001.Additionally, anearlystoppingmechanismwasenabled:trainingis terminatedwhenthevalidationlossfailstoimprovefor10 consecutiveiterations,therebypreventingoverfitting. f)CNN-LSTM Ahybriddeeplearningarchitecture,ConvolutionalNeural NetworkâLongShort-TermMemory(CNN-LSTM),was constructedformulti-steppredictionofairtemperatureand relativehumidity.Thismodelcombinesthelocalfeature extractioncapabilityofCNNwiththetimeseriesmodeling advantagesofLSTM:first,aone-dimensionalconvolutional layer(1D-CNN)actsonthemultivariatetimeseriesinputs constructedbyaslidingwindow,automaticallyextracting localpatternsandkeytemporalfeaturesofeachvariableinthe timedimension;subsequently,theLSTMlayerperforms dynamicmodelingonthehigh-dimensionalfeaturesequences outputbytheconvolution,effectivelycapturinglong-term dependencies.Finally,thefullyconnectedlayermapsthe hiddenstateoftheLSTMtoadual-targetoutput(air temperatureandhumidity). Aftermodeloptimizationwiththegridsearchstrategy,the chosenCNN-LSTMarchitectureconsistsofa one-dimensionalconvolutionallayerwith32filtersanda kernelsizeof3,followedbyanLSTMhiddenlayerwith50 unitsandaReLUactivationfunction.TheAdamoptimizer (initiallearningrateof0.001)wasadoptedforthetraining process,andanearlystoppingmechanismwasenabled: trainingisterminatedwhenthevalidationlossdoesnot improvefor10consecutiveiterations. g)eXtremeGradientBoosting(XGBoost) Asahighlyefficientensemblelearningmethodbasedon GradientBoostingDecisionTrees(GBDT),XGBoost constructsmultipleweaklearners(regressiontrees)inaserial mannerandcontinuouslycorrectsresiduals.Endowedwiththe advantagesofhighpredictionaccuracy,strongrobustness,and abuilt-inregularizationmechanism,itisparticularlysuitable forprocessinghigh-dimensionalandnonlinearmeteorological data.Torealizethejointpredictionfordualtargets,the XGBoostregressorwasencapsulatedwith MultiOutputRegressorinthisstudy,enablingthemodelto outputthepredictedvaluesofairtemperatureandrelative humiditysynchronously. Intermsofmodeloptimization,gridsearchcombinedwith timeseriescross-validationwasadopted.Thesearchspace coveredthenumberoftrees(n_estimatorsâ10,50,100), themaximumtreedepth(max_depth â 3,5,7),thelearning rate(learning_rate â 0.01,0.1,0.2),thesubsampleratio (subsample â 0.7,0.9),thecolumnsampleratiopertree (colsample_bytreeâ0.7,0.9),andtheminimumloss reductionrequiredforasplit(gammaâ0,0.1,0.2). D.ModelEvaluation Allmodelswereevaluatedforperformanceonboththe trainingsetandthetestset.Fourquantitativemetricswere employed,withthearithmeticmeancalculatedforthescores ofthetwooutputvariables(airtemperatureandrelative humidity):meanabsoluteerror(MAE);rootmeansquareerror (RMSE);coefficientofdetermination(R²);andmeanabsolute percentageerror(MAPE).Toensurenumericalstability,an infinitesimalconstant(Îľ=np.finfo(np.float64).eps)was introducedintheMAPEcalculationtoavoiddivision-by-zero errors.Inaddition,visualdiagnosticmethodswereadoptedto supporttheevaluation,includingtimeseriescomparisonsand scatterplotsofpredictedandactualvaluesforqualitative analysisofpredictionperformance. E.ImplementationDetails TheexperimentalenvironmentwasbuiltonPython3.9. Conventionalmachinelearningmodels,includingRF,SVR, MultilayerPerceptron,andDT,wereimplementedusing scikit-learn,whileXGBoostwasimplementedusingthe XGBoostlibrarywithascikit-learn-compatibleinterface. TheirhyperparameterswereoptimizedusingGridSearchCV combinedwithTimeSeriesSplit( í =5),withn_jobs=-1 enabledforparallelcomputation.Thedeeplearningmodels, namelyLSTMandCNN-LSTM,wereimplementedin TensorFlow/Keras.Modelsweretrainedusingachronological 80/20split,wherethefirst80%ofthesampleswereusedfor trainingandtheremaining20%fortesting.Allfiguresand chartsweregeneratedusingMatplotlibandSeaborntoolkits. IV.RESULTS A.OverallModelPerformance Thisstudysystematicallyevaluatestheperformanceof sevenmachinelearninganddeeplearningmodelsforair temperatureandrelativehumidityprediction.Asshownin TableI,fortheairtemperaturepredictiontask,theXGBoost modelachievesthebestperformance,withatestMAEof 0.302°C,RMSEof0.393°C,R²of0.995,andMAPEofonly 2.884%,significantlyoutperformingothermodels.TheSVR modelrankssecond,withatestR²of0.994,showing performanceclosetothatofXGBoost.MLPandRFalso performwell,althoughRFshowsagreaterdropintest performance,suggestingsomeoverfitting.Incontrast,DTand LSTMproducenoticeablylargertesterrors.CNN-LSTM performsworstonthistask,withatestMAEof3.230°Cand anR²ofonly0.526,indicatingthatthecurrenthybrid architecturedoesnotadaptwelltothestructureandscaleof thespatiotemporalfeaturesinthepresentdataset. Fortherelativehumiditypredictiontask(seeTableII), XGBoostagaindemonstratesthestrongestgeneralization ability,withatestMAEof1.271%,RMSEof2.116%,R²of 0.984,andMAPEofonly1.675%.TheSVRmodelalso performsexcellently,withatestR²of0.979,slightlyinferior toXGBoost,followedbyMLPandRF.AlthoughRF maintainsrelativelyhighpredictiveaccuracy,itslargerRMSE suggestslowerstabilitythanXGBoost.DTremainsthe weakestconventionalmodelforhumidityforecasting,witha testMAEof4.473%andanR²of0.875.LSTMoutperforms DTbutstilllagsbehindthebesttree-basedandkernel-based methods.CNN-LSTMyieldsmoderatehumidityperformance, butitremainsclearlyinferiortoXGBoostandSVR,further indicatingthatitsstructuremaynotfullyadapttothedynamic characteristicsofhumidityvariations. TableIIIsummarizestheaverageperformanceofeach modelacrossthetemperatureandhumiditytasks.XGBoost ranksfirstforallaveragedmetrics,withatestMAEof0.787, RMSEof1.254,R²of0.989,andMAPEof2.280%,indicating thestrongestoverallpredictivecapability.SVRfollows closely,whileMLPalsoremainscompetitive.Incontrast, CNN-LSTMshowstheweakestoverallperformance,withan averagetestMAEof3.278,R²of0.731,andMAPEof 18.215%.Overall,theresultssuggestthatXGBoostprovides themosteffectivebalanceofpredictiveaccuracyand robustnessforthepresentmultivariatemeteorological forecastingtask. TABLEI.P ERFORMANCE C OMPARISONOF M ODELSONTHE T EMPERATURE P REDICTION T ASK Model TemperaturePredictionMetrics TestMAETestRMSETestR²TestMAPE SVR0.3070.4150.9943.002% MLP0.3900.5120.9913.615% RF0.6300.8770.9745.852% DT1.7002.2220.83415.396% LSTM1.5201.9090.87717.060% CNN-LSTM3.2303.7520.52632.403% XGBoost0.3020.3930.9952.884% TABLEII.PERFORMANCECOMPARISONOFMODELSONTHE HUMIDITYPREDICTIONTASK Model HumidityPredictionMetrics TestMAETestRMSETestR²TestMAPE SVR1.5642.3780.9791.971% MLP1.5332.3030.9811.930% RF1.7332.7210.9732.237% DT4.4735.8260.8755.480% LSTM2.5803.0630.9663.000% CNN-LSTM3.3274.1800.9364.027% XGBoost1.2712.1160.9841.675% TABLEIII.A VERAGEPERFORMANCEMETRICSOFTEMPERATUREAND HUMIDITYPREDICTIONTASKS Model AverageMetrics TestMAETestRMSETestR²TestMAPE SVR0.9361.3970.9872.487% MLP0.9621.4070.9862.773% RF1.1821.7990.9734.044% DT3.0864.0240.85410.438% LSTM2.0502.4860.92110.030% CNN-LSTM3.2783.9660.73118.215% XGBoost0.7871.2540.9892.280% Figure4.TimeseriescomparisonofactualandpredictedtemperatureonthetestsetbyXGBoost. B.VisualAnalytics Thevisualizationresultsfurtherillustratethepredictive performanceoftheXGBoostmodelonhourlymeteorological datainChongqing.Fig.4illustratesthetimeseries comparisonfortheXGBoostmodelonthetestset,wherethe predictedtemperaturecurve(purple)closelytrackstheactual observations(blue).Themodelcapturesboththebroader coolingtrendfromOctobertoJanuaryandtheshort-term variationsinthedata.Thestrongagreementbetweenthe predictedandobservedcurvessuggeststhatXGBoostcan effectivelylearnthetemporalvariationpatternsof temperature. ThescatterplotsinFig.5andFig.6furthersupportthe strongpredictiveperformanceofXGBoostforboth temperatureandhumidity.InFig.5,thepredictedtemperature valuesaretightlydistributedaroundtheideal1:1line,with onlylimiteddispersion,indicatinghighpointwiseagreement betweenpredictionsandobservations.Similarly,Fig.6shows thatthepredictedhumidityvaluesalsoclustercloselyaround thediagonalreferenceline,demonstratingstrongpredictive consistencyacrosstheobservedhumidityrange.Thesevisual resultsareconsistentwiththequantitativemetricsreportedin TablesIandII,whereXGBoostachievesthebestoveralltest performance,includingthelowestMAEandRMSE,andthe highestR²amongallcomparedmodels.Forcomparison,Fig. 9andFig.10presentthecorrespondingscatterplotsfor CNN-LSTM.RelativetoXGBoost,theCNN-LSTM predictionsexhibitnoticeablylargerdispersionfromthe1:1 line,especiallyfortemperature,indicatingweakerpointwise agreementandlowerpredictiveaccuracy.Thisobservationis consistentwiththequantitativeresultsinTablesIâI,where CNN-LSTMshowssubstantiallypoorertestperformancethan XGBoostandtheothercompetitivebaselines. Overall,thevisualandquantitativeresultsconsistently indicatethatXGBoostprovidesthestrongestoverall performanceforthedual-targetforecastingtaskconsideredin thisstudy.WhereasCNN-LSTMshowsclearlyweaker generalizationperformanceunderthecurrentexperimental setting. Figure5.Scatterplotofactualversuspredictedtemperatureonthetestset withtheideal1:1line(XGBoost). Figure6.Scatterplotofactualversuspredictedhumidityonthetestset withtheideal1:1line(XGBoost). Figure7.Scatterplotofactualversuspredictedtemperatureonthetestset withtheideal1:1line(CNN-LSTM) Figure8.Scatterplotofactualversuspredictedhumidityonthetestset withtheideal1:1line(CNN-LSTM) V.DISCUSSION TheresultsofthisstudyindicatethatXGBoostachieves thebestperformanceacrossallquantitativemetricsforboth temperatureandhumidityforecastingusinghourly meteorologicaldatafromChongqing.Itsstronggeneralization abilityislikelyrelatedtoitseffectivenessinhandling nonlinearrelationships,heterogeneousfeatures,andrelatively high-dimensionalstructuredinputs,whilemaintaining resistancetooverfitting.Thisfindingisbroadlyconsistent withpreviousstudiesshowingthecompetitivenessof boosting-basedmodelsindata-drivenpredictiontasksinother domains,e.g.,[6],[7].Bycontrast,inconsistentwith[8],[9], thedeeplearningmodelsconsideredhere,LSTMand CNN-LSTM,donotoutperformensemblemethodsinthis studyunderthecurrentdatascaleandmodelingsetup. CNN-LSTMperformstheworst,asitstemporalfeature extractionabilityislimitedbythecurrentnetworkstructure anddatascale,whichalignswiththefindingthatsuch architecturesneedlargerdatasetsormoresophisticatedtuning tosurpasssimplermodels[10]. Thevisualanalysisfurthersupportsthequantitativeresults. TheXGBoosttime-seriesandscatterplotsshowstrong agreementbetweenpredictionsandobservationsforboth temperatureandhumidity.Incontrast,theCNN-LSTMscatter plotsexhibitnoticeablylargerdispersionfromtheideal1:1 line,particularlyfortemperatureprediction,whichis consistentwithitssubstantiallylowerR²andlargertesterrors. Thesefindingssuggestthattheadditionalmodelcomplexity ofCNN-LSTMdoesnotnecessarilytranslateintoimproved forecastingperformanceinthepresenttask. Fromapracticalperspective,XGBoostcanbe recommendedasaneffectivemodelforshort-term meteorologicalforecastingwhenpredictiveaccuracyand robustnessaretheprimaryobjectives.SVRandMLPalso providecompetitivealternatives,whileRFremainsauseful baseline.Futureworkmayfurtherinvestigateimproveddeep learningarchitectures,incorporatespatialinformationfrom neighboringstations[9],[11],andexplorephysics-informed machinelearning[12]andsemi-supervisedlearning techniques[13]toenhancegeneralizationandinterpretability inmeteorologicalforecasting. VI.CONCLUSION Thisstudycomparedsevenmachinelearninganddeep learningmodelsforhourlyforecastingofairtemperatureand relativehumidityinChongqing,amountainouscitywith complexmicroclimaticconditions.Theresultsshowthat XGBoostachievesthebestoverallpredictiveperformance acrossallquantitativemetrics,withatestMAEof0.302°C fortemperatureand1.271%forhumidity,andanaverageR² of0.989.Thevisualresultsareconsistentwiththe quantitativeevaluation,showingstrongagreementbetween XGBoostpredictionsandtheactualobservations,while CNN-LSTMexhibitssubstantiallylargerdeviationsand weakeraccuracyunderthecurrentexperimentalsetting. Overall,XGBoostprovidesthemosteffectivesolutionforthe dual-targetforecastingtask.Futureworkwillfocuson improveddeeplearningarchitectures,theincorporationof spatialinformationfromneighboringstations[9],[11],and physics-informedforecastingapproaches[12].Inaddition, semi-supervisedlearningmaybeexploredtoaddressthe limitedavailabilityoflabeledmeteorologicaldataandto bettercapturespatiotemporalcorrelations[13]. REFERENCES [1]S.Feng,X.Gong,andY.Zeng,âMachinelearningmethodsfor sub-seasonaltoseasonalpredictionoftemperatureandprecipitation overChina,âAdvancesinAtmosphericSciences,vol.38,no.9,p. 1455â1470,Sep.2021. [2]H.V.Moosavi,M.R.Delavar,andA.Mohammadzadeh,âA comparativestudyofmachinelearningmodelsforshort-termair temperatureforecasting,âAtmosphericResearch,vol.228,p. 243â256,Oct.2019. [3]T.ChenandC.Guestrin,âXGBoost:Ascalabletreeboostingsystem,â inProc.22ndACMSIGKDDInt.Conf.Knowl.Discov.DataMin.,San Francisco,CA,USA,Aug.2016,p.785â794. [4]S.HochreiterandJ.Schmidhuber,âLongshort-termmemory,âNeural Computation,vol.9,no.8,p.1735â1780,Nov.1997. [5]M.A.DePinto,M.L.DelleMonache,andS.Speranza,âHybrid CNN-LSTMmodelforshort-termweatherforecasting,âinProc.Int. Conf.Comput.Sci.Comput.Intell.,Dubai,UAE,Dec.2020,p. 112â117. [6]Y.Dong,K.Chen,andZ.Ma,"ComparativeStudyon Semi-SupervisedLearningAppliedforAnomalyDetectionin HydraulicConditionMonitoringSystem,"inProc.IEEEInt.Conf. Syst.,Man,Cybern.(SMC),Honolulu,Oahu,HI,USA,2023,p. 1702â1708,doi:10.1109/SMC53992.2023.10394193. [7]Y.Dong,K.Chen,Y.Peng,andZ.Ma,"ComparativeStudyon SupervisedversusSemi-supervisedMachineLearningforAnomaly DetectionofIn-vehicleCANNetwork,"inProc.IEEE25thInt.Conf. Intell.Transp.Syst.(ITSC),Macau,China,2022,p.2914â2919,doi: 10.1109/ITSC55140.2022.9922235. [8]B.Wang,J.Lu,Z.Wang,andG.Zhang,âAsurveyondeeplearningfor timeseriesforecasting,âNeurocomputing,vol.451,p.116â137,Sep. 2021. [9]Y.Huang,Y.Dong,Y.Tang,andL.Li,"ParkingAvailability PredictionviaFusingMulti-SourceDatawithASelf-Supervised LearningEnhancedSpatio-TemporalInvertedTransformer,"arXiv preprintarXiv:2509.04362,Sep.2025.[Online].Available: https://doi.org/10.48550/arXiv.2509.04362 [10]Y.LeCun,Y.Bengio,andG.Hinton,âDeeplearning,âNature,vol.521, no.7553,p.436â444,May2015. [11]Y.Huang,Y.Dong,Y.Tang,andL.Li,âLeveragemulti-sourcetraffic demanddatafusionwithtransformermodelforurbanparking prediction,âinProc.28thInt.Conf.HongKongSoc.Transp.Stud. (HKSTS),2024,preprintavailableathttps://arxiv.org/abs/2405.01055. [12]A.Karpatneetal.,âTheory-guideddatascience:Anewparadigmfor scientificdiscoveryfromdata,âIEEETrans.Knowl.DataEng.,vol.29, no.10,p.2318â2331,Oct.2017. [13]Y.Huang,Y.Dong,Y.Tang,andA.GarcĂa-Hernandez,âA self-supervisedtransformerforunusablesharedbikedetection,âin 2025IEEE28thInt.Conf.Intell.Transp.Syst.(ITSC),GoldCoast, Australia,2025,p.577â582,doi: 10.1109/ITSC60802.2025.11423728.