Introduction

The development of computer-aided diagnosis for medical image analysis requires an efficient classification method to improve the decision-making process. Pathological images are considered as the gold standard for detecting carcinoma depending upon the observed texture, shape, and color of the cell [1,2,3]. Digital pathology enables the examination of stained images for diagnosis and classification of diseases [4,5,6]. However, an efficient classification system for histopathological images is still in development and these images are studied manually by pathologists. Histopathology is the study of inflammed tissue section which contains the complex structure having various morphological variabilities [7]. These complex structured images make it difficult to design an efficient and effective automatic classification system [8]. To depict the complexity and variability in histopathological images, some of the representative images are shown in Fig. 1. The observation shows that the manual approach leads to substantial variation [9] and is usually a time-taking process [10]. Therefore, there is a growing requirement for an automated histopathology image classification process for their quantitative analysis [11,12,13]. For the same, digital histopathology tissue patterns may be utilized to extract the information and advancing the classification process. The effective classification method may discover the various categories and explore the benign or malignant stages of histopathological images.

Fig. 1
figure 1

Representative hematoxylin and eosin-stained histopathological images; (i) lung, (ii) kidney, (iii) spleen, and (iv) breast images scanned at 40 \(\times \) magnification level

There are various methods presented for histopathological image classification. However, bag-of-features (BOF) is one of the successful methods used for histopatholgical images. Furthermore, the appropriate feature selection and visualization of different varieties of features’ descriptors assist in classification. A BOF framework is used for feature selection and feature representation constructively in computer vision [14]. BOF is a popular method in which a collection of gathered features is assembled in clusters through the k-means technique. The visual vocabulary is obtained from extracted feature descriptors using the K-means clustering method. Here, the clustering approach allocates the data vectors to each cluster with minimum cohesion [15]. However, K-means may give biasness towards cluster formation on high-dimensional feature descriptor and generally trap in local optimum. Furthermore, the visual words’ occurrences in each image are represented using the histogram. Various researchers propose the variants of BOF methods for achieving better accuracy [16]. Mittal et al. [17] classified the histopathological tissue images into connective tissue, nervous tissue, epithelium tissue, and muscular tissue. In this method, an improved BOF method is applied by implementing a gravitational search algorithm to acquire optimal visual words. Dimitrovski et al. [18] presented the annotation hierarchy for multi-label classification of the medical images using the predictive clustering tree technique. Cruz-Roa et al. [19] proposed the automatic annotation, consisting of BOF representation, probabilistic annotation, and latent topic model on the histopathological image. The support vector machine (SVM) method is used for classification and evaluating the accuracy, precision, and F-score measures.

The overall contribution of the paper has threefold; (1) a new reinforcement cat swarm optimization (RCSO) is introduced, (2) improved feature representation method, referred to as weighted Gaussian mixture modelling, is presented, and (3) a new BOF model for classification of histopathological images is developed. The RCSO algorithm’s performance is tested on 29 benchmark functions of CEC 2017, and comparative analysis is done on the existing state-of-the-art algorithms, namely lion optimization algorithm (LOA), cat swarm optimization (CSO), whale optimization algorithm (WOA), and particle swarm optimization (PSO). Moreover, rigorous statistical analysis is performed for checking the significance of acquired results. Furthermore, the comparative analysis is performed based on BOF technique, namely PSO_BOF, WOA_BOF, CSO_BOF, and LOA_BOF. The quality metrics measures are evaluated by computing recall, precision, F1-score, and accuracy on different histology dataset categories using SVM and multilayer perceptron (MLP). Furthermore, confusion matrices are generated for each category of benign and malignant histopathological images. The experimental result analysis and observation show that the proposed method is efficient and outperforms the existing state-of-the-art methods.

The rest of the paper is structured in the following sections. Section 2 discusses the literature review and CSO algorithm, Sect. 3 elaborates the proposed methodology, Sect. 4 presents the experimental analysis, and conclusion are drawn in Sect. 5.

Literature review

Bio-inspired or meta-heuristic algorithms are the nature-inspired techniques that help to solve real-world optimization problems. In literature, several nature-inspired algorithms have been presented which mimic a biological or physical behavioural phenomenon to solve real-world optimization problems [20]. Some of the popular meta-heuristic algorithms are PSO [21], CSO [22], WOA [23], Cuckoo Search (CS) [24], LOA [25], and many more. O’Boyle et al. [26] presented the selection of optimal features subset using ant colony optimization (ACO) algorithm and simultaneously improved the parameter metrics of SVM. Rodrigues et al. [27] demonstrated optimal path forest and bat algorithm for novel feature selection process. Gu et al. [28] introduced the CSO technique to reduce the dimension of the dataset and select the best features. CSO is a popular variant of the particle swarm algorithm for determining the relevant attributes among extracted features. Mittal et al. [29] presented an improved gravitational search algorithm which is a meta-heuristic technique based on Newtonian gravity to determine optimal threshold value in the 2D histogram of an image. Regardless of their nature, population-based meta-heuristic clustering optimization algorithms return possible global optimal value of the desired feature by exploiting and exploring the input search space. Therefore, researchers used the meta-heuristics algorithms in BOF method for achieving better accuracy.

