| Although the technology of air detection equipment is constantly being updated,the current air detection equipment still has problems such as low accuracy,poor robustness,and no equipment failure detection.With a series of new algorithms and models such as machine learning,deep learning and artificial intelligence continuously applied in new fields,how to effectively improve the recognition algorithms in traditional air detection equipment and the fault detection of gas sensor arrays has become a hot spot for in-depth research.This paper first focuses on the machine learning algorithm used in air detection technology,selects the representative KNN algorithm,and conducts algorithm improvement research.In the current application of the KNN algorithm,the air quality sample data set has a very serious sample tilt problem,and the difference between the number of positive and negative samples is very large,which will cause the KNN algorithm to have a discrete prediction of the sample data.The problem of prediction.To this end,this paper attempts to change the model structure of the KNN algorithm,further improve the KNN algorithm,and proposes a new algorithm P.A-KNN.In the algorithm,the Ada Boost algorithm is integrated into the KNN,and the KNN performs under-sampling on the training set to construct a number of weak classifiers,and the weak classifiers are concentrated to form strong classifiers.Through loop iterations,the analysis results are gradually optimized,and ultimately more accurate Forecast results.This article uses some real air quality data from2016 to 2019 in Shanghai,and the simulation experiments have obtained good results.The experimental results show that the improved P.A-KNN algorithm is better in air detection and prediction,and the accuracy can be up to 98.69 %,Which is 11% higher than the prediction effect of traditional KNN algorithm.In this paper,the model design of the problems in the fault detection of the gas sensor array in the air detection equipment is designed.The problem of the sensor equipment directly affects the value of the detected gas data.The quality of the sensor array has a significant impact on the detection results.Abnormal data such as zero value,large value or small value will directly affect the evaluation of the air quality level.,It is easy to cause problems such as exaggerated results or neglected results.In this regard,this paper proposes to perform fault detection on the gas sensor array based on KNN rules,dimensionality reduction through principal component analysis(PCA),introduce a K-fold cross-validation method to find the optimal K value,improve the KNN detection model,and make the pattern recognition wrong The rate is further reduced.Simulation experiment results show that the accuracy of fault detection is increased from 91.5% to 97.8%.It can be seen that the improved model can realize the online diagnosis and location of array gas sensor faults,and can be applied to other systems with similar detection equipment. |