예제 #1
0
        public void reportEvaluateAlterRanking(IList <spiderLink> output, modelSpiderSiteRecord wRecord, spiderModuleBase moduleInstance)
        {
            if (layerModule != null)
            {
                switch (layerModule.layers.layer_id)
                {
                case 0:

                    primaryLayerForOutput = 1;
                    break;

                case 1:

                    secondaryLayerForOutput = 1;
                    break;

                case 2:

                    reserveLayerForOutput = 1;
                    break;
                }
            }


            // Single Output -- reducing the chain
            if (output.Count == wRecord.tRecord.instance.settings.limitIterationNewLinks)
            {
                singleTargetOutput = 1;
            }


            indexURLAssertionResult LT_assertion = imbWEMManager.index.pageIndexTable.GetUrlAssertion(output);

            potentialLoadTakePrecission = LT_assertion.relevant;

            rankingEffects = potentialLoadTakePrecission - outCut_assertion.relevant;


            duration = DateTime.Now.Subtract(start).TotalSeconds;
        }
예제 #2
0
        public void reportEvaluateEnd(IList <spiderLink> __output, modelSpiderSiteRecord wRecord, spiderModuleBase moduleInstance)
        {
            indexURLAssertionResult L01_assertion = new indexURLAssertionResult();
            indexURLAssertionResult L02_assertion = new indexURLAssertionResult();
            indexURLAssertionResult L03_assertion = new indexURLAssertionResult();

            layerModule = moduleInstance as spiderLayerModuleBase;
            if (layerModule != null)
            {
                accumulated = layerModule.layers.CountAll - accumulation;

                // << --- AGE
                int input_age = 0;
                primaryLayerTargets = layerModule.layers[0].Count;
                foreach (spiderLink link in layerModule.layers[0])
                {
                    input_age += (iteration - link.iterationDiscovery);
                    L01_assertion.Add(imbWEMManager.index.pageIndexTable.GetPageAssertion(link.url), link.url);
                }
                primaryLayerTargetAge            = input_age.GetRatio(primaryLayerTargets);
                primaryLayerInproperDistribution = L01_assertion.notRelevant;
                input_age = 0;

                if (layerModule.layers.Count > 1)
                {
                    secondaryLayerTargets = layerModule.layers[1].Count;
                    foreach (spiderLink link in layerModule.layers[1])
                    {
                        input_age += (iteration - link.iterationDiscovery);
                        L02_assertion.Add(imbWEMManager.index.pageIndexTable.GetPageAssertion(link.url), link.url);
                    }
                    secondaryLayerTargetAge = input_age.GetRatio(secondaryLayerTargets);
                    if (primaryLayerTargets > 0)
                    {
                        secondaryLayerInproperDistribution = L02_assertion.relevant;
                    }
                }

                input_age = 0;
                if (layerModule.layers.Count > 2)
                {
                    reserveLayerTargets = layerModule.layers[2].Count;
                    foreach (spiderLink link in layerModule.layers[2])
                    {
                        input_age += (iteration - link.iterationDiscovery);
                        L03_assertion.Add(imbWEMManager.index.pageIndexTable.GetPageAssertion(link.url), link.url);
                    }
                    reserveLayerTargetAge = input_age.GetRatio(reserveLayerTargets);

                    if (secondaryLayerTargets > 0)
                    {
                        reserveLayerInproperDistribution = L03_assertion.relevant;
                    }
                }
            }

            output = __output.Count;

            if (inputTargets > output)
            {
                Reduction = (inputTargets - output).GetRatio(inputTargets);
            }
            else
            {
                drain = output - inputTargets; //).GetRatio(inputTargets);
            }

            out_assertion = imbWEMManager.index.pageIndexTable.GetUrlAssertion(__output);
            out_assertion.performInfoGainEstimation();

            LTn = wRecord.context.GetNextIterationLTSize(__output);

            outCut_assertion = imbWEMManager.index.pageIndexTable.GetUrlAssertion(__output.Take(LTn));


            PotOutputIP = out_assertion.IPnominal;

            PotChangeIP = PotOutputIP - PotInputIP;

            // out_preRanking.AddRange(__output.active.Take(wRecord.tRecord.instance.settings.limitIterationNewLinks));

            outputPotentialPrecission = out_assertion.relevant;

            potentialPrecissionChange = outputPotentialPrecission - inputPotentialPrecission;
        }