186 Our Ais behaves as follows: At each step(iteration) an antibodys concentration is increased by an amount dependent on its matching to the antigen and decreased by an amount which depends on its matching to other antibodies. In absence of either, an antibodys concentration will slowly decrease over time. Antibodies with a suf- ficiently low concentration are removed from the system, whereas antibodies with a high concentration may saturate An Als iteration is governed by the following ue to Farmer et al. [11] antibodies I death recognised recognised kI liji- where N is the number of antibodies and n is the number of antigens, xi(or xi)is the concentration of antibody i (or j), yi is the concentration of antigen j, c is a rate constant, kI is a suppressive effect and k2 is the death rate, m ii is the matching function between antibody i and antibody (or antigen)j As can be seen from the above equation, the nature of an idiotypic interaction an be either positive or neg reover, if the matching function is symmetric, then the balance between"I am recognised"and"Antibodies recognised"(para meters c and kI in the equation) wholly determines whether the idiotypic effect is positive or negative, and we can simplify the equation. We can simplify the equa tion still further if we only allow one antigen in the AIs. The simplified equation looks like thi dxi=k> n= k mjxx一k3x, (4) where ki is stimulation, k2 suppression and k3 death rate, m; is the correlation be- tween antibody i and the(sole)antigen, x; (or xj)is the concentration of antibody i(or j), y is the concentration of the( sole)antigen, mij is the correlation between antibodies i and j, n is the number of antibodies. In the new equation, the first term is simplified as we only have one antigen, and the suppression term is normalised to allow a" like for like'comparison between the different rate constants. ki and k, were varied as described in Section 3. k3 was fixed at 0.1, while the concentration range was set at 0-100(initially 10). We fixed n at 100. The matching function is the absolute value of the Pearson cor relation measure. This allows us to have both positively and negatively correlated users in our neighbourhood, which increases the pool of neighbours available to The AIs is considered stable after iterating for ten iterations without changing in size. Stabilisation thus means that a sufficient number of 'good neighbours have been identified and therefore a prediction can be made. 'Poor'neighbours would be expected to drop out of the als after a few iterations
186 STEVE CAYZER AND UWE AICKELIN Our AIS behaves as follows: At each step (iteration) an antibody’s concentration is increased by an amount dependent on its matching to the antigen and decreased by an amount which depends on its matching to other antibodies. In absence of either, an antibody’s concentration will slowly decrease over time. Antibodies with a suf- ficiently low concentration are removed from the system, whereas antibodies with a high concentration may saturate. An AIS iteration is governed by the following equation, due to Farmer et al. [11]: dxi dt = c antibodies recognised − I am recognised + antigens recognised − death rate = c N j=1 mjixixj − k1 N j=1 mijxixj +n j=1 mjixiyj − k2xi, (3) where N is the number of antibodies and n is the number of antigens, xi (or xj ) is the concentration of antibody i (or j ), yi is the concentration of antigen j , c is a rate constant, k1 is a suppressive effect and k2 is the death rate, mji is the matching function between antibody i and antibody (or antigen) j . As can be seen from the above equation, the nature of an idiotypic interaction can be either positive or negative. Moreover, if the matching function is symmetric, then the balance between “I am recognised” and “Antibodies recognised” (parameters c and k1 in the equation) wholly determines whether the idiotypic effect is positive or negative, and we can simplify the equation. We can simplify the equation still further if we only allow one antigen in the AIS. The simplified equation looks like this: dxi dt = k1mixiy − k2 n n j=1 mijxixj − k3xi, (4) where k1 is stimulation, k2 suppression and k3 death rate, mi is the correlation between antibody i and the (sole) antigen, xi (or xj ) is the concentration of antibody i (or j ), y is the concentration of the (sole) antigen, mij is the correlation between antibodies i and j , n is the number of antibodies. In the new equation, the first term is simplified as we only have one antigen, and the suppression term is normalised to allow a ‘like for like’ comparison between the different rate constants. k1 and k2 were varied as described in Section 3. k3 was fixed at 0.1, while the concentration range was set at 0–100 (initially 10). We fixed n at 100. The matching function is the absolute value of the Pearson correlation measure. This allows us to have both positively and negatively correlated users in our neighbourhood, which increases the pool of neighbours available to us. The AIS is considered stable after iterating for ten iterations without changing in size. Stabilisation thus means that a sufficient number of ‘good’ neighbours have been identified and therefore a prediction can be made. ‘Poor’ neighbours would be expected to drop out of the AIS after a few iterations.
A RECOMMENDER SYSTEM BASED ON IDIOTYPIC ARTIFICIAL IMMUNE NETWORKS 187 Once the ais has stabilised using the above algorithm, we use the antibody concentration to weigh the neighbours. However, early experiments showed that the most recently added antibodies were at a disadvantage compared to earlier antibodies. This is because they have had no time to mature (i.e. increase in con- centration). Likewise, the earliest antibodies had saturated. To overcome this, we reset the concentrations and allow a limited run of the ais to differentiate the Reset als(set all antibodies to initial concentrations) WHILE (No antibody at maximum concentration) DO Iterate AIs OD 2.5. PREDICtION We predict a rating pi by using a weighted average over N, the neighbourhood of u. which was taken as the entire aIs u ∑neNl Wwy= ruoxu (NB relative not absolute) where wu is the weight between users u and u, ruy is the correlation score between u and u, and xu is the concentration of the antibody corresponding to user u 2,6. EVALUATION Prediction Accuracy: We take the mean absolute error, where n, is the number of predictions actual -predicted MAE= Mean number of recommendations: This is the total number of unique films rated by the neighbours Mean overlap size: This is the number of recommendations that the user has also seen Mean accuracy of recommendations: Each overlapped film has an actual vote (from the antigen) and a predicted vote( from the neighbours). The overlapped films were ranked on both actual and predicted vote, breaking ties by movie ID. The two ranked lists were compared using Kendalls Tau t. This measure eflects the level of concordance in the lists by counting the number of dis- cordant pairs. To do this we order the films by vote and apply the following formulae
A RECOMMENDER SYSTEM BASED ON IDIOTYPIC ARTIFICIAL IMMUNE NETWORKS 187 Once the AIS has stabilised using the above algorithm, we use the antibody concentration to weigh the neighbours. However, early experiments showed that the most recently added antibodies were at a disadvantage compared to earlier antibodies. This is because they have had no time to mature (i.e. increase in concentration). Likewise, the earliest antibodies had saturated. To overcome this, we reset the concentrations and allow a limited run of the AIS to differentiate the concentrations: Reset AIS (set all antibodies to initial concentrations) WHILE (No antibody at maximum concentration) DO Iterate AIS OD 2.5. PREDICTION We predict a rating pi by using a weighted average over N, the neighbourhood of u, which was taken as the entire AIS. pi = ¯u + v∈N wuv(vi − ¯v) v∈N wuv , (5) wuv = ruvxv (NB relative not absolute), where wuv is the weight between users u and v, ruv is the correlation score between u and v, and xv is the concentration of the antibody corresponding to user v. 2.6. EVALUATION • Prediction Accuracy: We take the mean absolute error, where np is the number of predictions: MAE = |actual − predicted| np . (6) • Mean number of recommendations: This is the total number of unique films rated by the neighbours. • Mean overlap size: This is the number of recommendations that the user has also seen. • Mean accuracy of recommendations: Each overlapped film has an actual vote (from the antigen) and a predicted vote (from the neighbours). The overlapped films were ranked on both actual and predicted vote, breaking ties by movie ID. The two ranked lists were compared using Kendall’s Tau τ . This measure reflects the level of concordance in the lists by counting the number of discordant pairs. To do this we order the films by vote and apply the following formulae: