xLabelStrings = ["Conflicts", "Concurrencies", "Incompetencies"]
# xLabelStrings = ["Agents", "Innacuracies", "Conflicts", "Concurrencies", "Incompetencies"]

logXScale = False
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

figName = PARAMETERS.figPrefix + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

varyingParamStrings = ["Naive Learning", "Active Learning", "Self-Learning"]

constrains = []

# NAIVE
PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "false"

PARAMETERS.isCreationFromNeighbor = "false"

PARAMETERS.isModelNCS = "false"
PARAMETERS.isConflictNCS = "false"
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

varyingParamStrings = [
    "Active Learning", "Active Learning", "Active Learning", "Active Learning",
    "Self-Learning", "Self-Learning", "Self-Learning", "Self-Learning"
]

figName = "weight_3Strat_" + PARAMETERS.noise + "_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = []

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "false"

PARAMETERS.LEARNING_WEIGHT_ACCURACY = "1.0"
PARAMETERS.LEARNING_WEIGHT_EXPERIENCE = "1.0"
PARAMETERS.LEARNING_WEIGHT_GENERALIZATION = "1.0"

PARAMETERS.EXPLOITATION_WEIGHT_PROXIMITY = "1.0"
PARAMETERS.EXPLOITATION_WEIGHT_EXPERIENCE = "1.0"
PARAMETERS.EXPLOITATION_WEIGHT_GENERALIZATION = "1.0"

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y,yDev,min,max in zip(yStringsAvg, yStringsDev, yStringsMin, yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "false"

PARAMETERS.figSize = (1.5, 3.75)
PLOTTING.ROTATION = 22.5
figName = "transfer_"  + yStringLong + "-" + PARAMETERS.getFigName() + figEndName
print(figName)

constrains = []
# varyingParamStrings = ["Disc",r'$\mathrm{Square} \rightarrow \mathrm{Disc}$',"Rhombus",r'$\mathrm{Square} \rightarrow \mathrm{Disc}$',r'$\mathrm{Square} \rightarrow \mathrm{Disc} \rightarrow \mathrm{Rhombus}$']
# listOfModels = ["disc", "squareDisc","los", "squareDisc", "squareDiscLos"]
# # listOfLearningCycles = ["1000", "1000", "1000", "1750", "2500"]
# listOfLearningCycles = [ "2000", "3500","2000", "3500", "5000"]

varyingParamStrings = ["Disc",r'$\mathrm{Square} \rightarrow \mathrm{Disc}$',"Rhombus",r'$\mathrm{Square} \rightarrow \mathrm{Disc}$',r'$\mathrm{Square} \rightarrow \mathrm{Disc} \rightarrow \mathrm{Rhombus}$']
listOfModels = ["disc", "squareDisc","los", "squareDisc", "squareDiscLos"]
# listOfLearningCycles = ["1000", "1000", "1000", "1750", "2500"]
listOfLearningCycles = [ "2000", "3500","2000", "3500", "5000"]

for mod,cycl in zip(listOfModels,listOfLearningCycles):
    PARAMETERS.model = mod
xString = "nbAgents_Average"
PARAMETERS.nbAgents = (0, 10000)

logXScale = False
logYScale = False

yStringLong = yStrings[0] + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max, 0.001])

figName = "sca__" + yStringLong + str(
    PARAMETERS.nbAgents) + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
    ) + figEndName
print(figName)

constrains = []
PARAMETERS.dimension = "10"
constrains = PARAMETERS.getConstainsSingle(XYDevMinMax)

PARAMETERS.dimension = "5"
constrains += PARAMETERS.getConstainsSingle(XYDevMinMax)

PARAMETERS.dimension = "3"
constrains += PARAMETERS.getConstainsSingle(XYDevMinMax)

PARAMETERS.dimension = "2"
constrains += PARAMETERS.getConstainsSingle(XYDevMinMax)
xString = "dimension"
PARAMETERS.dimension = (0, 10)

logXScale = False
logYScale = False

yStringLong = yStrings[0] + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max])

figName = "sca__" + yStringLong + str(
    PARAMETERS.dimension) + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
    ) + figEndName
print(figName)

