## Software for computing attribute disclosure for k-anonymity ## (c) Vicenç Torra ## Current version: 20241118 ## References: ## ## V. Torra, G. Navarro-Arribas, Attribute disclosure risk for k-anonymity: ## the case of numerical data. Int. J. Inf. Sec. 22:6 (2023) 2015-2024 ## https://doi.org/10.1007/s10207-023-00730-x ## ## V. Torra, A guide to data privacy, Springer, 2022. ## https://doi.org/10.1007/978-3-031-12837-0 ## ## This software describes the experiments we perform in the paper ## about assessing attribute disclosure risk ## ## Main function: integration and analysis ## dbTestGenericMP (trOX, trOY, teOX, teOY, n1, ncv, nv, mmethod, params, modelRegression, erOrDiff = True) ## Other functions: ## dbIntegration (db1, db2, lol, fromDB1, whereDB1inDB, fromDB2, whereDB2inDB) ## database integration ## Computation of results: ## ## These files are needed. Also available in: https://mdai.cat/code/?llengua=en ## ## ## exec(open("prog.vectors.matrices.web.txt").read()) ## exec(open("prog.sdc.web.txt").read()) ## import numpy as np # from itertools import starmap # from functools import reduce # import random ## Definitions ## ================================================ def riskMyEpsilon(): return (0.00001) def countTrue (lol): return (sum(map(lambda row:sum(map(lambda x:1 if x else 0, row)),lol))) def from0to1 (lol): return (list(map(lambda row:list(map(lambda x:1 if x else 0, row)),lol))) ## Rules for detecting sensitive cells ## ================================================ ## Usual to use with n=1 or n=2, and k>0.6 ## n=2 marks additional cells as sensitive ones ## allValues shouldn't be normalized. ruleNK provides different results when values are normalized def ruleNK (n, k, allValues, nRecords): newV = allValues.copy() ## newV.sort() ### THIS IS WRONG newV.sort(reverse=True) # print(allValues) # print(newV) # print(newV) num = sum(newV[0:n]) den = sum(allValues) # if (sum(newV[0:n]) / sum(allValues)>k): # print "sensitive" if (den < riskMyEpsilon()): return (False) ## (num < den) and both zero else: return ((num / den) > k) ## p, q should both be percentages (in [0,100]) or proportions (in [0,1]) ## allValues shouldn't be normalized. rulePQ provides different results when values are normalized def rulePQ (p, q, allValues, nRecords): if (nRecords<2): return False else: newV = allValues.copy() ## newV.sort() ### THIS IS WRONG newV.sort(reverse=True) return(q * sum(newV[2:]) < p*newV[0]) ## NOTE: If p is in [0,1] (proportion, not percentage), then q=1 when calling rulePQ ## allValues shouldn't be normalized. ruleP provides different results when values are normalized def ruleP (p, allValues, nRecords): return rulePQ (p, 1, allValues, nRecords) ## NKn: number of records ## NKk: proportion (i.e., in [0,1]) ## PQp: proportion (i.e., in [0,1]) ## PQq: proportion (i.e., in [0,1]) ## Pp: proportion (i.e., in [0,1]) ## Example: ## rIris = riskMDAV(iris_fRowsNorm, 10, 1, 0.6, -1) def riskAssignment (db, assignedCl, dbMean, dbSD, k, NKn, NKk, Pp=-1): """ Function: (called by riskOfFileAssignment) Risk for a single file when we already have an assignment of records to class. """ if Pp==-1: Pp = 1 * (1-NKk)/NKk # print(Pp) values = set(assignedCl) centroids = [] totalRNK = [] # One position for each cluster totalRP = [] # One position for each cluster totalSD = [] # One position for each cluster for cl in values: rowsCl = selectFv(db,assignedCl, lambda x:x==cl) meanRow = matrixColumnMeans(rowsCl) centroids.append(meanRow) totalRNKcl = [] # One position for variable totalRPcl = [] # One position for variable totalSDcl = [] # One position for variable for i in range(len(meanRow)): allValues = list(map(lambda row:row[i]*dbSD[i]+dbMean[i], rowsCl)) valueSDcl = np.std(allValues) totalSDcl.append(valueSDcl) sensitiveRNK = ruleNK(NKn, NKk, allValues, len(allValues)) totalRNKcl.append(sensitiveRNK) sensitiveRP = ruleP (Pp, allValues, len(allValues)) totalRPcl.append(sensitiveRP) totalRNK.append(totalRNKcl) totalRP.append(totalRPcl) totalSD.append(totalSDcl) # newDb = [centroids[assignedCl[i]] for i in range(0,len(db))] # return(newDb) return(totalRNK,totalRP,totalSD) def riskOfFileAssignment (dbNorm, assignedCl, dbMean, dbSD, microK, rNKn, rNKk, Pp): """ Function: Main function Risk for a single file when we already have an assignment of records to class. Example: riskOfFileAssignment(f1080_fRowsNorm, mondrianCl(f1080_fRowsNorm,5),f1080_fMeans, f1080_fSD, 5, 1, 0.6, -1) """ risks = riskAssignment(dbNorm, assignedCl, dbMean, dbSD, microK, rNKn, rNKk, Pp) rNKs = countTrue(risks[0]) # Sensitive RNK rPs = countTrue(risks[1]) # Sensitive RP nCells = len(risks[0])*len(risks[0][0]) print("rNKs="+str(rNKs)+", rPs="+str(rPs)+" nCells="+str(nCells)+"rNKs/nC="+str(rNKs/nCells)+", rPs/nC="+str(rPs/nCells)) return(rNKs, rPs, nCells) def riskMDAV (db, dbMean, dbSD, k, NKn, NKk, Pp=-1): """ Function: (Main function riskOfFile) Risk of MDAV """ if Pp==-1: Pp = 1 * (1-NKk)/NKk # print(Pp) assignedCl = mdavCl(db,k) values = set(assignedCl) centroids = [] totalRNK = [] # One position for each cluster totalRP = [] # One position for each cluster totalSD = [] # One position for each cluster for cl in values: rowsCl = selectFv(db,assignedCl, lambda x:x==cl) meanRow = matrixColumnMeans(rowsCl) centroids.append(meanRow) totalRNKcl = [] # One position for variable totalRPcl = [] # One position for variable totalSDcl = [] # One position for variable for i in range(len(meanRow)): allValues = list(map(lambda row:row[i]*dbSD[i]+dbMean[i], rowsCl)) valueSDcl = np.std(allValues) totalSDcl.append(valueSDcl) sensitiveRNK = ruleNK(NKn, NKk, allValues, len(allValues)) totalRNKcl.append(sensitiveRNK) sensitiveRP = ruleP (Pp, allValues, len(allValues)) totalRPcl.append(sensitiveRP) totalRNK.append(totalRNKcl) totalRP.append(totalRPcl) totalSD.append(totalSDcl) # newDb = [centroids[assignedCl[i]] for i in range(0,len(db))] # return(newDb) return(totalRNK,totalRP,totalSD) def riskMDAVTM (db, dbMean, dbSD, k, NKn, NKk, Pp=-1): """ Function: (main function: riskOfFileMT) Risk of MDAV but using the trimmed mean """ if Pp==-1: Pp = 1 * (1-NKk)/NKk # print(Pp) assignedCl = mdavCl(db,k) values = set(assignedCl) centroids = [] totalRNK = [] # One position for each cluster totalRP = [] # One position for each cluster totalSD = [] # One position for each cluster for cl in values: rowsCl = selectFv(db,assignedCl, lambda x:x==cl) meanRow = matrixColumnMeans(rowsCl) centroids.append(meanRow) totalRNKcl = [] # One position for variable totalRPcl = [] # One position for variable totalSDcl = [] # One position for variable for i in range(len(meanRow)): unsortedValues = list(map(lambda row:row[i]*dbSD[i]+dbMean[i], rowsCl)) unsortedValues.sort(reverse=True) allValues = unsortedValues[1:len(unsortedValues)-1] valueSDcl = np.std(allValues) totalSDcl.append(valueSDcl) sensitiveRNK = ruleNK(NKn, NKk, allValues, len(allValues)) totalRNKcl.append(sensitiveRNK) sensitiveRP = ruleP (Pp, allValues, len(allValues)) totalRPcl.append(sensitiveRP) totalRNK.append(totalRNKcl) totalRP.append(totalRPcl) totalSD.append(totalSDcl) # newDb = [centroids[assignedCl[i]] for i in range(0,len(db))] # return(newDb) return(totalRNK,totalRP,totalSD) def riskOfFile (dbNorm, dbMean, dbSD, microK, rNKn, rNKk, Pp): """ Function: To compute the risk of a whole file using MDAV """ risks = riskMDAV(dbNorm, dbMean, dbSD, microK, rNKn, rNKk, Pp) rNKs = countTrue(risks[0]) # Sensitive RNK rPs = countTrue(risks[1]) # Sensitive RP nCells = len(risks[0])*len(risks[0][0]) print("rNKs="+str(rNKs)+", rPs="+str(rPs)+" nCells="+str(nCells)+"rNKs/nC="+str(rNKs/nCells)+", rPs/nC="+str(rPs/nCells)) return(rNKs, rPs, nCells) def riskOfFileTM (dbNorm, dbMean, dbSD, microK, rNKn, rNKk, Pp): """ Function: To compute the risk of a whole file using MDAV with trimmed mean """ risks = riskMDAVTM(dbNorm, dbMean, dbSD, microK, rNKn, rNKk, Pp) rNKs = countTrue(risks[0]) # Sensitive RNK rPs = countTrue(risks[1]) # Sensitive RP nCells = len(risks[0])*len(risks[0][0]) print("rNKs="+str(rNKs)+", rPs="+str(rPs)+" nCells="+str(nCells)+"rNKs/nC="+str(rNKs/nCells)+", rPs/nC="+str(rPs/nCells)) return(rNKs, rPs, nCells) ## Some functions to plot the results ## ========================================== import matplotlib.pyplot as plt def plotRisks (microKValues, risks): plt.close() # plt.plot(microKValues, list(map(lambda x:x[0],risks))) # plt.plot(microKValues, list(map(lambda x:x[1],risks))) plt.plot(microKValues, list(map(lambda x:x[0]/x[2],risks))) plt.plot(microKValues, list(map(lambda x:x[1]/x[2],risks))) plt.show() def plot5Risks (microKValues, risks1, risks2, risks3, risks4, risks5, plotType, fName): plt.close() f = lambda x:x[0] if plotType==0: f = lambda x:x[0] if plotType==1: f = lambda x:x[1] if plotType==10: f = lambda x:x[0]/x[2] if plotType==11: f = lambda x:x[1]/x[2] # plt.plot(microKValues, list(map(lambda x:x[0],risks))) # plt.plot(microKValues, list(map(lambda x:x[1],risks))) plt.plot(microKValues, list(map(f,risks1))) plt.plot(microKValues, list(map(f,risks2))) plt.plot(microKValues, list(map(f,risks3))) plt.plot(microKValues, list(map(f,risks4))) plt.plot(microKValues, list(map(f,risks5))) # plt.plot(microKValues, list(map(lambda x:x[1]/x[2],risks))) # plt.show() plt.savefig(fName, format='eps') def plot6Risks (microKValues, risks1, risks2, risks3, risks4, risks5, risks6, plotType, fName): xmin = 0 xmax = microKValues[len(microKValues)-1] ymin = 0 plt.close() f = lambda x:x[0] if plotType==0: f = lambda x:x[0] ymax = 500 if plotType==1: f = lambda x:x[1] ymax = 500 if plotType==10: f = lambda x:x[0]/x[2] ymax = 1 if plotType==11: f = lambda x:x[1]/x[2] ymax = 1 # plt.plot(microKValues, list(map(lambda x:x[0],risks))) # plt.plot(microKValues, list(map(lambda x:x[1],risks))) plt.axis([xmin, xmax, ymin, ymax]) plt.plot(microKValues, list(map(f,risks1)), '', label='r1') plt.plot(microKValues, list(map(f,risks2)), ':', label='r2') plt.plot(microKValues, list(map(f,risks3)), '--', label='r3') plt.plot(microKValues, list(map(f,risks4)), '', label='r4') plt.plot(microKValues, list(map(f,risks5)), ':', label='r5') plt.plot(microKValues, list(map(f,risks6)), '--', label='r6') # plt.plot(microKValues, list(map(lambda x:x[1]/x[2],risks))) # plt.show() plt.legend(loc='upper right', shadow=True, fontsize='x-small') plt.savefig(fName, format='eps') def plotLoRisks (microKValues, loRisks, plotType, fName, ymax=None): xmin = 0 xmax = microKValues[len(microKValues)-1] ymin = 0 if ymax==None: ymax = 500 if plotType==0 or plotType==1 else 1 plt.close() f = lambda x:x[0] if plotType==0: f = lambda x:x[0] if plotType==1: f = lambda x:x[1] if plotType==10: f = lambda x:x[0]/x[2] if plotType==11: f = lambda x:x[1]/x[2] # plt.plot(microKValues, list(map(lambda x:x[0],risks))) # plt.plot(microKValues, list(map(lambda x:x[1],risks))) plt.axis([xmin, xmax, ymin, ymax]) typeLine = 0 numLine = 1 shapeLine = ['', ':', '--'] for risk in loRisks: plt.plot(microKValues, list(map(f,risk)), shapeLine[typeLine], label='r'+str(numLine)) typeLine = (typeLine + 1) % 3 numLine = numLine +1 plt.legend(loc='upper right', shadow=True, fontsize='x-small') plt.savefig(fName, format='eps') ## Experiments in the paper ## =========================================== ## EXPERIMENTS related to SDC: ----------------------------------------------------------------------------- ## ## ## DATA: Reading files ... adult_fHeader, adult_fRows = readNumericalFileWithHeader("adult_num.csv") adult_fMeans, adult_fSD, adult_fRowsNorm = normalizeMatrixByColumn(adult_fRows) concrete_fHeader, concrete_fRows = readNumericalFileWithHeader("Concrete_DataVarsV1V7.csv") concrete_fMeans, concrete_fSD, concrete_fRowsNorm = normalizeMatrixByColumn(concrete_fRows) f1080_fHeader, f1080_fRows = readNumericalFileWithHeader("1080.csv") f1080_fMeans, f1080_fSD, f1080_fRowsNorm = normalizeMatrixByColumn(f1080_fRows) abalone_fRows = readNumericalFileWithComments("abalone.data.numeric.csv") abalone_fMeans, abalone_fSD, abalone_fRowsNorm = normalizeMatrixByColumn(abalone_fRows) iris_fRows = readNumericalFileWithComments("iris.data.numeric.csv") iris_fMeans, iris_fSD, iris_fRowsNorm = normalizeMatrixByColumn(iris_fRows) ionosphere_fRows = readNumericalFileWithComments("ionosphere.data.numeric.csv") ionosphere_fMeans, ionosphere_fSD, ionosphere_fRowsNorm = normalizeMatrixByColumn(ionosphere_fRows) ## Table 1: ## \begin{table} ## \begin{center} ## \begin{tabular}{l|lll|lll|} ## & Abalone & & & Iris & & \\ ## \hline ## & dominance rule & rule $p\%$ & n. cells & dominance rule & rule $p\%$ & n. cells \\ ## \hline ## \hline ## 1& 750 & 0 & 750 & 37591& 0 & 37593 \\ ## 2& 375 & 375 & 375 & 18791& 18782& 18792\\ ## 3& 250 & 13 & 250 & 12519& 909& 12528\\ ## 4& 10 & 0 & 185 & 473 & 10& 9396\\ ## 5& 4 & 1 & 150 & 44& 6& 7515\\ ## 6& 1 & 0 & 125 & 6 & 5& 6264\\ ## 7& 1 & 1 & 105 & 5 & 5& 5364\\ ## 8& 0 & 0 & 90 & 5 & 4& 4698\\ ## 9& 0 & 0 & 80 & 5 & 4& 4176\\ ## \hline ## \end{tabular} ## \end{center} ## \caption{Number of sensible cells for abalone and iris data set, when data is masked with MDAV and different parameters $k$.\label{tab.mdav.1.9.n.cells}} ## \end{table} microKValues = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,23,24,25,30,40,50,75,100,125] abalone_risks_20606paper = list(map(lambda microK: riskOfFile(abalone_fRowsNorm, abalone_fMeans, abalone_fSD, microK, 2, 0.6, 0.6), microKValues)) iris_risks_20606paper = list(map(lambda microK: riskOfFile(iris_fRowsNorm, iris_fMeans, iris_fSD, microK, 2, 0.6, 0.6), microKValues)) # iris_risks_20606paper = [(750, 0, 750), (375, 375, 375), (250, 13, 250), (10, 0, 185), (4, 1, 150), (1, 0, 125), (1, 1, 105), (0, 0, 90), (0, 0, 80), (0, 0, 75), (0, 0, 65), (0, 0, 60), (0, 0, 55), (0, 0, 50), (0, 0, 50), (0, 0, 35), (0, 0, 35), (0, 0, 30), (0, 0, 30), (0, 0, 30), (0, 0, 30), (0, 0, 25), (0, 0, 15), (0, 0, 15), (0, 0, 10), (0, 0, 5), (0, 0, 5)] # abalone_risks_20606paper = [(37591, 0, 37593), (18791, 18782, 18792), (12519, 909, 12528), (473, 10, 9396), (44, 6, 7515), (6, 5, 6264), (5, 5, 5364), (5, 4, 4698), (5, 4, 4176), (5, 4, 3753), (5, 3, 3411), (5, 3, 3132), (4, 2, 2889), (4, 2, 2682), (3, 1, 2502), (1, 1, 1872), (1, 1, 1782), (1, 1, 1701), (1, 1, 1629), (1, 1, 1566), (1, 1, 1503), (1, 0, 1251), (0, 0, 936), (0, 0, 747), (0, 0, 495), (0, 0, 369), (0, 0, 297)] microKValues = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,23,24,25,30,40,50,75,100,125] concrete_risks = list(map(lambda microK: riskOfFile(concrete_fRowsNorm, concrete_fMeans, concrete_fSD, microK, 1, 0.6, -1), microKValues)) abalone_risks = list(map(lambda microK: riskOfFile(abalone_fRowsNorm, abalone_fMeans, abalone_fSD, microK, 1, 0.6, -1), microKValues)) f1080_risks = list(map(lambda microK: riskOfFile(f1080_fRowsNorm, f1080_fMeans, f1080_fSD, microK, 1, 0.6, -1), microKValues)) iris_risks = list(map(lambda microK: riskOfFile(iris_fRowsNorm, iris_fMeans, iris_fSD, microK, 1, 0.6, -1), microKValues)) ionosphere_risks = list(map(lambda microK: riskOfFile(ionosphere_fRowsNorm, ionosphere_fMeans, ionosphere_fSD, microK, 1, 0.6, -1), microKValues)) adult_risks = list(map(lambda microK: riskOfFile(adult_fRowsNorm, adult_fMeans, adult_fSD, microK, 1, 0.6, -1), microKValues)) concrete_risks_20606 = list(map(lambda microK: riskOfFile(concrete_fRowsNorm, concrete_fMeans, concrete_fSD, microK, 2, 0.6, 0.6), microKValues)) abalone_risks_20606 = list(map(lambda microK: riskOfFile(abalone_fRowsNorm, abalone_fMeans, abalone_fSD, microK, 2, 0.6, 0.6), microKValues)) f1080_risks_20606 = list(map(lambda microK: riskOfFile(f1080_fRowsNorm, f1080_fMeans, f1080_fSD, microK, 2, 0.6, 0.6), microKValues)) iris_risks_20606 = list(map(lambda microK: riskOfFile(iris_fRowsNorm, iris_fMeans, iris_fSD, microK, 2, 0.6, 0.6), microKValues)) ionosphere_risks_20606 = list(map(lambda microK: riskOfFile(ionosphere_fRowsNorm, ionosphere_fMeans, ionosphere_fSD, microK, 2, 0.6, 0.6), microKValues)) adult_risks_20606 = list(map(lambda microK: riskOfFile(adult_fRowsNorm, adult_fMeans, adult_fSD, microK, 2, 0.6, 0.6), microKValues)) # FIGURE 2: # \includegraphics[angle=0, width=5.5cm]{figures/risk.case0.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.case1.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.case10.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.case11.eps} plot6Risks(microKValues, concrete_risks, abalone_risks, f1080_risks, iris_risks, ionosphere_risks, adult_risks, 0, "risk.case0.eps") plot6Risks(microKValues, concrete_risks, abalone_risks, f1080_risks, iris_risks, ionosphere_risks, adult_risks, 1, "risk.case1.eps") plot6Risks(microKValues, concrete_risks, abalone_risks, f1080_risks, iris_risks, ionosphere_risks, adult_risks, 10, "risk.case10.eps") plot6Risks(microKValues, concrete_risks, abalone_risks, f1080_risks, iris_risks, ionosphere_risks, adult_risks, 11, "risk.case11.eps") # FIGURE 3: # \includegraphics[angle=0, width=5.5cm]{figures/risk_adult_106066_20606.case0.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_adult_106066_20606.case1.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_adult_106066_20606.case10.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_adult_106066_20606.case11.eps} plotLoRisks(microKValues, [adult_risks, adult_risks_20606], 0, "risk_adult_106066_20606.case0.eps") plotLoRisks(microKValues, [adult_risks, adult_risks_20606], 1, "risk_adult_106066_20606.case1.eps") plotLoRisks(microKValues, [adult_risks, adult_risks_20606], 10, "risk_adult_106066_20606.case10.eps") plotLoRisks(microKValues, [adult_risks, adult_risks_20606], 11, "risk_adult_106066_20606.case11.eps") # FIGURE 4: # \includegraphics[angle=0, width=5.5cm]{figures/risk.f1080.v1.v13.case10.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.f1080.v1.v13.case11.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.concrete.v1.v9.case10.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk.concrete.v1.v9.case11.eps} plotLoRisks(microKValues, [f1080_risksMDAV1,f1080_risksMDAV2,f1080_risksMDAV3,f1080_risksMDAV4,f1080_risksMDAV5,f1080_risksMDAV6,f1080_risksMDAV7,f1080_risksMDAV8,f1080_risksMDAV9,f1080_risksMDAV10,f1080_risksMDAV11,f1080_risksMDAV12,f1080_risksMDAV13], 0, "risk.f1080.v1.v13.case0.eps",20) plotLoRisks(microKValues, [f1080_risksMDAV1,f1080_risksMDAV2,f1080_risksMDAV3,f1080_risksMDAV4,f1080_risksMDAV5,f1080_risksMDAV6,f1080_risksMDAV7,f1080_risksMDAV8,f1080_risksMDAV9,f1080_risksMDAV10,f1080_risksMDAV11,f1080_risksMDAV12,f1080_risksMDAV13], 1, "risk.f1080.v1.v13.case1.eps",20) plotLoRisks(microKValues, [f1080_risksMDAV1,f1080_risksMDAV2,f1080_risksMDAV3,f1080_risksMDAV4,f1080_risksMDAV5,f1080_risksMDAV6,f1080_risksMDAV7,f1080_risksMDAV8,f1080_risksMDAV9,f1080_risksMDAV10,f1080_risksMDAV11,f1080_risksMDAV12,f1080_risksMDAV13], 10, "risk.f1080.v1.v13.case10.eps",0.2) plotLoRisks(microKValues, [f1080_risksMDAV1,f1080_risksMDAV2,f1080_risksMDAV3,f1080_risksMDAV4,f1080_risksMDAV5,f1080_risksMDAV6,f1080_risksMDAV7,f1080_risksMDAV8,f1080_risksMDAV9,f1080_risksMDAV10,f1080_risksMDAV11,f1080_risksMDAV12,f1080_risksMDAV13], 11, "risk.f1080.v1.v13.case11.eps",0.2) plotLoRisks(microKValues, [concrete_risksMDAV1,concrete_risksMDAV2,concrete_risksMDAV3,concrete_risksMDAV4,concrete_risksMDAV5,concrete_risksMDAV6,concrete_risksMDAV7,concrete_risksMDAV8,concrete_risksMDAV9], 0, "risk.concrete.v1.v9.case0.eps",20) plotLoRisks(microKValues, [concrete_risksMDAV1,concrete_risksMDAV2,concrete_risksMDAV3,concrete_risksMDAV4,concrete_risksMDAV5,concrete_risksMDAV6,concrete_risksMDAV7,concrete_risksMDAV8,concrete_risksMDAV9], 1, "risk.concrete.v1.v9.case1.eps",20) plotLoRisks(microKValues, [concrete_risksMDAV1,concrete_risksMDAV2,concrete_risksMDAV3,concrete_risksMDAV4,concrete_risksMDAV5,concrete_risksMDAV6,concrete_risksMDAV7,concrete_risksMDAV8,concrete_risksMDAV9], 10, "risk.concrete.v1.v9.case10.eps",0.2) plotLoRisks(microKValues, [concrete_risksMDAV1,concrete_risksMDAV2,concrete_risksMDAV3,concrete_risksMDAV4,concrete_risksMDAV5,concrete_risksMDAV6,concrete_risksMDAV7,concrete_risksMDAV8,concrete_risksMDAV9], 11, "risk.concrete.v1.v9.case11.eps",0.2) # FIGURE 5: # \includegraphics[angle=0, width=5.5cm]{figures/risk_abalone.mdav.mondrian.case0.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_abalone.mdav.mondrian.case1.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_ionosphere.mdav.mondrian.case0.eps} # \includegraphics[angle=0, width=5.5cm]{figures/risk_ionosphere.mdav.mondrian.case1.eps} plotLoRisks(microKValues, [abalone_risks, abalone_risksMondrian], 0, "risk_abalone.mdav.mondrian.case0.eps") plotLoRisks(microKValues, [abalone_risks, abalone_risksMondrian], 1, "risk_abalone.mdav.mondrian.case1.eps") plotLoRisks(microKValues, [ionosphere_risks, ionosphere_risksMondrian], 0, "risk_ionosphere.mdav.mondrian.case0.eps") plotLoRisks(microKValues, [ionosphere_risks, ionosphere_risksMondrian], 1, "risk_ionosphere.mdav.mondrian.case1.eps")