Ejemplo n.º 1
0
 def fit(self, model_args):
     seeds = [171204, 402711, 711270, 201714, 141702]
     ve, te = [], []
     for _ in range(self.run_times):
         log('run_times#{}/{}, seed: {}'.format(_ + 1, self.run_times,
                                                seeds[_]))
         np.random.seed(seeds[_])
         self.init_model_args(model_args)
         self.model = self.make_model()
         _ve, _te = self._fit()
         ve.append(_ve)
         te.append(_te)
         msg = 'vali: {}, test: {}'.format(_ve, _te)
         log(msg)
     return Eva.mean(ve), Eva.mean(te)
Ejemplo n.º 2
0
    def __init__(self):
        self.newDialog = QtWidgets.QMainWindow()
        self.new_screen = New()
        self.new_screen.setupUi(self.newDialog)

        self.EvaluateWindow = QtWidgets.QMainWindow()
        self.eval_screen = Eva()
        self.eval_screen.setupUi(self.EvaluateWindow)

        self.openDialog = QtWidgets.QMainWindow()
        self.open_screen = Open()
        self.open_screen.setupUi(self.openDialog)
Ejemplo n.º 3
0
	def __init__(self): # linking files and creating objects
		self.new_Window = QtWidgets.QMainWindow()
		self.new_screen = New()
		self.new_screen.setupUi(self.new_Window)

		self.evaluate_Window = QtWidgets.QMainWindow()
		self.eval_screen = Eva()
		self.eval_screen.setupUi(self.evaluate_Window)

		self.open_Window = QtWidgets.QMainWindow()
		self.open_screen = Open()
		self.open_screen.setupUi(self.open_Window)
    def __init__(self):
        #NEW
        self.newDialog = QtWidgets.QMainWindow()
        self.new_screen = New()
        self.new_screen.setupUi(self.newDialog)

        #EVALUATE
        self.EvaluateWindow = QtWidgets.QMainWindow()
        self.eval_screen = Eva()
        self.eval_screen.setupUi(self.EvaluateWindow)

        #OPEN
        self.openDialog = QtWidgets.QMainWindow()
        self.open_screen = Open()
        self.open_screen.setupUi(self.openDialog)
Ejemplo n.º 5
0
 def evaluate(self, x, y=None):
     if y is None:
         if type(x) == str:
             x = eval('self.data.' + x)
         x, y = x.x, x.y
     return Eva(self.predict(x), y)