constrains = PARAMETERS.getConstainsSingle(XYDevMinMax)

labelStrings = [r'$n = 2$', r'$n = 3$', r'$n = 5$', r'$n = 10$']

_PLOT.plotWithDeviationWithFillBetweenConstrained(
    labelStrings, PARAMETERS.colors, PARAMETERS.intervalColors,
    PARAMETERS.markers, figName, xlabel, ylabel, False, False, constrains, 1,
    1, PARAMETERS.figSize)
# _PLOT.plotWitMinMaxWithFillBetweenConstrained(labelStrings, PARAMETERS.colors, PARAMETERS.intervalColors, PARAMETERS.markers,
#                                    figName, xlabel, ylabel, False, logYScale,
#                                    constrains, 1, 1, PARAMETERS.figSize)
#
#
Beispiel #6
0
xlabel = 'Episodes'
ylabel = 'Number of Agents (#)'

xString = "episodes"
PARAMETERS.episodes = (0, 1000)

yString = "nbAgents_Average"

deviationString = "nbAgents_Deviation"
minString = "nbAgents_Min"
maxString = "nbAgents_Max"

logXScale = False
logYScale = False

figName = PARAMETERS.figPrefix + yString + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = PARAMETERS.getConstains(labels, figVaryingParamString)

_PLOT.plotWithDeviationWithFillBetween(labelStrings, PARAMETERS.colors,
                                       PARAMETERS.intervalColors,
                                       PARAMETERS.markers, figName, xlabel,
                                       ylabel, False, logYScale, xString,
                                       yString, deviationString, constrains, 1,
                                       100, PARAMETERS.figSize)
_PLOT.plotWitMinMaxWithFillBetween(labelStrings, PARAMETERS.colors,
                                   PARAMETERS.intervalColors,
                                   PARAMETERS.markers, figName, xlabel, ylabel,
                                   False, logYScale, xString, yString,
                                   minString, maxString, constrains, 1, 100,
Beispiel #7
0
XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

PARAMETERS.learningCycles = "2000"
PARAMETERS.activeExploitationCycles = "10000"  # ["500","1000","2000","4000","6000","10000"]
PARAMETERS.validityRangesPrecision = "0.02"
PARAMETERS.isActiveExploitation = "true"

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"
PARAMETERS.isActiveExploitation = "true"

figName = "lifelongSL_VarEndoW_Expl" + PARAMETERS.activeExploitationCycles + "_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)
varyingParamValues = ["0.05", "0.1", "0.2", "0.5"]

varyingParamStrings = []
for val in varyingParamValues:
    varyingParamStrings.append(r'$\omega^{endo}_{lrn} = $' + val)

constrains = []

for val in varyingParamValues:
    PARAMETERS.endogenousLearningWeight = val
    constrains.append(
        PARAMETERS.getConstainsLabelsAreYStrings(xLabelStrings, XYDevMinMax))

PLOTTING.LEGEND_IN = False
Beispiel #8
0
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max, yString in zip(yStringsAvg, yStringsDev, yStringsMin,
                                      yStringsMax, yStrings):
    if (yString == "endogenousLearning"):
        XYDevMinMax.append([y, yDev, min, max, 0.1])
    else:
        XYDevMinMax.append([y, yDev, min, max, 1])

PARAMETERS.figSize = (4.5, 3.75)

figName = "sca_23510_ELLSA_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

# PARAMETERS.isActiveLearning = "false"
# PARAMETERS.isSelfLearning = "true"
# PARAMETERS.isLearnFromNeighbors = "true"

constrains = []
PARAMETERS.dimension = "2"
for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(
            xLabelStrings, figVaryingParamString, XYDevMinMax, varyingValue))
PARAMETERS.dimension = "3"
for varyingValue in varyingParamStringValues:
    constrains.append(
xString = "learningCycles"
PARAMETERS.learningCycles = (0, 1000)

logXScale = False
logYScale = False

yStringLong = ""
for label in labelStrings:
    yStringLong += label + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max])

figName = PARAMETERS.figPrefix + yStringLong + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = PARAMETERS.getConstainsLabelsAreYStrings(labelStrings,
                                                      XYDevMinMax)
