Научная статья на тему 'САМООПТИМИЗИРУЮЩИЙСЯ ВЗВЕШЕННЫЙ БАЙЕСОВСКИЙ КЛАССИФИКАТОР НА ОСНОВЕ ЭВРИСТИЧЕСКОГО АЛГОРИТМА'

САМООПТИМИЗИРУЮЩИЙСЯ ВЗВЕШЕННЫЙ БАЙЕСОВСКИЙ КЛАССИФИКАТОР НА ОСНОВЕ ЭВРИСТИЧЕСКОГО АЛГОРИТМА Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
12
3
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
наивный Байес / алгоритм оптимизации "Кит" / глобальная оптимизация / naive Bayes / Whale Optimization Algorithm / global optimization

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Ма Чжаньцзюнь, Гао Миньюй, Казаковцев Л. А.

Простая байесовская модель предполагает, что признаки независимы друг от друга, и это предположение часто недействительно в практических приложениях, и эффект классификации не является хорошим, когда число признаков относительно велико или корреляция между признаками велика. Для того чтобы ослабить предположение о независимости простого байесовского классификатора, в данной работе используется взвешенный байесовский классификатор и алгоритм оптимизации кита в эвристическом алгоритме для автоматической оптимизации весов, что повышает точность работы взвешенного байесовского классификатора. Эксперимент доказывает, что по сравнению с традиционным простым байесовским алгоритмом классификации, взвешенный байесовский алгоритм классификации, оптимизированный с помощью китового алгоритма оптимизации в данной статье, имеет более точные результаты классификации.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

SELF-OPTIMIZING WEIGHTED BAYESIAN CLASSIFIER BASED ON HEURISTIC ALGORITHM

The naive Bayes model assumes that attributes are independent of each other, and this assumption is often not valid in practical applications, and the classification effect is not good when the number of attributes is relatively large or the correlation between attributes is large. In order to weaken the assumption of independence of the naive Bayes classifier, this paper adopts a weighted Bayesian classifier and uses the whale optimization algorithm in the heuristic algorithm to automatically optimize the weights, thus improving the accuracy of the weighted Bayesian classifier operation. The experiment proves that compared with the traditional naive Bayes classification algorithm, the weighted Bayesian classification algorithm optimized by using the whale optimization algorithm in this paper has more accurate classification results.

Текст научной работы на тему «САМООПТИМИЗИРУЮЩИЙСЯ ВЗВЕШЕННЫЙ БАЙЕСОВСКИЙ КЛАССИФИКАТОР НА ОСНОВЕ ЭВРИСТИЧЕСКОГО АЛГОРИТМА»

минеральную, поровую), проницаемостную, пористостную и объемную (толщинную, площадную).

Неоднородность нефтяных залежей изучают детерминированным или вероятностным методами. Лучшие результаты дает их комплексное использование.

При детерминированном (причинно-следственном, причинно-обусловленном) методе, полагая, что одно явление (причина) при конкретных условиях обусловливает другое явление (действие, следствие), по данным исследований скважин и пластов строят карты распределения параметров пластов по площади (карты равных толщин пласта - изопахит, проницаемостей, пористостей, вязкостей нефти; карты распространения зональных интервалов или слоев и др.) и схемы распределения по разрезу.

Затем строят блок-диаграммы. При этом важная роль отводится детальной корреляции продуктивного пласта. Это позволяет точно определить толщины пластов, детально расчленить разрез, выяснить прерывистость пластов по простиранию и постоянство свойств слагающих его пород, выделить отдельные слои (пропластки) и зоны (линзы).

Вероятностный метод обоснован следующим. Так как доступ в залежь имеется посредством скважин, то по результатам проводимых исследований скважин и пластов локально (в известных размерах области пласта) устанавливают параметры залежи.

Значения этих параметров изменяются по объему (площади, толщине) пласта в широких пределах.

