대학원 과제에서 퍼셉트론(Perceptron)을 구현하라는 과제를 받았다. 사실 파이썬으로 퍼셉트론을 구현해둔 코드는 많지만 의외로 결정 경계(Decision Boundary)를 표현해주는 코드는 많이 없었다. 그래서 직접 코딩해서 만들어보았다. 핵심 코드는 다음과 같다. 모든 코드는 깃헙에 올려두었다. class Perceptron(): # 초기화 def __init__(self,example,thresholds=0.0,eta=0.01,n_iter=10): self.thresholds = thresholds self.eta = eta self.n_iter = n_iter self.example = example self.gif_path = './img/{}/'.format(example) # 학습 de..