当前位置: 首页>>代码示例>>Python>>正文


Python Model.__init__方法代码示例

本文整理汇总了Python中Model.Model.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Model.__init__方法的具体用法?Python Model.__init__怎么用?Python Model.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model.Model的用法示例。


在下文中一共展示了Model.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
	def __init__(self):
		Model.__init__(self)
		self.source = vtk.vtkSphereSource()
		self.source.SetCenter(0.0, 0.0, 0.0)
		self.source.SetRadius(0.5)
		self.source.Update()
		self.Update()
开发者ID:aglowacki,项目名称:ScanSimulator,代码行数:9,代码来源:PrimitiveModels.py

示例2: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, bactDensity, chemDensity, dt, lamda, d, e):
     self.motility = d
     self.chemSens = lamda * bactDensity/(1+e*bactDensity)
     self.liveCycle = 0
     self.chemProd = bactDensity
     self.chemDegr = 1
     Model.__init__(self, bactDensity, chemDensity, dt)
开发者ID:ePaulius,项目名称:Bakt_modeliavimas,代码行数:9,代码来源:DensityDependentSensitivity.py

示例3: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
	def __init__(self, ID, params):
		Model.__init__(self, ID, params)
		h2o.init()

		datadir = os.path.expanduser('~') +'/FSA/data/'
		trainingFile = datadir + params[1][0]
		valFile = datadir + params[1][1]
		testingFile = datadir + params[1][2]


		self.trainData = h2o.import_file(path=trainingFile)
		self.valData = h2o.import_file(path=valFile)
		#self.valData = self.trainData
		self.testData = h2o.import_file(path=testingFile)

		# print self.trainData.col_names()
		# drop the invalid columns
		self.trainData = self.trainData.drop("away_score").drop("home_score")
		self.valData = self.valData.drop("away_score").drop("home_score")
		self.testData = self.testData.drop("away_score").drop("home_score")

		self.params = params

		if self.params[0] == False:
			self.trainData = self.trainData.drop('spread')
			# self.valData   = self.valData.drop('spread')
			self.testData  = self.testData.drop('spread')

		# for h2o, creating the model is the same as training the model so
		# need to hold of here
		self.model = None
开发者ID:Aakash282,项目名称:1ia,代码行数:33,代码来源:h2o_DL.py

示例4: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, controller):
   from collections import OrderedDict
   Model.__init__(self, controller)
   self._currentPlotSet = None
   self._plotSets = OrderedDict()    # key: plotSet ID, value: instance of XYPlotSetModel. We use an OrderedDict so that
                                     # when removing elemetns, we can easily re-select the last-but-one.
   self._lockRepaint = False  # if True, repaint routines are blocked.
   self._plotSetsRepaint = set() # plot waiting for repaint/update while repaint is locked
开发者ID:FedoraScientific,项目名称:salome-gui,代码行数:10,代码来源:PlotManager.py

示例5: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self,root='',database_path='data/',database_name='mydatabase.db'):
     Model.__init__(self,root,database_path,database_name)
     self.name = 'courses'
     self.columns["name"] = 'TEXT'
     self.columns["semester"] = 'TEXT'
     self.columns["type"] = 'TEXT'
     self.columns["lecture_group"] = 'TEXT'
     self.columns["day"] = 'TEXT'
     self.columns["start_time"] = 'TEXT'
     self.columns["end_time"] = 'TEXT'
     self.columns["venue"] = 'TEXT'
开发者ID:jamiewannenburg,项目名称:TimeTable,代码行数:13,代码来源:AllCoursesDB.py

示例6: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self,configModel,utils,config,strTrial):
     Model.__init__(self,configModel,utils,strTrial)
     self.configPath = utils.MODEL_CONFIG_PATH   + self.tag + \
                                           '_t' + strTrial
     self.numIter              = config.SVD_NUM_ITER
     self.SVDBufferPath        = utils.SVDFEATURE_BUFFER_BINARY
     self.learningRate         = config.SVD_LEARNING_RATE
     self.regularizationItem   = config.SVD_REGULARIZATION_ITEM
     self.regularizationUser   = config.SVD_REGULARIZATION_USER
     self.regularizationGlobal = config.SVD_REGULARIZATION_GLOBAL
     self.numFactor            = config.SVD_NUM_FACTOR
     self.activeType           = config.SVD_ACTIVE_TYPE
     self.modelOutPath         = utils.SVDFEATURE_MODEL_OUT_PATH
     self.SVDFeatureBinary     = utils.SVDFEATURE_BINARY
     self.SVDFeatureInferBinary= utils.SVDFEATURE_INFER_BINARY