Изменения, можно полагать, носят случайный (вероятностный) характер. Поэтому считается, что данные исследований являются выборкой из некой генеральной совокупности параметров залежи.

Это позволяет использовать аппарат математической статистики, теории вероятностей и теории случайных функций.

В соответствии с законом больших чисел при увеличении объемов выборки выборочные характеристики сходятся по вероятности к генеральным, то есть, их надежность возрастает, а погрешность уменьшается.

Такая обработка данных исследований позволяет построить модель пласта.

Список используемой литературы:

1. В.С. Бойко, Разработка и эксплуатация нефтяных месторождений, М., Недра, 1990.

© Куллыева С., Нургуллыев А., Ыклымов Б., 2023

УДК 005

Ма Чжаньцзюнь

Аспирант 1 курса СИБГУ, г. Красноярск, РФ Гао Миньюй Аспирант 2 курса СИБГУ, г. Красноярск, РФ Научный руководитель: Казаковцев Л. А., Профессор, Доктор наук в области инженерии, СИБГУ, СФУ,

г. Красноярск, РФ

САМООПТИМИЗИРУЮЩИЙСЯ ВЗВЕШЕННЫЙ БАЙЕСОВСКИЙ КЛАССИФИКАТОР НА ОСНОВЕ ЭВРИСТИЧЕСКОГО АЛГОРИТМА

Аннотация

Простая байесовская модель предполагает, что признаки независимы друг от друга, и это

предположение часто недействительно в практических приложениях, и эффект классификации не является хорошим, когда число признаков относительно велико или корреляция между признаками велика. Для того чтобы ослабить предположение о независимости простого байесовского классификатора, в данной работе используется взвешенный байесовский классификатор и алгоритм оптимизации кита в эвристическом алгоритме для автоматической оптимизации весов, что повышает точность работы взвешенного байесовского классификатора. Эксперимент доказывает, что по сравнению с традиционным простым байесовским алгоритмом классификации, взвешенный байесовский алгоритм классификации, оптимизированный с помощью китового алгоритма оптимизации в данной статье, имеет более точные результаты классификации.

Ключевые слова

наивный Байес, алгоритм оптимизации "Кит", глобальная оптимизация

Ma Zhanjun.

1st-year postgraduate student of SibSU, Krasnoyarsk, Russian Federation.

Gao Mingyu.

2nd-year postgraduate student of SibSU, Krasnoyarsk, Russian Federation.

Supervisor: Kazakovtsev L. A.,

Professor, Doctor of Sciences in Engineering, SibSU, SFU, Krasnoyarsk, Russian Federation

SELF-OPTIMIZING WEIGHTED BAYESIAN CLASSIFIER BASED ON HEURISTIC ALGORITHM

Abstract

The naive Bayes model assumes that attributes are independent of each other, and this assumption is often not valid in practical applications, and the classification effect is not good when the number of attributes is relatively large or the correlation between attributes is large. In order to weaken the assumption of independence of the naive Bayes classifier, this paper adopts a weighted Bayesian classifier and uses the whale optimization algorithm in the heuristic algorithm to automatically optimize the weights, thus improving the accuracy of the weighted Bayesian classifier operation. The experiment proves that compared with the traditional naive Bayes classification algorithm, the weighted Bayesian classification algorithm optimized by using the whale optimization algorithm in this paper has more accurate classification results.

Keywords

naive Bayes, Whale Optimization Algorithm, global optimization

1. Introduction

The naive Bayes classifier is characterized by simple training, considerable robustness and efficiency, and is now widely used in text analysis, artificial intelligence, machine learning, fault diagnosis, medical diagnosis, and battlefield decision making0. Due to the characteristics of the naive Bayes classifier requiring the assumption of conditional independence, the algorithm must perform approximate operations on attributes when preprocessing the trained dataset for attributes2. However, in real life and specific project construction, this independence assumption rarely exists or even does not exist at all. To address the shortcomings of this attribute approximate processing of the naive Bayes classifier, many scholars have studied and improved it, for example, reference 2 proposed a naive Bayes classification method based on classification probability weighting; reference 4 used an information gain algorithm to quantify the weight coefficient of each feature attribute. In order to

