전체 글 35

bagging vs. boosting

Bias and Variance - bias : 예측값과 실제 정답과의 차이의 평균 (예측값이 정답에서 얼만큼 떨어져 있는가) - varaince : 얼만큼 예측값이 퍼져서 다양하게 출력될 수 있는가 → bias & variance는 모델의 복잡도와 관련이 있고, 서로 trade-off 관계 출처1 : https://gaussian37.github.io/machine-learning-concept-bias_and_variance/ 출처2 : https://www.pico.net/kb/overfitting-variance-bias-and-model-complexity-in-machine-learning/ Ensemble - 앙상블 : 편향 및 분산(오버피팅)을 극복하여 더욱 일반화 된 모델을 만드는 것 b..

Data science/AI 2023.06.15

Django Rest Framework vs. GraphQL (chat GPT 검색)

백엔드 공부 시작에 있어서 노마드코더의 '에어비앤비 클론코딩'을 수강하고 있다. AI 분야에 있으면서 python을 주로 사용했기 때문에 Django 프레임워크를 사용하는 강의를 선택했다. Django Rest Framework(DRF)로 열심히.. 여러가지 Rest API를 만들어보았더니.. API를 만드는 또 다른 방법인 GraphQL에 대해 설명한다고 한다.. 즉, 장고에서는 DRF로 RESTful API를 만들고 Graphene으로 GraphQL API를 만드는 방법이 있는 것 같다. 이제 막 DRF를 마친 나에게 새로운 프레임워크를 배우는 것은 무리라고 생각되었고! 그럼에도 대략적인 특징은 알고 넘어가기 위해 Chat GPT에 검색해 보았다ㅎ - 다음 Chat GPT의 답변이 정답인 것은 아니기..

shap.DeepExplainer 사용 시 feature value가 gray 색상인 경우

shap.DeepExplainer — SHAP latest documentation A tuple of (row_values, row_expected_values, row_mask_shapes), where row_values is an array of the attribution values for each sample, row_expected_values is an array (or single value) representing the expected value of the model for each sample (which is shap-lrjball.readthedocs.io 우선 위 documentation을 보면 shap.DeepExplainer의 경우, 다음과 같이 model에 따라 dat..

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 32])

마지막 batch에 단일 training example만 있는 경우, 발생하는 에러 DataLoader의 drop_last=True로 설정 Expected more than 1 value per channel when training, got input size torch.Size([1, **]) I met an error when I use BatchNorm1d, code: ##% first I set a model class net(nn.Module): def __init__(self, max_len, feature_linear, rnn, input_size, hidden_size, output_dim, num__rnn_layers, stackoverflow.com

VSCode에서 git bash 터미널 추가

문제 : visual studio code에서 commit이 안됨 . 다음과 같은 경고창이 뜸 vscode make sure you configure your 'user.name' and 'user.email' in git 방법 1 : user.name과 user.email을 설정하기 위해서 vscode terminal에 다음 명령을 입력했지만 실행되지 않음 $ git config –global user.name “name” $ git config –global user.email "email" vscode terminal 'git'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그 램, 또는 배치 파일이 아닙니다. 방법 2 : git bash 터미널을 추가하고자 함 settings.json 파일을 ..

css파일, js파일 수정 후, 적용 안됨

컴퓨터에 저장된 캐시를 삭제하거나 우회 css, js 의 url 변경.. [Javascript] 자바스크립트 cache 로드때 코드 갱신 쿠키삭제 캐시삭제 로드 브라우져 캐시 우회하기 ================================= ================================= ================================= html 캐시삭제, 캐시방지 방법 모음 http://202psj.tistory.com/763 Web Storage 웹 스토로지 관련 http://202psj.tistory.com/1187 =========== 202psj.tistory.com

bitnami WAMP 서비스 종료 - Apache 설치

python으로 웹 개발 실습을 진행하고자 생활코딩 web2-python 수업을 듣던 중, 실습 환경 구축에 필요한 WAMP 서비스가 종료된 것을 확인 * WAMP (=Windows + Apache + MySQL + PHP) 직접 Apache를 설치해서 실습을 진행하고자 함. (추후 MySQL이 필요하다면 그것도 직접 설치..) Apache 설치 방법 🌐 아파치(Apache) 서버 초간단 설치 방법 Apache 서버 설치하기 1. 아래 링크로 들어가 아파치 서버를 설치해준다. Apache VS16 binaries and modules download www.apachelounge.com 2. 다운로드 받은 압축파일을 풀어 Apache24 폴더를 C: 드라이브 경로로 이동 inpa.tistory.com e..