다음 그래프들은 전자책 파이썬과 함께하는 통계이야기 3 장에 수록된 그림들의 코드들입니다. import numpy as np import pandas as pd from scipy import stats import matplotlib.pyplot as plt import seaborn as sns sns.set_style("darkgrid") #fig 311 uni, p=[0, 1, 2],[0.25, 0.5, 0.25] fig, ax=plt.subplots(figsize=(4,3)) ax.bar(uni, p, color="g", alpha=0.3) ax.set_xlabel("# of head(H)") ax.set_ylabel("PMF") ax.set_yticks(p) ax.set_xticks(uni) plt.show() #fig 312 import itertools ca=list(itertools.product(range(1, 7), repeat=2)) S=[sum(i) for i in ca] uni, fre=np.unique(S, return_counts=True) fresum=sum(fre) p=[i/fresum for i in fre] fig, ax=plt.subplots(figsize=(4,3)) ax.bar(uni, p, color="g", alpha=0.3) ax.set_xlabel("Sum of number") ax.set_ylabel("PMF") ax.set_yticks(np.array(p).round(3)) ax.set_xticks(uni) plt.show() #fig 313 ca=list(itertools.product([0, 1], repeat=2)) S=[sum(i) for i in ca] uni, fre=np.unique(S, return_counts=True) re=pd.DataFrame([...
python 언어를 적용하여 통계(statistics)와 미적분(Calculus), 선형대수학(Linear Algebra)을 소개합니다. 이 과정에서 빅데이터를 다루기 위해 pytorch를 적용합니다.