Skip to content

Commit

Permalink
add sparsity results for kmeans optim
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniPasserello committed Jun 6, 2021
1 parent 51e36a9 commit 36caed9
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions shgp/data/metadata_sparsity.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class SparsityMetaDataset:
-122.44237289, -120.67969943, -120.04857654, -119.89991836, -119.80383267]
results_hgv_then_optimise = [-187.90945912, -143.35572839, -129.54256206, -122.85893017, -120.83210659,
-120.07338803, -119.83879177, -119.76479951, -119.74784784, -119.74348298]
results_kmeans_then_optimise = [-187.9094608, -143.76505719, -129.54392904, -122.96935561, -120.84356591,
-120.07418404, -119.84922844, -119.76792309, -119.74878381, -119.74383912]
optimal = -119.74156303725914
"""

Expand Down Expand Up @@ -77,6 +79,9 @@ def __init__(self):
results_hgv_then_optimise = [-36.00822127, -31.25506725, -30.33460073, -30.14617903, -30.12271089,
-30.12136622, -30.12073425, -30.12034384, -30.12022219, -30.12011015,
-30.12005339, -30.1200338, -30.12003275, -30.1200168, -30.11999865]
results_kmeans_then_optimise = [-36.01350572, -31.28840067, -30.3925065, -30.20436652, -30.17980873,
-30.17855277, -30.17782738, -30.17741913, -30.1771935, -30.17710255,
-30.17704937, -30.17701668, -30.17699317, -30.17698716, -30.17697844]
optimal = -30.12021581
"""

Expand Down Expand Up @@ -105,6 +110,8 @@ def __init__(self):
-116.87625325, -116.79155455, -116.7388337, -116.68191999, -116.61718728]
results_hgv_then_optimise = [-143.75599, -120.08909116, -116.57998049, -116.46777726, -116.4453033,
-116.43211438, -116.41999216, -116.41201695, -116.40704368, -116.40335913]
results_kmeans_then_optimise = [-125.15865751, -120.0897067, -116.58018896, -116.47068702, -116.44805175,
-116.43169754, -116.41866347, -116.41084911, -116.4055004, -116.40227565]
optimal = -116.39046838357692
"""

Expand Down Expand Up @@ -145,6 +152,10 @@ def __init__(self):
-129.0732634622664, -128.88357852294703, -128.72630150779162, -128.50254430015048,
-128.3291856770311, -128.13987618189543, -127.96852417887922, -127.80981361806997,
-127.68314589407956, -127.58164336658196, -127.45071692472926, -127.35130477028518]
results_kmeans_then_optimise = [-153.75423975, -144.02566914, -139.6891265, -136.47865475, -134.03419991,
-131.79053905, -130.17336024, -129.73385951, -129.51645072, -129.26086409,
-129.06516223, -128.81324, -128.58536071, -128.3340523, -128.17675931,
-128.00020652, -127.83793295, -127.69096803, -127.57432644, -127.48260049]
optimal = -127.00553397076634
"""

Expand Down Expand Up @@ -184,6 +195,10 @@ def __init__(self):
-74.69878274, -74.67597054, -74.66463683, -74.65998954, -74.65666712,
-74.65461688, -74.65336598, -74.65256175, -74.65220575, -74.65171341,
-74.65135656, -74.65113877, -74.65078521, -74.65077963, -74.65079426]
results_kmeans_then_optimise = [-97.65909147, -82.90228657, -77.02468728, -75.52944109, -75.11784286,
-75.03628616, -75.0187257, -75.0141673, -75.01229264, -75.01349033,
-75.01349128, -75.01333252, -75.01402427, -75.01465628, -75.01544876,
-75.01652856, -75.01685407, -75.01712983, -75.01744144, -75.01875634]
optimal = -74.65003242
"""

Expand Down Expand Up @@ -236,6 +251,12 @@ def __init__(self):
-377.71547247, -377.69614057, -377.67934838, -377.66691497, -377.65551202,
-377.64811292, -377.64112501, -377.63499536, -377.63138791, -377.62710808,
-377.62456957, -377.62115252, -377.61966475, -377.61779005, -377.61627136]
results_kmeans_then_optimise = [-395.29824647, -383.12676367, -381.27441664, -380.24112373, -379.5468534,
-379.02280956, -378.66599353, -378.38122894, -378.19172471, -378.05550088,
-377.94954375, -377.87287704, -377.8160049, -377.77383348, -377.74460407,
-377.71946472, -377.69715618, -377.68066572, -377.66929462, -377.65931997,
-377.65109986, -377.64522983, -377.63896908, -377.63398903, -377.63038872,
-377.62659659, -377.6235369, -377.62301595, -377.62019435, -377.61955665]
optimal = -377.6047477020269
"""

Expand All @@ -244,7 +265,7 @@ def __init__(self):
class PimaSparsityMetaDataset(PimaDataset, SparsityMetaDataset):
def __init__(self):
PimaDataset.__init__(self)
SparsityMetaDataset.__init__(self, 5, 10, 100, 10, np.arange(105, 151, 5))
SparsityMetaDataset.__init__(self, 5, 10, 100, 10, np.arange(5, 151, 5))


""" Twonorm with Exp kernel - np.arange(5, 51, 5):
Expand Down Expand Up @@ -351,26 +372,6 @@ def __init__(self):
optimal = -1702.8659218764612
"""

""" MAGIC with Exp kernel - np.arange(5, 306, 10):
results_hgv = [-2622.88920078, -2165.29989543, -2030.89551171, -1935.82762473,
-1845.58860804, -1778.75346152, -1761.10452395, -1756.82255539,
-1753.64038911, -1751.31769235, -1748.77866817, -1745.81058575,
-1743.88910324, -1741.05621014, -1737.86539163, -1736.05263271,
-1732.48842931, -1730.87240599, -1728.49708456, -1726.61598566,
-1724.54669587, -1722.89507483, -1721.96259604, -1719.88484892,
-1718.15797201, -1716.33362112, -1715.11453179, -1714.16480832,
-1712.64782855, -1711.71690642, -1711.33342417]
results_hgv_then_optimise = [-2012.34005544, -1870.35952549, -1814.63618322, -1781.81814063,
-1759.79239295, -1744.64846209, -1735.52586658, -1729.87674608,
-1725.10174498, -1721.70709836, -1718.36769472, -1715.75304107,
-1713.44155478, -1711.49321582, -1709.97927022, -1708.11360013,
-1707.04489305, -1705.98416789, -1705.01974408, -1704.47648932,
-1703.74840548, -1703.19588689, -1702.76273437, -1702.36497604,
-1701.93507812, -1701.61450529, -1701.30799658, -1701.01032498,
-1700.7762311, -1700.50261561, -1700.36405207]
optimal = -1700.3215487232228
"""


# (start from M=15 and make xticks sparser - e.g., [50, 100, 150, 200, 250, 300])
class MagicSparsityMetaDataset(MagicDataset, SparsityMetaDataset):
Expand Down

0 comments on commit 36caed9

Please sign in to comment.