开发者ID:RudolphXu,项目名称:HybridMovieRecommendationSystem,代码行数:17,代码来源:SVDModel.py

示例7: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, logger = None):
     Model.__init__(self, logger)
     self.counter = { }
     self.counter[Event.BRIDGE] = 0
     self.counter[Event.CONFBRIDGEEND] = 0
     self.counter[Event.CONFBRIDGEJOIN] = 0
     self.counter[Event.CONFBRIDGELEAVE] = 0
     self.counter[Event.CONFBRIDGESTART] = 0
     self.counter[Event.DIAL] = 0
     self.counter[Event.END] = 0
     self.counter[Event.HANGUP] = 0
     self.counter[Event.LOCALBRIDGE] = 0
     self.counter[Event.NEWCHANNEL] = 0
     self.counter[Event.NEWSTATE] = 0
     self.counter[Event.RENAME] = 0
     self.counter[Event.SIPCALLID] = 0
     self.counter[Event.HANGUPREQUEST] = 0
     self.counter[Event.START] = 0
     self.counter[Event.STOP] = 0
     self.counter[Event.NEWCALLERID] = 0
     self.counter[Event.SOFTHANGUPREQUEST] = 0
开发者ID:DougInBoulder,项目名称:com-diag-hackamore,代码行数:23,代码来源:ModelCounter.py

示例8: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self):
     self.table_name = 'guild_member'
     self.test_key = {'guild_name': 'test_guild_01', 'char_name': 'test_char_01'}
     Model.__init__(self)
开发者ID:ukysung,项目名称:mobilegameserverframework,代码行数:6,代码来源:ModelGuildMember.py

示例9: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self):
     self.table_name = 'skill'
     self.test_key = {'char_name': 'test_char_01', 'skill_mid': 1}
     Model.__init__(self)
开发者ID:ukysung,项目名称:mobilegameserverframework,代码行数:6,代码来源:ModelSkill.py

示例10: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, query_str, im):
     Model.__init__(self, query_str, im)
     self.k1 = 2
     self.k2 = 500
     self.b = 0
     self.threshold = 10000
开发者ID:heroxdream,项目名称:information-retrieval,代码行数:8,代码来源:OkapiBM25.py

示例11: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, u, v, delta, dt, d, lamda, n):
     Model.__init__(self, u, v, delta, dt, d, lamda)
     self.n = c_double(n)
     self.lib.nonLinDiff.restype = environment
开发者ID:ePaulius,项目名称:Bakt_modeliavimas,代码行数:6,代码来源:NonlinearDiffusion.py

示例12: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, query, im):
     Model.__init__(self, query, im)
     self.threshold = 10000
     self.uniq_doc_tokens = defaultdict(set)
开发者ID:heroxdream,项目名称:information-retrieval,代码行数:6,代码来源:Proximity.py

示例13: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, controller):
   Model.__init__(self, controller)
   self._columnTitles = {}
   self._data = None
   self._title = ""
开发者ID:FedoraScientific,项目名称:salome-gui,代码行数:7,代码来源:TableModel.py

示例14: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
	def __init__(self, ID, params):
		Model.__init__(self, ID, params)
		self.n_est = params[0]
		self.model = ensemble.RandomForestRegressor(n_estimators=self.n_est, verbose=0, n_jobs=3,
                                                    max_depth=10, oob_score=True)
开发者ID:Aakash282,项目名称:1ia,代码行数:7,代码来源:sk_RF.py

示例15: __init__

# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import __init__ [as 别名]
 def __init__(self, u, v, delta, dt, d, lamda):
     Model.__init__(self, u, v, delta, dt, d, lamda)
     self.lib.minimal.restype = environment
开发者ID:ePaulius,项目名称:Bakt_modeliavimas,代码行数:5,代码来源:Minimal.py


注:本文中的Model.Model.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。