class Controller: def __init__(self): self.service = Service() @staticmethod def print_menu(): print(''' 1. 타이타닉 2. 생존자 ''') return input('메뉴를 골라주세요') def run(self): while 1: menu = self.print_menu() if (menu == '1'): self.service.load_data() elif (menu == '2'): self.service.load_data() elif (menu == '0'): pass
def __init__(self): self.entity = Entity() self.service = Service()
def __init__(self, fname): service = Service() self._model = service.new_model(fname)
def __init__(self): print('TEST') self.entity = Entity() self.service = Service()
import sys sys.path.insert(0, '/Users/seung/SbaProjects/beatCamp-python') from titanic.entity import Entitity from titanic.service import Service class Controller: def __init__(self): self.entity = Entity() self.service = Service() if __name__ == '__main__': api = Controller() Service = Service()
class Controller: def __init__(self): pass def preprocessing(self, train, test): service = self.service this = self.entity this.train = service.new_model(train) #payload this.test = service.new_model(test) return this def modeling(self, train, test): service = self.service this = self.preprocessing(train, test) print('훈련 컬럼: {this.train.columns}') this.label = service.create_label(this) this.train = service.create_train(this) return this def learning(self): pass def submit(self): pass if __name__ == '__main__': api = Controller() service = Service() service.naver_cartoon('https://comic.naver.com/webtoon/weekday.nhn')
def __init__(self): self.service = Service()
def __init__(self): self._service = Service() self._model = Model()