교육/2021 NIPA AI 온라인교육
-
[응용교육과정] 딥러닝 시작하기교육/2021 NIPA AI 온라인교육 2021. 9. 2. 23:46
01 퍼셉트론 신작 드라마 수(x_1x1)와 확보한 여가 시간(x_2x2)에 따른 엘리스 코딩 학습 여부(yy)를 예측하는 모델 w0:−5,w1:−1,w2:5값을 갖는 Perceptron 함수의 결과를 출력 학습 여부(출력값 y)가 1이 나오도록 x1, x2 값을 입력, 활성화 함수는 신호의 총합이 0이상이면 학습, 0미만이면 학습X # 학습 여부를 예측하는 퍼셉트론 함수 def Perceptron(x_1,x_2): # 설정한 가중치값을 적용 w_0 = -5 w_1 = -1 w_2 = 5 # 활성화 함수에 들어갈 값을 계산 output = w_0+w_1*x_1+w_2*x_2 # 활성화 함수 결과를 계산 if output < 0: y = 0 else: y = 1 return y, output ..
-
[응용교육과정]머신러닝 시작하기교육/2021 NIPA AI 온라인교육 2021. 8. 31. 23:49
01. 자료 형태의 이해 #도수계산 df['a'].value_counts() #a열의 도수 출력 #평균계산 np.mean(array) #표준편차 stdev(array) #히스토그램 plt.hist(array) #bins라는 옵션을 줘서 계급의 개수 설정가능 02. 데이터 전 처리하기 #명목형 자료 수치형으로 매핑해서 변환 DataFrame.replace({A:B, C:D,...}) #예시 titanic.replace({'male':0,'female':1}) #명목형 자료 더미 형식으로 변환 pd.get_dummies(DataFrame[[변수명]]) #특정변수(columns)삭제 DataFrame.drop(columns=[변수명]) #결측값 샘플 제거 DataFrame.dropna() #train, tes..