[AI SCHOOL 5기] 통계분석 실습 - T-Test & 상관관계 분석

Import Libraries 1 2 3 4 5 6 7 8 import pandas as pd import seaborn as sns import scipy as sp from scipy import stats import warnings warnings.filterwarnings("ignore") 교차분석 교차표 (Cross-Table) 1 2 3 4 crosstab = pd.crosstab(df.propensity, df.skin, margins=True) crosstab.columns=[] crosstab.index=[] margins: 합계(All) 추가 여부 normalize: Normalization 여부 Chi-square 검정 두 범주형 변수 사이의 관계가 있는지 없는지를 검정 (독립성 검정) 귀무가설: Indepedent (vice versa) 대립가설: Not Independent 1 2 3 4 stats....

April 2, 2022 · 3 min · 444 words · minyeamer

[AI SCHOOL 5기] 통계분석 실습 - 빈도 분석 & 기술통계량 분석

Chart Pie Chart 1 df['column'].value_counts().plot(kind = 'pie') Bar Chart 1 df['column'].value_counts().plot(kind = 'bar') Descriptive Statistics df['column'].max(): 최댓값 (행방향 기준: axis=1) df['column'].min(): 최솟값 df['column'].sum(): 합계 df['column'].mean(): 평균 df['column'].variance(): 분산 df['column'].std(): 표준편차 df['column'].describe(): 기술통계량 분포의 왜도와 첨도 df['column'].hist(): 히스토그램 df['column'].skew(): 왜도 (분포가 좌우로 치우쳐진 정도) 왜도(Skewness): 0에 가까울수록 정규분포 (절대값 기준 3 미초과) 우측으로 치우치면 음(negative)의 왜도, 좌측으로 치우치면 양(positive)의 왜도 df['column'].kurtosis(): 첨도 (분포가 뾰족한 정도) 첨도(Kurtosis): 1에 가까울수록 정규분포 (절대값 기준 8 또는 10 미초과) 왜도가 0, 정도가 1일 때 완전한 정규분포로 가정 sns....

April 2, 2022 · 2 min · 220 words · minyeamer

[AI SCHOOL 5기] 통계분석 실습 - Numpy & Pandas

Numpy Numpy Array 내부의 데이터는 하나의 자료형으로 통일 Numpy Array에 값을 곱하면 전체 데이터 그대로 복사되는 리스트와 달리 데이터에 각각 곱해짐 np.array([]): Numpy Array 생성 np.dtype: Numpy Array의 Data Type np.shape: Numpy Array 모양(차원) np.arange(): range를 바탕으로 Numpy Array 생성 np.reshape(): Numpy Array 모양을 변경, 열에 -1을 입력하면 자동 계산 np.dot(): 행렬곱 Pandas pd.Series([], index=[]): Key가 있는 리스트(Series) 생성 Series.values: Series의 값 Series.index: Series의 키 값 df.ammount: 띄어쓰기 없이 영단어로 구성된 열은 변수처럼 꺼내 쓸 수 있음 df....

March 29, 2022 · 1 min · 136 words · minyeamer

[AI SCHOOL 5기] 웹 크롤링 실습 - 웹 크롤링

Wadis 마감 상품 재고 체크 Google 메일 설정 1 2 3 4 5 6 7 8 9 10 11 12 import smtplib from email.mime.text import MIMEText def sendMail(sender, receiver, msg): smtp = smtplib.SMTP_SSL('smtp.gmail.com', 465) smtp.login(sender, 'your google app password') msg = MIMEText(msg) msg['Subject'] = 'Product is available!' smtp.sendmail(sender, receiver, msg.as_string()) smtp.quit() Wadis 상품 재고 체크 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # 라이브러리 선언 check_status = 1 url = 'https://www....

March 29, 2022 · 3 min · 478 words · minyeamer

[AI SCHOOL 5기] 웹 크롤링 실습 - 셀레니움

Selenium 브라우저의 기능을 체크할 때 사용하는 도구 브라우저를 조종해야할 때도 사용 Import Libraries 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # 크롬 드라이버 파일 자동 다운로드 from webdriver_manager.chrome import ChromeDriverManager # 크롬 드라이버를 파일에 연결 from selenium.webdriver.chrome.service import Service from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup import time import pandas as pd import warnings warnings....

March 28, 2022 · 3 min · 469 words · minyeamer