enable the algorithm to obtain global attribute weight values, this paper uses the global optimization algorithm Whale Optimization Algorithm to perform the search for the global optimal attribute weight values, thus being able to find the attribute weight values that affect the classification accuracy of the dataset the most, further optimizing the traditional attribute weighting method.

The Whale Optimization Algorithm (WOA) is a new intelligent optimization algorithm that simulates the feeding behavior of whale populations. The research results show that the whale optimization algorithm has faster convergence speed compared with the particle swarm optimization algorithm and gravitational search algorithm, and the whale optimization algorithm has the advantages of simple concept, easy implementation, no need for gradient information and high local optimum avoidance ability 4, which can solve different kinds of optimization problems. Currently, WOA has been widely used in natural and engineering sciences6.

In this paper, we use WOA to optimize the naive Bayes classifier to make the calculation of the algorithm attribute weights values more reasonable. WOA is used to automatically search the weights assigned to each attribute for the purpose of optimizing the naive Bayes classifier7. The algorithm uses the classification error rate as the objective function of the whale algorithm8. Experiments demonstrate that the new algorithm possesses higher classification accuracy.

1. Weighted naive Bayes classifier

1.1.Parsimonious Bayesian

Parsimonious Bayes is a classification method based on Bayes' theorem and the assumption of conditional independence of features, i.e., for a given set of training samples, and their corresponding classification labels. Each tuple is represented as an N-dimensional attribute vector X={X1,X2,... ,Xn} in the form of a total of k classes, denoted by C1,C2,... ,Ck to represent. Using the Bayesian model, it is possible to predict which class the data belongs to. For each category Ck,the Bayesian formula is used to estimate the conditional probability P(X|C) given the training tuple X.

P (X|Ck) =nj=iP(Xj|Ck) (1)

Consider whether each attribute is continuous-valued or categorical. If it is a continuous-valued attribute, assume that the continuous-valued attribute obeys a Gaussian distribution with mean ц and standard deviation a, and the mathematical formula is defined as follows.

1 (x-g)2

g(x'^'a) = vfn5e 2g2 (2)

P(xj|Ck) = g(xk^q,aq) (3)

The function g(x,^,a) neutralizes parameters that are the mean ц and standard deviation a of the training tuple attribute Aj of class Ck.

In case of categorical value attributes, p(Xj |Ck) is the number of tuples of class Ck in D with attribute Aj value Xj divided by the number of tuples of class Ck in D| Ck,D|.

The mathematical formula for the posterior probability is described as follows.

P(Ck|X)=PC!)nr=iP(Xj|Ck) (4)

The test samples Xt={X1,X2,... ,Xn} will eventually be classified in the class contained by the maximized posterior probability, then the naive Bayes classification model can be represented as follows.

y = argmaxP(y = Ck) П}=1 P(Xj |ck) (5)

1.2. Weighted Parsimonious Bayes

The attribute weights are assigned on each conditional probability. After weighting, the naive Bayes classifier can be represented as follows.

y = argmaxP(y = Ck) П"=1 P(xj |Ck)Wm (6)

Where Wm - the attribute weight value of Aj.

The larger the weight value assigned the stronger the influence of the attribute in the classification process of the algorithm.

Therefore, the key of the weighted naive Bayes classifier lies in how to calculate the global weight values of each attribute reasonably and accurately. In this paper, we propose to use the whale optimization algorithm to calculate the attribute weight values for the data set, and improve the whale algorithm to make the calculated weights more global and more accurate.

2. Whale Optimization Algorithm, WOA

WOA algorithm mainly consists of Encircling prey, Bubble-net attacting and Search for prey.

