## 3 Proposed Method
### Classification of the Lesion  
For this step, a new artificial immune system (AIS) is proposed, which presents a competitive performance for breast cancer classification.  
The proposed algorithm uses two different responses (adaptive immune response and innate immune response), which can be seen analogously as the training phase and classification phase in pattern recognition. The innate immune response will use the antibodies generated in the previous response to classifying each pattern according to the most similar antibody, while the adaptive immune response is based on grouping the patterns into random groups without replacement for each of the classes.  
Later, a mean pattern (antigen) will be calculated from the groups formed above. The class of the grouped patterns will be assigned to each generated pattern. The mean calculates the performance of the aforementioned set of patterns, using the antibodies as models to classify.  
The algorithm performs the adjustment of the antibodies by making the antibodies approach their most similar pattern and moving them away from different class patterns.  
Subsequently, it generates clones for each antibody, and it controls this increase, obtaining an average of the clones generated by each antibody.  
In the adaptive immune response, the algorithm will generate artificial antibodies that will be used as structures that will remember recognized patterns (antigens) and will have the ability to identify new antigens.  
Once it completes the adaptive immune response (training phase), it will use the final antibodies generated for the classification of the other patterns (innate immune response). This classification will be performed by finding the closest antibody to each pattern, so the assigned class of each pattern will be one of the closest antibodies.  
As a summary:  
The adaptive immune response consists of five phases:  
1. Detection of antigenic macromolecules: Groups are generated where patterns are randomly grouped according to their class.
2. Activation of B lymphocytes: Representative antibodies are generated for a set of patterns by the average in each group.
3. Immune response regulation: The antibodies are adjusted, approaching them with similar antibodies and moving away from different antibodies.
4. Development of adaptive immunity: Cloning of the antibodies is performed. Surplus antibodies are also eliminated in an elitist way.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Group** & **Description** & **Features** \\ \hline Clinical and general data & General information of the patient and mammography & Age, breast density, image view, mammography \\ \hline Intensity descriptors & Computed directly from the grey-levels of the pixels inside the lesion’s contour & Mean, standard deviation, skewness, kurtosis, \\ \hline Texture descriptors & Computed from the grey-level & \\  & co-occurrence matrix related to the & Energy, contrast, correlation, entropy, etc. \\  & bounding box of lesion’s contour & \\ \hline Shape and location descriptors & Descriptors of the lesion’s contour & Area, perimeter, center of mass, circularity, \\  & & elongation, form, solidity and extent. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Characteristics extracted from the images.  
Resolution of threat: Antibodies are stored in the immune memory to be used in the innate immune response.  
The Innate immune response consists of one phase:  
1. Resolution of threat: For each pattern, its similarity will be compared with the antibodies stored in immune memory. The antibody class of the antibody with greater similarity will be assigned. The results applied in mammographic images are presented in the following section.