当前位置: 首页>>代码示例>>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;未经允许,请勿转载。