本文整理汇总了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()
示例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)
示例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
示例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
示例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'
示例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
示例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
示例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)
示例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)
示例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
示例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
示例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)
示例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 = ""
示例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)
示例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