print(constrains)

_PLOT.plotWithDeviationWithFillBetweenConstrained(
    labelStrings, PARAMETERS.colors, PARAMETERS.intervalColors,
    PARAMETERS.markers, figName, xlabel, ylabel, False, logYScale, constrains,
    1, 100, PARAMETERS.figSize)
_PLOT.plotWitMinMaxWithFillBetweenConstrained(labelStrings, PARAMETERS.colors,
                                              PARAMETERS.intervalColors,
                                              PARAMETERS.markers, figName,
                                              xlabel, ylabel, False, logYScale,
                                              constrains, 1, 100,
Beispiel #10
0
for y, yDev, min, max, yString in zip(yStringsAvg, yStringsDev, yStringsMin,
                                      yStringsMax, yStrings):
    if (yString == "endoRequests"):
        XYDevMinMax.append([y, yDev, min, max, 0.1])
    else:
        XYDevMinMax.append([y, yDev, min, max, 1])

varyingParamStrings = ["n = 2", "n = 3"]
dimensions = ["2", "3"]
PARAMETERS.learningCycles = "2000"
PARAMETERS.validityRangesPrecision = "0.06"
PARAMETERS.bootstrapCycle = "10"
PARAMETERS.isAllContextSearchAllowedForLearning = "true"
PARAMETERS.isAllContextSearchAllowedForExploitation = "true"

figName = "sca_23_NCS_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

constrains = []
PARAMETERS.dimension = "2"
constrains.append(
    PARAMETERS.getConstainsLabelsAreYStrings(xLabelStrings, XYDevMinMax))
PARAMETERS.dimension = "3"
constrains.append(
    PARAMETERS.getConstainsLabelsAreYStrings(xLabelStrings, XYDevMinMax))

PLOTTING.ROTATION = 45
    yStringsMax.append(string + "_Max")

xLabelStrings = [" "]

logXScale = False
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

figName = PARAMETERS.figPrefix + "_pbDics" + PARAMETERS.probabilityOfRangeAmbiguity + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = []
for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(
            xLabelStrings, figVaryingParamString, XYDevMinMax, varyingValue))

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(
logXScale = False
logYScale = False


# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y,yDev,min,max in zip(yStringsAvg, yStringsDev, yStringsMin, yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])




figName = "noise_3Strat_" + PARAMETERS.noise + "_" + PARAMETERS.perceptionsGenerationCoefficient + "_" + yStringLong + "-" + PARAMETERS.getFigName() + figEndName
print(figName)

constrains = []

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "false"

for varyingValue in varyingParamStringValues:
    constrains.append(PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(xLabelStrings,figVaryingParamString, XYDevMinMax,varyingValue))


PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "true"
logXScale = False
logYScale = False

yStringLong = yStrings[0] + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max])

PARAMETERS.validityRangesPrecision = "0.02"
# PARAMETERS.model = "gaussianCos2"
# PARAMETERS.errorMargin = "1.0"
PARAMETERS.model = "cosSinX"
PARAMETERS.errorMargin = "0.05"
figName = "few_2Mod_" + PARAMETERS.model + "_" + yStringLong + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

PARAMETERS.exogenousLearningWeight = "0.05"

constrains = PARAMETERS.getConstainsSingle(XYDevMinMax)

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

PARAMETERS.exogenousLearningWeight = "0.1"



logXScale = False
logYScale = False


# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y,yDev,min,max in zip(yStringsAvg, yStringsDev, yStringsMin, yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

figName = PARAMETERS.figPrefix + yStringLong + "-" + PARAMETERS.getFigName() + figEndName
print(figName)

constrains = []
for varyingValue in varyingParamStringValues:
    constrains.append(PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(xLabelStrings,figVaryingParamString, XYDevMinMax,varyingValue))

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

for varyingValue in varyingParamStringValues:
    constrains.append(PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(xLabelStrings,figVaryingParamString, XYDevMinMax,varyingValue))


varyingParamStringsFinal=[]
    yStringsMax.append(string)

xString = "dimension"
PARAMETERS.dimension = (0, 10)

logXScale = False
logYScale = False

yStringLong = yStrings[0] + "_VarRg"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max])