2.1. Encircling prey

The WOA algorithm assumes that the current optimal alternative solution is the prey. After determining the prey location, the rest of the search agent (which can be understood as individual whales) will move towards the best search agent (prey) and update the location, and the mathematical expression is as follows.

D= |C * X* (t) — X(t) | (7)

X(t+1)=X*(t)-A*D (8)

Where t - the number of iterations;

X* - the position vector of the prey;

X - the position vector of the remaining search agent;

the variable coefficients A,C are defined by the following mathematical equation.

A = 2 *K* ^—K (9)

C = 2 * r2 (10)

Where ri and r2 - random vectors between 0 and 1;

K- coefficient in the iterative process (decreasing linearly from 2 to 0 in the iterative process);

The mathematical formula is as follows.

a = 2 - 2 * t/Max_iter (11)

It can be concluded that it is changed with the number of iterations, and Max_iter indicates the upper limit of iterations for population search.

2.2. Bubble-net attacting

This section will describe the bubble behavior of humpback whales in terms of mathematical expressions by two methods:

1) Shrinkage envelope mechanism

The shrink-wrapping mechanism is implemented by the A-vector mentioned in Eq. (9) above, with the following expression:

A = 2 *K* ^—K a = 2 — 2 * t/Max_iter

2) Spiral updating position

The WOA algorithm calculates the distance between the whale and the prey when updating the spiral position. In order to imitate the spiral movement of the humpback whale, the mathematical formula is as follows.

X(t + 1) = D' * ebl * cos(2nl) + X*(t) (12)

Where D'=|X*(t)-X(t) | - the distance between the whale and the target prey;

b - constant is 1;

l - a random number taking the value interval [-1,1] .

Because of the different position update methods, thus introducing the probability p to determine which position update method the individual whale goes to perform to achieve the contraction surround and spiral update synchronization, p is a random number between [0,1]. The equation of position update after introducing p is as follows.

