當前位置: 首頁>>代碼示例>>Python>>正文


Python RegressionModel.estimate方法代碼示例

本文整理匯總了Python中opus_core.regression_model.RegressionModel.estimate方法的典型用法代碼示例。如果您正苦於以下問題:Python RegressionModel.estimate方法的具體用法?Python RegressionModel.estimate怎麽用?Python RegressionModel.estimate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在opus_core.regression_model.RegressionModel的用法示例。


在下文中一共展示了RegressionModel.estimate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: estimate

# 需要導入模塊: from opus_core.regression_model import RegressionModel [as 別名]
# 或者: from opus_core.regression_model.RegressionModel import estimate [as 別名]
 def estimate(self, specification, dataset, outcome_attribute, index=None, **kwargs):
     if index is None:
         index = arange(dataset.size())
     data_objects = kwargs.get("data_objects",{})
     if data_objects is not None:
         self.dataset_pool.add_datasets_if_not_included(data_objects)
     # filter out agents for this group
     new_index = self.group_member.get_index_of_my_agents(dataset, index, dataset_pool=self.dataset_pool)
     return RegressionModel.estimate(self,  specification, dataset, outcome_attribute,
                                            index=index[new_index], **kwargs)
開發者ID:christianurich,項目名稱:VIBe2UrbanSim,代碼行數:12,代碼來源:regression_model_member.py

示例2: estimate

# 需要導入模塊: from opus_core.regression_model import RegressionModel [as 別名]
# 或者: from opus_core.regression_model.RegressionModel import estimate [as 別名]
 def estimate(self, specification, dataset, outcome_attribute="urbansim.gridcell.ln_total_land_value", index = None,
                     procedure="opus_core.estimate_linear_regression", data_objects=None,
                     estimate_config=None,  debuglevel=0):
     if data_objects is not None:
         self.dataset_pool.add_datasets_if_not_included(data_objects)
     if self.filter <> None:
         res = Resources({"debug":debuglevel})
         index = dataset.get_filtered_index(self.filter, threshold=0, index=index, dataset_pool=self.dataset_pool,
                                            resources=res)
     return RegressionModel.estimate(self, specification, dataset, outcome_attribute, index, procedure,
                                  estimate_config=estimate_config, debuglevel=debuglevel)
開發者ID:psrc,項目名稱:urbansim,代碼行數:13,代碼來源:land_price_model.py

示例3: range

# 需要導入模塊: from opus_core.regression_model import RegressionModel [as 別名]
# 或者: from opus_core.regression_model.RegressionModel import estimate [as 別名]
#                   "demand_lag1"
#                    "sum_demand_times_2",
                    "waterdemand.consumption_re.something_like_sum_demand",
                   )
                 )

print "Create a model object"

years = range(2001, 2003)

# single
model = RegressionModel()
print "Estimate coefficients - single"
coefficients, other_est_results = model.estimate(specification, consumption, 
                    outcome_attribute="waterdemand.%s.sum_demand" % consumption_type,  # if outcome_attribute is opus_core.func.ln(), the simulation results need to take exp()
                    index=index_est, 
                    procedure="opus_core.estimate_linear_regression",
                    data_objects=dataset_pool.datasets_in_pool())


"""Simulate over the set of years."""
for year in years:  
    print "\nSimulate water demand %s" % year
    SimulationState().set_current_time(year)
    dataset_pool = SessionConfiguration().get_dataset_pool()
    dataset_pool.remove_all_datasets()
    gridcells = dataset_pool.get_dataset("gridcell")
    
    #create a ConsumptionDataset instance out of gridcells - simulate water demand for every gridcell
    resources = Resources({'data':{
            "grid_id":gridcells.get_id_attribute(),
開發者ID:psrc,項目名稱:urbansim,代碼行數:33,代碼來源:consumption_weather_single_year_bellevue.py

示例4: estimate

# 需要導入模塊: from opus_core.regression_model import RegressionModel [as 別名]
# 或者: from opus_core.regression_model.RegressionModel import estimate [as 別名]
 def estimate(self, specification, dataset, outcome_attribute="urbansim.gridcell.logistic_fraction_residential_land", index = None,
                     procedure="opus_core.estimate_linear_regression", data_objects=None,
                     estimate_config=None,  debuglevel=0):
     return RegressionModel.estimate(self, specification, dataset, outcome_attribute, index, procedure, data_objects=data_objects,
                                  estimate_config=estimate_config, debuglevel=debuglevel)
開發者ID:christianurich,項目名稱:VIBe2UrbanSim,代碼行數:7,代碼來源:residential_land_share_model.py


注:本文中的opus_core.regression_model.RegressionModel.estimate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。