figName = "sca__" + yStringLong + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

PARAMETERS.validityRangesPrecision = "0.02"
constrains = PARAMETERS.getConstainsSingle(XYDevMinMax)

# PARAMETERS.validityRangesPrecision = "0.06"
# constrains += PARAMETERS.getConstainsSingle(XYDevMinMax)
#
# PARAMETERS.validityRangesPrecision = "0.1"
# constrains += PARAMETERS.getConstainsSingle(XYDevMinMax)

labelStrings = [
    r'$p^\mathcal{R} = 0.02$', r'$p^\mathcal{R} = 0.06$',
    r'$p^\mathcal{R} = 0.1$'
]
Beispiel #16
0
xLabelStrings = ["Conflicts", "Concurrencies", "Incompetencies"]
# xLabelStrings = ["Agents", "Innacuracies", "Conflicts", "Concurrencies", "Incompetencies"]

logXScale = False
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

PARAMETERS.learningCycles = "2000"
figName = "lifelongSL_Var_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)
varyingParamValues = ["0", "1000", "10000", "20000", "100000"]
# varyingParamValues = ["0","500","1000","2000","4000","6000","10000","20000","50000","100000"]

varyingParamStrings = []
for val in varyingParamValues:
    varyingParamStrings.append(r'$\mathcal{E}^N_{lifelong} = $' + val)

PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"

constrains = []
PARAMETERS.activeExploitationCycles = "0"
constrains.append(
Beispiel #17
0
logXScale = False
logYScale = False


# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y,yDev,min,max in zip(yStringsAvg, yStringsDev, yStringsMin, yStringsMax):
    XYDevMinMax.append([y, yDev, min, max])

varyingParamStrings = ["Active Learning","Active Cooperative Learning","Self-Learning"]


figName = "noise_3Strat_" + PARAMETERS.noise + "_" + yStringLong + "-" + PARAMETERS.getFigName() + figEndName
print(figName)

constrains = []

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "false"

constrains.append(PARAMETERS.getConstainsLabelsAreYStrings(xLabelStrings, XYDevMinMax))

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "true"

constrains.append(PARAMETERS.getConstainsLabelsAreYStrings(xLabelStrings, XYDevMinMax))
logXScale = False
logYScale = False

# for label in labelStrings:
#     yStringLong += label  + "_"

XYDevMinMax = []
for y, yDev, min, max, yString in zip(yStringsAvg, yStringsDev, yStringsMin,
                                      yStringsMax, yStrings):
    if (yString == "endogenousLearning"):
        XYDevMinMax.append([y, yDev, min, max, 0.1])
    else:
        XYDevMinMax.append([y, yDev, min, max, 1])

figName = "noise_3Strat_" + PARAMETERS.noise + "_" + yStringLong + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = []

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
PARAMETERS.isLearnFromNeighbors = "false"

for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam(
            xLabelStrings, figVaryingParamString, XYDevMinMax, varyingValue))

PARAMETERS.isActiveLearning = "true"
PARAMETERS.isSelfLearning = "false"
xString = "learningCycles"
PARAMETERS.learningCycles = (0, 2001)

logXScale = False
logYScale = False

yStringLong = yStrings[0] + "_"
for label in varyingParamStringValues:
    yStringLong += label + "_"

XYDevMinMax = []
for y, yDev, min, max in zip(yStringsAvg, yStringsDev, yStringsMin,
                             yStringsMax):
    XYDevMinMax.append([xString, y, yDev, min, max])

figName = PARAMETERS.figPrefix + yStringLong + "_DepOn_" + xString + "-" + PARAMETERS.getFigName(
) + figEndName
print(figName)

constrains = []
for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam2(
            varyingParamStrings, figVaryingParamString, XYDevMinMax,
            varyingValue))
PARAMETERS.isActiveLearning = "false"
PARAMETERS.isSelfLearning = "true"
PARAMETERS.isLearnFromNeighbors = "true"
for varyingValue in varyingParamStringValues:
    constrains.append(
        PARAMETERS.getConstainsLabelsAreParamsWithVaryingParam2(
            varyingParamStrings, figVaryingParamString, XYDevMinMax,