X(t+1) = {>

X*(t) — A*D,p < 0.5 bl

(X*(t) + D' * ebl * cos(2nl),p > 0.5 2.3. Search for preySearch for prey

In addition to bubble attack, a random search is required during the hunting process, instead of searching

according to the location of the prey, the mathematical expression is as follows.

D = |C*Xrand(t)-X(t)| (13)

X(t+1)=Xrand(t)-A*D (14)

Where Xrand - the randomly selected position in the population.

When |A|>1 or |A|<-1,the randomly selected position becomes the key point to update other search positions, thus forcing the whales to move away from the prey position and enhancing the global search capability of the WOA algorithm.

2.4. Improving the whale algorithm fitness function

In this algorithm, the error rate calculated by using Bayesian classifier is used as the objective function of the whale algorithm

fitness(Xk) = 5 * Eva(X) (15)

Where Xk - the position of the humpback whale at moment k;

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Eva(X) - the classification error rate;

5 - the weight of classification accuracy, 5 usually set to take the value 0.9.

3. Calculation of attribute weights of weighted Bayesian classifier

Optimizing the naive Bayes classifier based on the improved whale algorithm is mainly to determine the attribute weights of the classifier using the whale algorithm. To avoid zero probability when calculating p(Xj |Ck), a Laplace calibration is performed to ensure that the sum of all attribute weights is 1. The steps of WINB algorithm are as follows.

Step 1: Data preprocessing to handle missing values.

Step 2: Calculate the prior probability P(C) and conditional probability P(X | C) of the attributes.

Step 3: Initialize the whale population, the number of iterations and other parameters, initialize Wbest and fitnessbest.

Step 4: Update the population position according to Eqs. (7)-(14) and calculate the new solution.

Step 5: Calculate the corresponding fitness(Xi) according to Eq. (15), when fitnessbest<fitness(Xi), X*=Xi, fitnessbest=fitness(Xi), go to step 4,until the end of population traversal.

Step 6: Get the new global optimal solution Wbest*, and the new fitness fitnessbest*.

Step 7: Proceed to the next iteration, if the iteration ends, go to step 8, otherwise go to step 4.

Step 8: Output the global optimal solution Wbest and substitute it into equation (6) for classification prediction of the data using weighted Bayes.

4. Simulation experiments

In this paper, we use the datasets provided by UCI: Mushroom, House-Votes and Car.

The purpose of the experiment is to evaluate the overall error rate of the WINB algorithm, and the paper selects all the attributes contained in the dataset for the experiment.

Table 1

The confusion matrix results.

DataSets Precision Recall Accuancy

House-Votes 89% 90% 90%

Mushroom 88% 89% 88%

Car 85% 85% 85%

After experiments and tests, the convergence speed and accuracy of WINB are significantly better than WOA.

5. Summary

In this paper, we propose to use the whale optimization algorithm to optimize the weights of the naive Bayes classifier and weight the attributes to weaken the class independence assumption. The algorithm does not directly use the whale location as the final weight, and the algorithm needs to ensure that the sum of the weights

of the location information is 1 during the operation of the algorithm, i.e., the principle of normalized processing. The experiments prove that WINB significantly improves the classification accuracy compared with the traditional NB algorithm, but at the same time the program execution time becomes longer as the population size and the number of iterations increase, and the operation efficiency of the algorithm needs to be optimized. Overall, WINB can get good predictions.

Список использованной литературы:

1. He Ming., Sun Jianjun., Cheng Ying. A review of text classification research based on naive Bayes // Intelligence Science. 2016. № 3.

2. Zhu Jun., Hu Wenbo. A review of frontier advances in Bayesian machine learning // Computer Research and Development. 2015. № 1.

3. Zhang Buliang. A naive Bayes classification method based on classification probability weighting // Natural Sciences. 2012. № 7.

4. Tong Wei., Huang Qiping. Application of weighted naive Bayes algorithm in fire detection // Journal of Xi'an Engineering University. 2019.№ 1.

5. Zhang Yong., Chen Feng. An Improved Whale Optimization Algorithm // Computer Engineering. 2018. № 3.

6. He Qing., Wei Kangyuan., Xu Qingshuai. Whale optimization algorithm based on hybrid policy improvement // Computer Application Research, 2019. №12.

7. Wang Shengwu, Chen Hongmei. Feature selection method based on rough set and improved whale optimization algorithm // Computer Science. 2020.№ 2.

8. Zhang Maku Xue., Zhang Damin., Yang Ju Dragon. Ant colony optimization algorithm based on forbidden search // Communication Technology. 2017. № 8.

© Ma Zhanjun, Gao Mingyu, 2023

УДК 628.931:621.31

Мустяцэ А.В.

студент 3 курса АлтГТУ им. И.И. Ползунова,

г. Барнаул, РФ

Попов А.Н.

канд. техн. наук, доцент АлтГТУ им. И.И. Ползунова

г. Барнаул, РФ

ПРЕИМУЩЕСТВА И НЕДОСТАТКИ РАЗЛИЧНЫХ ТИПОВ ЛАМП ДЛЯ ОСВЕЩЕНИЯ ПОМЕЩЕНИЙ

Аннотация

В данной работе рассмотрены различные типы ламп для освещения различных видов помещений, а также эффективность их использования. Поднимается вопрос о снижении расходов на электроэнергию для жилых домов, организаций и предприятий.

Ключевые слова Освещение, электроэнергия, затраты, преимущества, недостатки.

В связи с развитием технологий обычные лампы накаливания стали вытесняться люминесцентными или светодиодными лампами. Такой переход обусловлен эффективностью данной лампы для освещения каких-либо помещений. Немаловажную роль играет снижение финансовых затрат на электроэнергию при

i Надоели баннеры? Вы всегда можете отключить рекламу.