The invention provides a method for obtaining the
light intensity and scattering angle of an LED
light source after passing through a collimation TIR lens, and belongs to the technical field of optical technology and illumination, and the method comprises the steps: obtaining a
data set of the collimation TIR lens, carrying out the abnormal value
processing, and dividing the
data set into a
training set and a
test set according to a preset proportion; constructing an initial
random forest model, optimizing the initial
random model based on a crown
porcupine optimization
algorithm, performing parameter setting on the crown
porcupine optimization
algorithm according to the leaf node number and the number depth of the
random forest model, and performing iterative optimization; comprising the steps of initializing a crown
porcupine optimization
algorithm, updating a visual defense strategy, updating an auditory defense strategy, updating a smell
attack defense strategy and updating a physical
attack defense strategy. And testing the
light intensity and the scattering angle of the LED
light source after passing through the collimation TIR lens by using the optimized
random forest model. According to the scheme, the speed and accuracy of obtaining the
light intensity and the scattering angle are improved, and time and design cost are saved.