Tiwari et al. [30] depicted the effective BOF method, utilizing whale optimization algorithm and tested it on blue histology dataset. Kumar et al. [31] presented the comparative analysis using bag of visual words method on KIMIA Path960 histopathological images for performing classification. Pal et al. [32] developed enhanced BOF method by contributing SBBO (spiral biogeography-based optimization) meta-heuristics technique to perform classification on histopathology images. The generation of optimal visual words is done using SBBO in BOF. Thus, the optimal cluster center is determined to provide the best solution. The different connective tissues in the histopathological images are classified using SVM. Rachapudi et al. [33] presented a BOF method utilizing a novel random salp swarm algorithm to improve the medical image classification. The comparative analysis is performed for computing quality metrics with five different meta-heuristics based BOF method. Díaz et al. [34] presented an algorithm in which the local region in the stained histopathological image is extracted using SIFT descriptors of stained components and applied probabilistic latent semantic analysis method (pLSA) for classification. Zhang et al. [35] depicted a model based on multi-scale non-sparse coding for medical image classification. The developed method extracts the feature descriptors and produces the histogram. BOF method uses the k-mean algorithm to determine the clusters and forming the visual vocabulary to form the codebook.

Kaushal et al. [36] performed the analysis of different feature extraction and classification technique on BreaKHis dataset. The experimental result are computed on quality metrics parameters, such as F-measure, recall, accuracy, precision, and G-mean. Furthermore, image representation in BOF also plays an important role. Shi et al. [37] presented NLLSC (non-negative factorisation and Laplacian sparse coding) method for image representation and classification. The technique preserves the local information and reduces the uncertainty of sparse coding. However, the different variants [38,39,40] of sparse coding usually fail to examine multi-scale layers of image and essential contextual dimension information from different patch regions of the image. Pal et al. [41] introduced the approach for searching key point based on grey relational analysis BOF method. The results present that bag of visual words technique gives better accuracy. Sanchez-Morillo et al. [42] proposed BOF combined with KAZE features to classify malignant and benign on breakHis histopathology images. The extracted key points are outlined with histogram vector utilizing K-mean clustering given as input to a binary SVM classifier. Hashimoto et al. [43] showed the tissue classification of liver H &E-stained histopathology image based on BOF. The observation states that the average classification is increased by applying BOF on selected spectra of RGB histology image. Beagum et al. [44] employed BOF for feature extraction and selection. Furthermore, an SVM is implemented for classification on microscopic images and good accuracy is obtained. Mhala et al. [45] extracted features using the SIFT method and applied BOF on image feature descriptors.

Moreover, Pal et al. [46] presented the four different folds of a BOF technique such as extraction, codebook building, encoding, and classification. The weighted two-dimensional vector quantisation encoding method is contributed in BOF to improve the classification. Cao et al. [47] proposed a method for semantic visual words based on BOVW, applying probabilistic latent semantic analysis. However, the K-means clustering algorithm is used in BOF to obtain visual words. The method traps into local optimum due to biasness towards initial seeds. Thus, the defects of BOVW cannot be adequately solved. Therefore, this paper introduces an enhanced effective BOF method to overcome the limitations and challenges by introducing a new variant of cat swarm optimization technique for clustering the visual words and new weighted Gaussian mixture modelling method for the representation of optimal visual words.

Fig. 2
figure 2

Flow process of proposed methodology

Cat swarm optimization

