def getFuzzyDHontINF(): #taskID:str = "Web" + "FuzzyDHondtINF" + "Roulette1" taskID:str = "Web" + "FuzzyDHondt" + "Fixed" dataset:ADataset = DatasetST.readDatasets() #selector:ADHondtSelector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) selector:ADHondtSelector = TheMostVotedItemSelector({}) pToolOLin0802HLin1002:APenalization = PenalizationToolDefinition.exportPenaltyToolOLin0802HLin1002( InputSimulatorDefinition.numberOfAggrItems) aDescDHont:AggregationDescription = InputAggrDefinition.exportADescDHondtINF(selector, pToolOLin0802HLin1002) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr:Portfolio1AggrDescription = Portfolio1AggrDescription( taskID, rIDs, rDescs, aDescDHont) history:AHistory = HistoryHierDF(taskID) port:APortfolio = pDescr.exportPortfolio(taskID, history) port.train(history, dataset) model:DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) evalTool:AEvalTool = EvalToolDHondt({EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: 0.03, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: 0.03 / 500}) return (taskID, port, model, evalTool, history)
def test02(): print("Test 02") rIDs, rDescr = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() model: DataFrame = PModelDHondt(rIDs) print(model) userID: int = 1 rItemIDsWithResponsibility: List[(int, Dict)] = [(1, { rIDs[0]: 0.05, rIDs[1]: 0.05, rIDs[2]: 0.05, rIDs[3]: 0.05, rIDs[4]: 0.05, rIDs[5]: 0.05, rIDs[6]: 0.05, rIDs[7]: 0.65 })] lrClick: float = 0.03 lrView: float = lrClick / 500 evalTool: AEvalTool = EvalToolDHondt({ EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: lrClick, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: lrView }) evalTool.click(userID, rItemIDsWithResponsibility, 1, model, {}) for i in range(555): evalTool.displayed(userID, rItemIDsWithResponsibility, model, {}) print(model)
def run(self, batchID:str, jobID:str): divisionDatasetPercentualSize:int uBehaviour:str repetition:int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition().getBatchParameters(self.datasetID)[batchID] selector:ADHondtSelector = self.getParameters()[jobID] itemsDF:DataFrame = Items.readFromFileMl1m() usersDF:DataFrame = Users.readFromFileMl1m() historyDF:AHistory = HistoryHierDF("test01") eTool:AEvalTool = EvalToolContext({ EvalToolContext.ARG_USERS: usersDF, EvalToolContext.ARG_ITEMS: itemsDF, EvalToolContext.ARG_DATASET: "ml", EvalToolContext.ARG_HISTORY: historyDF}) rIDs, rDescs = InputRecomMLDefinition.exportPairOfRecomIdsAndRecomDescrs() aDescDHont:AggregationDescription = InputAggrDefinition.exportADescContextFuzzyDHondtDirectOptimize(selector, eTool) pDescr:Portfolio1AggrDescription = Portfolio1AggrDescription( self.getBatchName() + jobID, rIDs, rDescs, aDescDHont) model:DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator:Simulator = InputSimulatorDefinition().exportSimulatorML1M( batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def run(self, batchID: str, jobID: str): divisionDatasetPercentualSize: int uBehaviour: str repetition: int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition( ).getBatchParameters(self.datasetID)[batchID] #eTool:AEvalTool selector, eTool = self.getParameters()[jobID] rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs( ) aDescDHont: AggregationDescription = InputAggrDefinition.exportADescDHondt( selector) pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( self.getBatchName() + jobID, rIDs, rDescs, aDescDHont) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator: Simulator = InputSimulatorDefinition( ).exportSimulatorSlantour(batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def run(self, batchID: str, jobID: str): divisionDatasetPercentualSize: int uBehaviour: str repetition: int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition( ).getBatchParameters(self.datasetID)[batchID] eTool: AEvalTool = EToolDoNothing({}) rIDs, rDescs = InputRecomRRDefinition.exportPairOfRecomIdsAndRecomDescrs( ) aDescWeightedFAI: AggregationDescription = InputAggrDefinition.exportADescFAI( ) pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "FAI" + jobID, rIDs, rDescs, aDescWeightedFAI) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator: Simulator = InputSimulatorDefinition( ).exportSimulatorRetailRocket(batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def run(self, batchID: str, jobID: str): divisionDatasetPercentualSize: int uBehaviour: str repetition: int divisionDatasetPercentualSize, uBehaviour, repetition = \ InputABatchDefinition().getBatchParameters(self.datasetID)[batchID] # eTool:AEvalTool selector, eTool = self.getParameters()[jobID] rIDs, rDescs = InputRecomMLDefinition.exportPairOfRecomIdsAndRecomDescrs( ) aDescDHont: AggregationDescription = InputAggrDefinition.exportADescDHondt( selector) pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( self.getBatchName() + jobID, rIDs, rDescs, aDescDHont) rIds: List[str] = pDescr.getRecommendersIDs() model: DataFrame = PModelHybrid( PModelDHondt(rIds), PModelDHondtPersonalisedStat(rIds), { PModelHybrid.ARG_MODE_SKIP: True, PModelHybrid.ARG_SKIP_CLICK_THRESHOLD: 3 }) simulator: Simulator = InputSimulatorDefinition().exportSimulatorML1M( batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def test01(): print("Simulation: ML FuzzyDHondt") jobID: str = "Roulette1" selector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "FuzzyDHondt" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescDHondt(selector)) batchID: str = "ml1mDiv90Ulinear0109R1" dataset: DatasetML = DatasetML.readDatasets() behaviourFile: str = BehavioursML.getFile(BehavioursML.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursML.readFromFileMl1m(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) lrClick: float = 0.03 lrView: float = lrClick / 500 eTool: AEvalTool = EvalToolDHondt({ EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: lrClick, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: lrView }) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationML, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def getContextFuzzyDHondtDirectOptimizeINF(): # taskID:str = "Web" + "ContextFuzzyDHondtDirectOptimizeINF" + "Roulette1" taskID:str = "Web" + "ContextFuzzyDHondtDirectOptimizeINF" + "Fixed" dataset:ADataset = DatasetST.readDatasets() # selector:ADHondtSelector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) selector:ADHondtSelector = TheMostVotedItemSelector({}) pToolOLin0802HLin1002:APenalization = PenalizationToolDefinition.exportProbPenaltyToolOLin0802HLin1002( InputSimulatorDefinition.numberOfAggrItems) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() history:AHistory = HistoryHierDF(taskID) # Init eTool evalTool:AEvalTool = EvalToolContext({ EvalToolContext.ARG_ITEMS: dataset.serialsDF, # ITEMS EvalToolContext.ARG_EVENTS: dataset.eventsDF, # EVENTS (FOR CALCULATING HISTORY OF USER) EvalToolContext.ARG_DATASET: "st", # WHAT DATASET ARE WE IN EvalToolContext.ARG_HISTORY: history}) # empty instance of AHistory is OK for ST dataset aDescDHont:AggregationDescription = InputAggrDefinition.exportADescDContextHondtDirectOptimizeINF(selector, pToolOLin0802HLin1002, evalTool) pDescr:Portfolio1AggrDescription = Portfolio1AggrDescription( taskID, rIDs, rDescs, aDescDHont) port:APortfolio = pDescr.exportPortfolio(taskID, history) port.train(history, dataset) model:DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) return (taskID, port, model, evalTool, history)
def test01(): print("Test 01") rIDs, rDescs = InputRecomRRDefinition.exportPairOfRecomIdsAndRecomDescrs() mGlobal: DataFrame = PModelDHondt(rIDs) mPerson: DataFrame = PModelDHondtPersonalisedStat(rIDs) mh: DataFrame = PModelHybrid(mGlobal, mPerson) mh.getModel(1)
def __init__(self, recommendersIDs: List[str]): pM1: DataFrame = PModelDHondt(recommendersIDs) #print(pM1.head(10)) modelDHontData = [[float('nan'), pM1]] super(PModelDHondtPersonalised, self).__init__(modelDHontData, columns=[ PModelDHondtPersonalised.COL_USER_ID, PModelDHondtPersonalised.COL_MODEL ]) self.set_index(PModelDHondtPersonalised.COL_USER_ID, inplace=True)
def test21(): print("Simulation: ST ContextDHondtINF") jobID: str = "Roulette1" selector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) #pProbToolOLin0802HLin1002:APenalization = PenalizationToolDefinition.exportProbPenaltyToolOStat08HLin1002( # InputSimulatorDefinition.numberOfAggrItems) pToolOLin0802HLin1002: APenalization = PenalizationToolDefinition.exportPenaltyToolOLin0802HLin1002( InputSimulatorDefinition.numberOfAggrItems) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() dataset: ADataset = DatasetST.readDatasets() events = dataset.eventsDF serials = dataset.serialsDF historyDF: AHistory = HistoryDF("test01") # Init evalTool evalTool: AEvalTool = EvalToolContext({ EvalToolContext.ARG_ITEMS: serials, # ITEMS EvalToolContext.ARG_EVENTS: events, # EVENTS (FOR CALCULATING HISTORY OF USER) EvalToolContext.ARG_DATASET: "st", # WHAT DATASET ARE WE IN EvalToolContext.ARG_HISTORY: historyDF }) # empty instance of AHistory is OK for ST dataset pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "ContextDHondtNIF" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescDContextHondtINF( selector, pToolOLin0802HLin1002, evalTool)) batchID: str = "stDiv90Ulinear0109R1" dataset: DatasetST = DatasetST.readDatasets() behaviourFile: str = BehavioursST.getFile(BehavioursST.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursST.readFromFileST(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) print(model) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationST, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [evalTool], [HistoryHierDF(pDescr.getPortfolioID())])
def run(self, batchID: str, jobID: str): divisionDatasetPercentualSize: int uBehaviour: str repetition: int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition( ).getBatchParameters(self.datasetID)[batchID] selector: ADHondtSelector selector, negativeImplFeedback = self.getParameters()[jobID] portfolioID: str = self.getBatchName() + jobID history: AHistory = HistoryHierDF(portfolioID) dataset: ADataset = DatasetST.readDatasets() events = dataset.eventsDF serials = dataset.serialsDF historyDF: AHistory = HistoryHierDF("test01") # Init evalTool evalTool: AEvalTool = EvalToolContext({ EvalToolContext.ARG_ITEMS: serials, # ITEMS EvalToolContext.ARG_EVENTS: events, # EVENTS (FOR CALCULATING HISTORY OF USER) EvalToolContext.ARG_DATASET: "st", # WHAT DATASET ARE WE IN EvalToolContext.ARG_HISTORY: historyDF }) # empty instance of AHistory is OK for ST dataset rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs( ) aDescContextDHont: AggregationDescription = InputAggrDefinition.exportADescDContextHondtINF( selector, negativeImplFeedback, evalTool) pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( portfolioID, rIDs, rDescs, aDescContextDHont) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator: Simulator = InputSimulatorDefinition( ).exportSimulatorSlantour(batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [evalTool], [history])
def run(self, batchID: str, jobID: str): divisionDatasetPercentualSize: int uBehaviour: str repetition: int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition( ).getBatchParameters(self.datasetID)[batchID] selector: ADHondtSelector negativeImplFeedback: APenalization selector, negativeImplFeedback = self.getParameters()[jobID] portfolioID: str = self.getBatchName() + jobID history: AHistory = HistoryHierDF(portfolioID) dataset: ADataset = DatasetML.readDatasets() usersDF = dataset.usersDF itemsDF = dataset.itemsDF # Init evalTool evalTool: AEvalTool = EvalToolContext({ EvalToolContext.ARG_USERS: usersDF, EvalToolContext.ARG_ITEMS: itemsDF, EvalToolContext.ARG_DATASET: "ml", EvalToolContext.ARG_HISTORY: history }) rIDs, rDescs = InputRecomMLDefinition.exportPairOfRecomIdsAndRecomDescrs( ) aDescContextDHont: AggregationDescription = InputAggrDefinition.exportADescDContextHondtINF( selector, negativeImplFeedback, evalTool) pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( portfolioID, rIDs, rDescs, aDescContextDHont) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator: Simulator = InputSimulatorDefinition().exportSimulatorML1M( batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [evalTool], [history])
def test01(): print("Simulation: ML ContextDHondtINF") jobID: str = "Roulette1" selector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) #pProbToolOLin0802HLin1002:APenalization = PenalizationToolDefinition.exportProbPenaltyToolOStat08HLin1002( # InputSimulatorDefinition.numberOfAggrItems) pToolOLin0802HLin1002: APenalization = PenalizationToolDefinition.exportPenaltyToolOLin0802HLin1002( InputSimulatorDefinition.numberOfAggrItems) itemsDF: DataFrame = Items.readFromFileMl1m() usersDF: DataFrame = Users.readFromFileMl1m() historyDF: AHistory = HistoryDF("test01") eTool: AEvalTool = EvalToolContext({ EvalToolContext.ARG_USERS: usersDF, EvalToolContext.ARG_ITEMS: itemsDF, EvalToolContext.ARG_DATASET: "ml", EvalToolContext.ARG_HISTORY: historyDF }) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "ContextDHondtINF" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescDContextHondtINF( selector, pToolOLin0802HLin1002, eTool)) batchID: str = "ml1mDiv90Ulinear0109R1" dataset: DatasetML = DatasetML.readDatasets() behaviourFile: str = BehavioursML.getFile(BehavioursML.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursML.readFromFileMl1m(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationML, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def test21(): print("Simulation: ST FuzzyDHondtINF") jobID: str = "Roulette1" selector = RouletteWheelSelector({RouletteWheelSelector.ARG_EXPONENT: 1}) #pProbToolOLin0802HLin1002:APenalization = PenalizationToolDefinition.exportProbPenaltyToolOStat08HLin1002( # InputSimulatorDefinition.numberOfAggrItems) pToolOLin0802HLin1002: APenalization = PenalizationToolDefinition.exportPenaltyToolOLin0802HLin1002( InputSimulatorDefinition.numberOfAggrItems) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "FuzzyDHondtINF" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescDHondtINF(selector, pToolOLin0802HLin1002)) batchID: str = "stDiv90Ulinear0109R1" dataset: DatasetST = DatasetST.readDatasets() behaviourFile: str = BehavioursST.getFile(BehavioursST.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursST.readFromFileST(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) print(model) lrClick: float = 0.1 lrView: float = lrClick / 300 evalTool: AEvalTool = EvalToolDHondt({ EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: lrClick, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: lrView }) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationST, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [evalTool], [HistoryHierDF(pDescr.getPortfolioID())])
def test31(): print("Simulation: RR FuzzyDHondt") lrClick: float = 0.03 #lrView:float = lrClick / 300 lrViewDivisor: float = 250 jobID: str = "Fixed" + "Clk" + str(lrClick).replace( ".", "") + "ViewDivisor" + str(lrViewDivisor).replace(".", "") selector: ADHondtSelector = TheMostVotedItemSelector({}) rIDs, rDescs = InputRecomRRDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "FDHondt" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescDHondt(selector)) batchID: str = "rrDiv90Ulinear0109R1" dataset: DatasetRetailRocket = DatasetRetailRocket.readDatasetsWithFilter( minEventCount=50) behaviourFile: str = BehavioursRR.getFile(BehavioursRR.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursRR.readFromFileRR(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) print(model) evalTool: AEvalTool = EvalToolDHondt({ EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: lrClick, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: lrClick / lrViewDivisor }) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationRR, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [evalTool], [HistoryHierDF(pDescr.getPortfolioID())])
def test01(): print("Simulation: ML ContextFuzzyDHondtDirectOptimize") jobID: str = "Roulette1" selector: ADHondtSelector = RouletteWheelSelector( {RouletteWheelSelector.ARG_EXPONENT: 1}) itemsDF: DataFrame = Items.readFromFileMl1m() usersDF: DataFrame = Users.readFromFileMl1m() historyDF: AHistory = HistoryHierDF("test01") eTool: AEvalTool = EvalToolContext({ EvalToolContext.ARG_USERS: usersDF, EvalToolContext.ARG_ITEMS: itemsDF, EvalToolContext.ARG_DATASET: "ml", EvalToolContext.ARG_HISTORY: historyDF }) rIDs, rDescs = InputRecomSTDefinition.exportPairOfRecomIdsAndRecomDescrs() pDescr: Portfolio1AggrDescription = Portfolio1AggrDescription( "ContextFuzzyDHondtDirectOptimize" + jobID, rIDs, rDescs, InputAggrDefinition.exportADescContextFuzzyDHondtDirectOptimize( selector, eTool)) batchID: str = "ml1mDiv90Ulinear0109R1" dataset: DatasetML = DatasetML.readDatasets() behaviourFile: str = BehavioursML.getFile(BehavioursML.BHVR_LINEAR0109) behavioursDF: DataFrame = BehavioursML.readFromFileMl1m(behaviourFile) model: DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) # simulation of portfolio simulator: Simulator = Simulator(batchID, SimulationML, argsSimulationDict, dataset, behavioursDF) simulator.simulate([pDescr], [model], [eTool], [historyDF])
def run(self, batchID:str, jobID:str): divisionDatasetPercentualSize:int uBehaviour:str repetition:int divisionDatasetPercentualSize, uBehaviour, repetition = InputABatchDefinition().getBatchParameters(self.datasetID)[batchID] selector, nImplFeedback = self.getParameters()[jobID] eTool:AEvalTool = EvalToolDHondt({EvalToolDHondt.ARG_LEARNING_RATE_CLICKS: 0.02, EvalToolDHondt.ARG_LEARNING_RATE_VIEWS: 1000}) rIDs, rDescs = InputRecomMLDefinition.exportPairOfRecomIdsAndRecomDescrs() aDescFuzzyHontDirectOptimizeINF:AggregationDescription = InputAggrDefinition.exportADescDFuzzyHondtDirectOptimizeINF(selector, nImplFeedback) pDescr:Portfolio1AggrDescription = Portfolio1AggrDescription( self.getBatchName() + jobID, rIDs, rDescs, aDescFuzzyHontDirectOptimizeINF) model:DataFrame = PModelDHondt(pDescr.getRecommendersIDs()) simulator:Simulator = InputSimulatorDefinition().exportSimulatorML1M( batchID, divisionDatasetPercentualSize, uBehaviour, repetition) simulator.simulate([pDescr], [model], [eTool], [HistoryHierDF(pDescr.getPortfolioID())])
def test01(): print("Test 01") m = PModelDHondt(["r1", "r2"]) print(m.head(10))