Package edu.brown.costmodel

Examples of edu.brown.costmodel.MarkovCostModel


        for (SplitType type : SplitType.values()) {
            this.split_percentages[type.ordinal()] = type.percentage;
        } // FOR
       
        this.global_t_estimator = new MarkovEstimator(this.catalogContext, this.p_estimator, this.global_markov);
        this.global_costmodel = new MarkovCostModel(catalogContext, this.p_estimator, this.global_t_estimator, this.thresholds);
        for (Integer p : FeatureClusterer.this.all_partitions) {
            this.global_markov.getOrCreate(p, FeatureClusterer.this.catalog_proc).initialize();
        } // FOR
    }
View Full Code Here


            boolean singlepartitioned = (partitions.size() == 1);
            t_counters[singlepartitioned ? 0 : 1]++;
            t_counters[2]++; // Total # of Txns
           
            // Estimate Clusterer MarkovGraphCost
            MarkovCostModel c_costmodel = state.costmodels_per_partition[base_partition.intValue()];
            double c_cost = 0.0;
            TxnToClusterMarkovGraphsContainer markovs = state.markovs_per_partition[base_partition.intValue()];
            markovs.addTransactionClusterXref(txn_id, c);
            MarkovGraph markov = markovs.get(c, catalog_proc);

            // Check that this is a cluster that we've seen before at this partition
            if (markov == null) {
                if (trace.val) LOG.warn(String.format("Txn #%d was mapped to never before seen Cluster #%d at partition %d", txn_id, c, base_partition));
                markov = markovs.getOrCreate(c, this.catalog_proc).initialize();
                markovs.addTransactionClusterXref(txn_id, c);
                // state.t_estimators_per_partition[base_partition.intValue()].processTransactionTrace(txn_trace);
                c_counters[2]++; // Unknown Clusters
            }
            c_cost = c_costmodel.estimateTransactionCost(catalogContext, txn_trace);
            if (c_cost > 0) {
                total_c_cost += c_cost;
                c_counters[singlepartitioned ? 0 : 1]++;
               
                // So that we can improve our predictions...
View Full Code Here

            // But then only initialize the partition-specific data structures
            for (int p : FeatureClusterer.this.all_partitions) {
                this.clusters_per_partition[p] = new ObjectHistogram<Integer>();
                this.markovs_per_partition[p] = new TxnToClusterMarkovGraphsContainer();
                this.t_estimators_per_partition[p] = new MarkovEstimator(catalogContext, p_estimator, this.markovs_per_partition[p]);
                this.costmodels_per_partition[p] = new MarkovCostModel(catalogContext, p_estimator, this.t_estimators_per_partition[p], thresholds);
            } // FOR
        }
View Full Code Here

            for (int p : FeatureClusterer.this.all_partitions) {
                this.clusters_per_partition[p].clear();
                this.markovs_per_partition[p].clear();

                // It's lame, but we need to put this here so that...
                this.costmodels_per_partition[p] = new MarkovCostModel(catalogContext, p_estimator, this.t_estimators_per_partition[p], thresholds);
            } // FOR
           
            // Reset Counters
            for (int i = 0; i < this.c_counters.length; i++) {
                this.c_counters[i] = 0;
View Full Code Here

TOP

Related Classes of edu.brown.costmodel.MarkovCostModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.