Swarm intelligence (SI) [48] based optimization algorithms are inspired by the characteristics of animals. Cat swarm optimization is a recently developed SI-based algorithm working on the behaviour of cat in two modes, namely seeking mode and tracing mode. Generally, a cat functions with high curiosity and alertness for catching the prey in the respective surrounding. The population of a cat are randomly allocated in N-dimensional search space. Each cat occupies the position and velocities in N-dimension space, flag value to determine whether the cat is in seeking mode or tracing mode, a fitness function to compute the value for a new position. In seeking mode, during resting, the cat observes the surrounding and determines the position or movement [22]. The seeking mode contains four necessary attributes; (i) SRD (looking for a range of specified dimension), (ii) SMP (seeking or discovering memory puddle), (iii) SPC (self-position consideration), and (iv) CDC (number of dimensions to be updated). In the tracing stage, the cat changes its velocity depending upon the prey speed and position. One of the merit of CSO is the parallel performance of local exploitation and global exploration. In certain methods, such as PSO, GA, and ABC, this may generate higher computation time. However, the cat exploration and exploitation to find prey can be improved by introducing reinforcement learning to discover an optimal solution. It overcomes from the demerit of CSO as cat becomes more adaptive and adjusts towards the behaviour based on gathered experience. The detailed procedure of CSO is presented below.

  1. 1.

    Generate the random population of cats and sprinkle in N-dimensional space. Furthermore, the velocity is assigned to each cat randomly according to the maximum range of velocity value.

  2. 2.

    Assignment of the flag to each cat based on mixture ratio (MR). Sort them into tracing mode or seeking process, respectively.

  3. 3.

    Compute the fitness value of each cat and determine the best-obtained position in search space.

  4. 4.

    Depending on their flag, move the cat in the seeking process or tracing process.

  5. 5.

    Examine the termination condition. If the criteria is satisfied, terminate the process; else, repeat Step 3 and 4.

Proposed methodology

This paper proposes a new BOF approach for efficient classification of H &E-stained histopathological images. A detailed flow graph is presented in Fig. 2. Before applying the new BOF, Gaussian filtering is applied on images for removing the noise and improving the quality. In Gaussian filter, angle consider standard deviation of 0.5. For the feature extraction, a total of 106 statistical, structural, and texture set of features are extracted for effective classification [49]. Here, 19 features from GLCM (gray-level covariance matrices) [50], 7 features from GLRLM (gray-level run length matrices), 4 features from GLDM (gray-level dependency matrix), 59 features from LBP (local binary pattern), 6 features from HOG (histogram of the oriented gradient) [53], and 5 features from SIFT (scale-invariant feature transformation) are extracted. These features help in exploring and visualizing the patterns in histopathology images [54, 55]. In GLCM [56], gray co-matrix function examines the spatial relationship of pixels. GLDM [57] computes the gray-level difference approach probability density function for the given image and determines the feature descriptors. GLRLM evaluates the count of gray-level runs of varying length. In LBP, the image transformation occurs by thresholding each pixel’s neighborhood and processing the result in a binary number. HOG method uses the orientation of localized portions and gradients of pixel values in the image to create the histogram of the regions. SIFT method determines the key points that is invariant to rotation or scale.

The proposed method determines the optimal visual words using reinforcement cat swarm optimization (RCSO) and k-means algorithm for clustering followed by histogram representation for frequency of each visual words in images through weighted Gaussian mixture modelling. The following sections present the RCSO algorithm, RCSO-based clustering method, feature representation method, and classification process of histopathology images.

Reinforcement cat swarm optimization

The proposed RCSO algorithm improves the exploration and exploitation of cat swarm optimization by introducing learning and reinforcement phases to determine the optimal solution. The learning and reinforcement process enables the cat to become adaptive towards the environment by adjusting their behaviour based on gathered experience and information to find the local optima. RCSO composed of two modes of behavioural mechanism, namely improved seeking and tracing method for maintaining a good balance between exploration and exploitation. Every cat acquires its own position consisting of N-dimension solution space, fitness value assisting cat to the fitness function, cat velocities for each dimension, cumulative reward, and the flag to indicate whether the cat is in seeking or tracing mode. The detailed description of the proposed method for solving the optimizing problem and providing the best position is demonstrated in the following section.

Improved seeking phase

In the reinforced seeking model, there are two possibilities, i.e., (i) cat is either resting or looking around in environment and (ii) seeking for next position to be moved. Therefore, five important factors are used in improved seeking mode represented as seeking memory pool (MP) for depicting the size of memory of each cat, a number of dimensions required to be changed or mutated (CDC), range of the selected extent (SRD) for calculating the difference between old and new value or finding mutative ratio, reward point position (RPP) to intensify the search, and consideration of self-position (CSP) which decides the candidate position for movement [58]. The required steps for the same are mentioned below.

  1. 1.

    Create k copies of the present position of \(\mathrm{{cat}}_j\) where \(k= MP\). If the value of CSP is true and let \(k= MP-1\), then restore the current position of the cat as one of the candidates.

  2. 2.

    According to CDC, for each copy or candidate, a new position is evaluated using Eq. (1). Moreover, reward (RW) [59] requires to compute the component of \(\alpha \) and \(\beta \), as shown in Eq. (3) and (4), respectively. \(\alpha \) element depicts the difference between the new position and previous position. It helps to attain the autonomous experience, and thus helps to intensify the search in a promising region effectively. \(\beta \) component shows the social learning effect evolved over time, supporting the exploration of search space

    $$\begin{aligned} Y_{np}= Y_{np}^{\prime } \pm RW, \end{aligned}$$
    (1)
    $$\begin{aligned} Y_{np}^{\prime }=( 1 \pm SRD * rn) * Y_{cp}, \end{aligned}$$
    (2)
    $$\begin{aligned} \alpha = |Y_{np}^{\prime } - Y_{cp} |, \end{aligned}$$
    (3)
    $$\begin{aligned} \beta = Y_{cp} \times \exp (-al \times rn\times t \times \mathrm{{mean}}(cat_j)), \end{aligned}$$
    (4)
    $$\begin{aligned} al =al_\mathrm{{min}}+ ((al_\mathrm{{max}} - al_\mathrm{{min}} / \mathrm{{max}}_{t} ) \times t, \end{aligned}$$
    (5)
    $$\begin{aligned} RW = \{^{\alpha - \beta \mathrm{{if}} i < n / 2}_{r1 \times (r2 \times \beta ) - \alpha , \mathrm{{Otherwise}} }. \end{aligned}$$
    (6)

    Here, \(Y_{np}^{\prime }\) is initial new position, \(Y_{np}\) is final new position, and \(Y_{cp}\) is the current position. The rn represents the random number {0, 1}, t is iteration, \(\mathrm{{mean}}(cat_j)\) shows the mean of current position of cat j in population \(C_j\), al depicts adaptive learning factor which maintains stability between exploration and exploitation, and \(al_\mathrm{{max}}\) and \(al_\mathrm{{min}}\) are the maximum and minimum value of learning factor, respectively. r1 and r2 show the uniform random numbers, i represents the current index value of cat, and n represents the number of cats in the seeking mode.

  3. 3.

    Evaluate the fitness values (FV) for a new position. If all fitness values are precisely equal, then each candidate point has selection probability = 1; otherwise, compute the selecting probability using Eq. (7)

    $$\begin{aligned} P_j = \frac{|FV_j - FV_a|}{|FV_\mathrm{{max}}-FV_\mathrm{{min}}|}, \end{aligned}$$
    (7)

    where \(P_j\) shows the probability of a current candidate \(\mathrm{{cat}}_j, FV_j = FV_\mathrm{{max}}\) for maximization problem and \(FV_j = FV_\mathrm{{min}}\) in minimization situation. The \(FV_\mathrm{{max}}\) and \(FV_\mathrm{{min}}\) show the maximum and minimum values of fitness function, respectively.

  4. 4.

    Using the roulette wheel, randomly choose the position to move from candidate point and substitute the position of \(\mathrm{{cat}}_j\).

Improved tracing mode

In tracing mode, the cat chases the prey and outlines the targets [60]. After finding the prey, the cat determines its velocity and position in N dimension search space depending upon the prey’s speed and position. The experience and historical information are also considered for computing the new position. Thus, the velocity of \(\mathrm{{cat}}_j\) in RCSO algorithm is updated using Eq. (8)

$$\begin{aligned} U_{j,M}= U_{j,M}+ rn_1* n_1 (Y_{\mathrm{{best}},M}- Y_{j,M}). \end{aligned}$$
(8)

Here, \(U_{j,M}\) shows the velocity of cat j at dimension N, \(rn_1\) represents the random value varying from a range of [0, 1], \(Y_{\mathrm{{best}},M}\) depicts the best position of cat, and \(Y_{j,M}\) represents the position of \(\mathrm{{cat}}_j\).

However, if the velocity of the cat exceeds the maximum velocity, then set the velocity to maximum velocity. Moreover, the new position of cat is updated using Eq. (10). Thus, it explores the search space and exploits using previous information to obtain the best optimal position

$$\begin{aligned}&U_{j,M,\mathrm{{new}}}= U_{j,M,\mathrm{{old}}}+ U_{j,M}, \end{aligned}$$
(9)
$$\begin{aligned}&Y_{np}= \{^{Y_{cp}- [y_{cp} + \exp \{r1 \times (\mathrm{{mean}}(\mathrm{{cat}}_j)-y_{cp})\}], U_{j,M,new} \le U_{j,M,old} }_ {Y_{cp} -[ r2 \times [ y_{cp} -\exp \{ r1 \times (\mathrm{{mean}}(\mathrm{{cat}}_j)-y_{cp})\}]] U_{j,M,\mathrm{{new}}} > U_{j,M,\mathrm{{old}}} },\nonumber \\ \end{aligned}$$
(10)

where, \(U_{j,M,\mathrm{{new}}}\) and \(U_{j,M,\mathrm{{old}}}\) represent the new position and current position of \(\mathrm{{cat}}_j\) respectively. The complete algorithm of RCSO has been depicted in Algorithm 1.

figure a

Optimal visual words using RCSO

This paper proposes a New BOF (NBOF) method by introducing a new clustering method based on RCSO to determine the optimal cluster centroids. The visual words are formed by aggregating the features into different cluster centers. Furthermore, assembly of these visual words is referred to as codebook. The clustering method in NBOF is described below.

  1. 1.

    A total of 106 statistical and texture features are extracted in N dimensions using GLCM, GLDM, GLRLM, LBP, and HOG methods from histopathological images.

  2. 2.

    New BOF technique is developed for computing the optimal bag of visual words using the following RCSO-based clustering method.

    1. (a)

      K-mean clustering technique is applied on a set of features, represented as \(\{d_1,d_2,d_3.....d_M\}\) where \(d_M \in Z^N\), to determine the L cluster centers \(\{q_1,q_2,q_3.....q_L\}\) where \(q_L \in Z^N\).

    2. (b)

      Initialize the population of cat, such that each cat represents image of \(d_n\) features.

    3. (c)

      Compute the fitness value using the objective function, as shown in Eq. (11)

      $$\begin{aligned} \mathrm{{Minimize }} \rho (d_M ,q_L )= \sum _{i-1}^M \sum _{j=1}^L||d_M ,q_L ||^2, \end{aligned}$$
      (11)

      where \(\rho \) depicts the density of clusters whose purpose is to minimize the compactness.

    4. (d)

      Evaluate the best solution by improving the velocity and position of a cat using the RCSO algorithm.

    5. (e)

      Repeat Step (c) to (d) until the termination condition is achieved.

    6. (f)

      Determine the best optimal position.

Feature representation using new weighted Gaussian mixture modelling

In this work, new weighted Gaussian mixture modelling is used to represent the image. The detailed process is presented below.

  1. 1.

    Compute the weighted probability density function (PDF) \(T_p (L) \) by modifying the PDF T(L) for each sub histogram \(HG_1 (L)\) of visual words using pre-computed values of \(T_\mathrm{{max}}\), \(T_\mathrm{{min}}\), \(\mu _i\) and Eq. (12)

    $$\begin{aligned} T_p (L)= T_\mathrm{{max}}\frac{(T(l) - T_\mathrm{{max}})}{(T_\mathrm{{max}} - T_\mathrm{{min}} )}^\alpha +\beta ,(l_i \le k \le u_i), \end{aligned}$$
    (12)

    where \(T_\mathrm{{max}}\) is a maximum value of visual words, \(T_\mathrm{{min}}\) is minimum value of visual words, and \(\mu _i\) is accumulative probability value (\(\mu _ i=\sum T(L),\sum _{i=0}^{2^{r-1}}\mu _ i=1 \)). By adjusting the value of ŝ, the degree of mean contrast enhancement and brightness ( ŝ \(> 0\)) are controlled.

  2. 2.

    Calculate the resultant weighted and normalized PDF \(T_{pw} (L)\) of modified PDF \(T_p (L)\) using Eq. (13)

    $$\begin{aligned} T_{pw} (L)=\frac{T_p (L)}{ \sum _{j=0)}^{l-1}T_p (j) }. \end{aligned}$$
    (13)
  3. 3.

    GMM (Gaussian mixture modelling) is applied to perform histogram equalization on \(2^r\) curve segments separately. The Gaussian component equalizes the area by considering the probability of each element in interval [\(T_{pw} (L), T_{pw} (L+1)\) ], as shown in Eq. (14)

    $$\begin{aligned} S_p = arg max (F_{wi}(T_{pw}(L+1))-F_{wi} (T_{pw} (L))). \end{aligned}$$
    (14)
  4. 4.

    Ensure that the Gaussian distribution \(S_p\) is in the region between [\(T_{pw} (L), T_{pw} (L+1)\) ] and is equivalent to the region under the Gaussian distribution \(S_{p}^{\prime }\) between interval [\(Y_{pw} (L), Y_{pw} (L+1)\) ] by solving Eq. (15) and Eq. (16) simultaneously

    $$\begin{aligned} F_{wi} (T_{pw} (L))= F_{wi}\prime (Y_{pw} (L)), \end{aligned}$$
    (15)
    $$\begin{aligned} F_{wi} (T_{pw} (L+1))= F_{wi}\prime (Y_{pw} (L+1)). \end{aligned}$$
    (16)
  5. 5.

    Consider all the Gaussian components for finding the mapping from x to y and retaining the equal distribution of visual words in input and output intervals, respectively, i.e., [\(T_{pw} (L), T_{pw} (L+1)\) ]. Here, y represents the output value, calculated by using Eq. (17) and can be visualized in Fig. 3. The bin in histogram is obtained by the count of visual words available in image. Moreover, the generated histogram and prior annotations are used to train the classifier

    $$\begin{aligned} y= \sum _{i=1}^N (\frac{(T_{pw}- \mu _{wi}}{\sigma _{wi }} \sigma _{wi}\prime + \mu _{wi}\prime ) F_{wi}, \end{aligned}$$
    (17)

    where \(\mu _{wi}\) represents mean of Gaussian component and \(\sigma _{wi}\) is the standard deviation value of Gaussian component. The pseudocode of weighted GMM is presented in Algorithm 2.

Fig. 3
figure 3

Histogram representation of optimal visual words

figure b

Classification

The proposed NBOF method uses SVM and MLP techniques to classify the histopathological images. After obtaining the optimal visual words using RCSO, image is encoded into histogram using new weighted Gaussian mixture modelling, depicting the frequency count of each visual word in image. Furthermore, the image annotation along with encoded histogram is used to train the network. SVM maintains the hyperplane or decision boundary for performing classification on histology image. MLP network consists of three layers, namely input, hidden, and output layers, and applies backpropagation for training and testing the network.

Table 1 Parameters’ values used in RCSO algorithm

Experimental results

In this work, the proposed method has been tested on histopatholgical image datasets. The datasets consist of 640 stained tissue histopathological images collected from two separate databases, i.e., ADL (Animal Diagnostic lab), Pennsylvania State University [61] and Break His [62]. The crop-resize histopathological image of dimension 700x490 with 24 bit depth is extracted. The histopathological image datasets comprise images of four organs, namely Spleen, Kidney, Lung, and Breast scanned at 40x optical magnification. Extensive experimental analysis is implemented on python 3.6 using environment configuration as Intel core i7 with 2.2 GHz speed, 16GB RAM, NVIDIA Geforce GTX1080 ti 4GB, and Windows 10 operating system. Series of the simulation were conducted for computing the performance of NBOF. Parameter tuning is performed for generating optimal value using RCSO and is depicted in Table 1. Moreover, Table 2 illustrates the SVM and MLP parameters considered for classification.

Table 2 Parameters’ values used by the classification methods
Table 3 Comparative analysis of proposed RCSO algorithm

Performance evaluation of RCSO

The CEC 2017 benchmark test function problems contain unimodal functions (\(Fn_1- Fn_3\)), multimodal functions (\(Fn_4-Fn_{10}\)), hybrid functions (\(Fn_{11}-Fn_{19}\)), and composition functions (\(Fn_{20}-Fn_{29}\)). The search space of each benchmark function is represented as \([-100,100]^D\), where D is the dimension. The number of iterations over 20 runs, population size, and dimensions are considered as 1000, 60, and 50, respectively. The comparative analysis is performed on the state-of-the-art algorithms to determine the effectiveness of RCSO. Table 3 shows the comparative analysis of unimodal functions (\(Fn_1- Fn_3\)), multimodal functions (\(Fn_4-Fn_{10}\)), hybrid functions (\(Fn_{11}-Fn_{19}\)), and composition functions (\(Fn_{20}-Fn_{29}\)) in the context of obtained mean and the best fitness values. The observation depicts that RCSO provides better mean and the best fitness values for 20 benchmark functions which are the highest among the state-of-the-art methods. Furthermore, the convergence trend is depicted on representative benchmark problems, namely \(Fn_{1}\), \(Fn_{4}\), \(Fn_{11}\), and \(Fn_{21}\), are shown in Fig. 4. From the figure, it can be observed that proposed RCSO algorithm converges towards the global optimum as compared to other methods. Thus, it can be stated that RCSO exploits effectively for exploring the optimal solution. Therefore, the demonstration shows that RCSO outperforms and gives significant results when compared with other meta-heuristics algorithms.

Fig. 4
figure 4

Convergence graphs of representative benchmark functions; a \(F_1\), b \(F_4\), c \(F_{11}\), and d \(F_{21}\). The x-axis represents the number of iterations and y-axis shows the fitness values

Moreover, for statistical analysis, Kruskal–Wallis, Wilcoxon, and Friedman tests have been performed at 95% of the confidence interval to validate the acquired results. The formulated hypothesis is mentioned below.

  1. 1.

    \(H_0\) (Null hypothesis) determines that all the samples are significantly equal.

  2. 2.

    \(H_1\) (Alternate hypothesis) determines that there is a significant difference among the samples.

The statistical tests were conducted on the best and mean fitness values on benchmark functions. The considered sample size (n) to apply test is 29 drawn from each algorithm. The Kruskal–Wallis and Wilcoxon test are the non-parametric statistical tests that balance the paired group. In Tables 4 and 5, five pairs are created, namely, RCSO-PSO, RCSO - WOA, RCSO-CSO, and RCSO-LOA. Hence, to determine the correct behaviour of the algorithm, multiple comparisons have been experimented. From the tables, it can be observed that the estimated p value for each pair is less than 0.05. Therefore, \(H_0\) can be rejected. Moreover, Friedman’s test gives the minimum mean and the the best rank values for RCSO as compared to other meta-heuristics techniques as depicted in Table 6. Hence, RCSO provides significant results for the best and mean fitness values.

Performance analysis of NBOF method

Table 4 Statistical analysis using Wilcoxon test
Table 5 Statistical analysis using Kruskal–Wallis test

The proposed new bag-of-features (NBOF) method generates and represents the optimal visual words. The performance of NBOF is measured on classification of 640 stained tissue histopathological images, collected from two separate databases, containing four organs, namely Spleen, Kidney, Lung, and Breast. However, 120 histopathological images are considered for each organ. The RCSO-BOF algorithm is compared with the existing state-of-art algorithms and classified the dataset using two methods, namely, SVM and MLP. The quality parameters considered for computing the effectiveness of algorithms are recall, precision, F1-score, and accuracy. Tables 7 and 8 show the results achieved by applying SVM and MLP classifiers. The average recall, precision, F1-score, and accuracy obtained for RCSO-based BOF using SVM method are 0.80, 0.71, 0.71, and 0.70, respectively. Moreover, overall recall, precision, F1-score, and accuracy obtained using MLP technique are 0.79, 0.77, 0.77, and 0.75, respectively. Both the classifiers provide the promising results as compared to other state-of-the-art algorithms. The observations and estimated values in Tables 7 and 8 show that RCSO-based BOF method outperforms the other different classification methods and gives appropriate experimental results for all the parameters.

Table 6 Mean rank and the best rank of the algorithms using Friedman test
Table 7 Comparative classification analysis of RCSO-BOF based on SVM

Furthermore, Figs. 5 and 6 depict the bar graphs for the results, gathered by applying SVM and MLP, respectively, on Lung, Kidney, Breast, and Spleen. The pictorial representations show that the proposed algorithm (RCSO-BOF) covers the larger region than other considered algorithms, namely, PSO-BOF, WOA-BOF, CSO-BOF, and LOA-BOF, for both the SVM and MLP. Thus, the observation states that RCSO-BOF-based method provides better results in comparison to other approaches.

Furthermore, the confusion matrices are shown in Tables 9 and 10 for classification of benign and malignant histopathological images. Table 9 shows the confusion matrix of lung and kidney histology images based on RCSO-BOF method using SVM and MLP classifiers. Table 10 shows the confusion matrix of spleen and breast histology images based on RCSO-BOF method using SVM and MLP classifiers. From Tables 9 and 10, it can be visualized that the correctly identified lung, kidney, spleen, and breast tissues for benign category using SVM technique are 73%, 100%, 96%, and 80%, respectively. Furthermore, it can be observed that the malignant category acquires true-positive values for lung, kidney, spleen, and breast tissues as 73%, 70%, 76%, and 75%, respectively. However, MLP method provides lung, kidney, spleen, and breast tissues for benign category based on RCSO-BOF as 93%, 100%, 80%, and 84%, respectively. Moreover, malignant category obtains true-positive values as 66%, 89%, 98%, and 88%, respectively, using MLP classifier. From the results analysis, it can be stated that the proposed NBOF method outperforms the other state-of-the-art methods.

Table 8 Comparative classification analysis of RCSO-BOF based on MLP

Moreover, the computational time complexity of the proposed algorithm is compared with existing methods and is shown in Table 11. The observation depicts that the time taken by the proposed RCSO is lesser (140.12) than the other meta-heuristic algorithms. The convergence speed of the PSO is worst, because it took maximum computational time (195.612) to reach the global solution. Therefore, the result analysis indicates that RCSO has a higher tendency of convergence to the global optimum. Furthermore, it can be concluded that the proposed RCSO is a cost-effective computational method and can converge to a global optimum solution quickly.

Fig. 5
figure 5

Bar graphs for RCSO-BOF method on SVM classifier for different categories of histopathology images; a lung, b kidney, c spleen, and d breast

Fig. 6
figure 6

Bar graphs for RCSO-BOF method on MLP classifier for different categories of histopathology images; a lung, b kidney, c spleen, and d breast

Table 9 Confusion matrix for lung and kidney image classification
Table 10 Confusion matrix for spleen and breast image classification
Table 11 Computational time taken
Table 12 Comparative classification performance measures of lung images
Table 13 Comparative classification performance measures of kidney images
Table 14 Comparative classification performance measures of spleen images
Table 15 Comparative classification performance measures of breast images

On the basis of Tables 9 and 10, the comparison performance metrics of the considered methods for four categories, namely, lung, kidney, spleen, and breast, are computed and presented in Tables 12, 13, 14, and 15, respectively. In Table 12, the observation is shown for lung benign and malignant images. The acquired recall, accuracy, and specificity, precision, and negative predictive values for lung benign images by the proposed RCSO-BOF method are 0.79, 0.81, 0.86, 0.79, and 0.88 using SVM and 0.88, 0.94, 0.97, 0.86, and 0.90 using MLP, respectively. Moreover, the obtained values for malignant category are 0.83, 0.85, 0.91, 0.83, and 0.93 using SVM and 0.93, 0.99, 0.98, 0.91, and 0.96 using MLP, respectively. Furthermore, the recall, accuracy, specificity, precision, and negative predictive value for RCSO-BOF method on kidney benign images are shown in Table 13 as 0.75, 0.95, 0.84, 0.88, and 0.74 using SVM and 0.89, 0.99, 0.71, 0.88, and 0.82 using MLP. The results for malignant kidney images are 0.72, 0.92, 0.81, 0.85, and 0.71 based on SVM and 0.86, 0.95, 0.68, 0.84, and 0.79 based on MLP, respectively.

In Table 14, the observations for spleen benign images show that the obtained recall, accuracy, specificity, precision, and negative predictive values for RCSO-BOF method using SVM are 0.77, 0.97, 0.81, 0.78, 0.90, and 0.80 , 0.99, 0.82, 0.80, and 0.92 using MLP, respectively. Likewise, the obtained values for malignant spleen images are 0.82, 0.98, 0.85, 0.83, and 0.94 using SVM and 0.84, 0.88, 0.87, 0.84, and 0.96 using MLP, respectively. The results in Table 15 depict that the recall, accuracy, specificity, precision, and negative predictive values for RCSO-BOF method on breast benign images are 0.67, 0.80, 0.79 ,0.80, and 0.65 using SVM and 0.79, 0.85, 0.88, 0.75, and 0.80 using MLP, respectively. However, for the malignant category of spleen, the observation shows the acquired results as 0.60, 0.72, 0.71, 0.72, and 0.59 using SVM and 0.71, 0.76, 0.79, 0.68, and 0.72 using MLP, respectively. From the result analysis, it can be stated that the proposed NBOF method outperforms the other state-of-the-art methods. Hence, the NBOF method may be integrated for the support of the pathologists under various required legal procedures [51, 52].

Conclusion

Automated histopathological image classification plays a significant role in acquiring quantitative analysis and supports decision-making process. This paper uses different feature extraction methods, namely GLCM, GLRLM, GLDM, LBP, and HOG for gathering the features. Furthermore, the features are given into a new RCSO-based clustering method for determining the optimal visual words in BOF. The frequencies of each optimal visual features are demonstrated in the form of histogram using new weighted Gaussian mixture modelling in BOF. The generated BOF is given to SVM and MLP networks to classify benign or malignant along with different categories of histopathological images. RCSO algorithm provides the optimal solution and is tested on IEEE CEC 2017 benchmark standard functions. The convergence behaviour shows that RCSO provides more prominent results as compared to existing state-of-the-art algorithms. Furthermore, rigorous statistical test results validate the significance of the proposed algorithm. The experimental results of RCSO-BOF are analyzed and compared with PSO-BOF, WOA-BOF, CSO-BOF, and LOA-BOF methods.

In future work, RCSO algorithm may be used to quantify the tissue cells. Moreover, the accuracy and complexity of the classification system may be improved by fine-tuning of the parameters and using parallel algorithms, respectively. Furthermore, the integration of the developed algorithm with human intelligence may be explored for better learning and decision-making. However, such integration should follow the legal procedures for the human safety and liability implications of AI.