일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- LSTM
- Numpy
- Python
- imread
- synology
- install
- index
- pandas
- GitHub
- pip
- SciPy
- Splunk
- dataframe
- ipad
- keras
- RNN
- mean
- mariadb
- javascript
- GT-S80
- 알고리즘
- Series
- pycharm
- CNN
- SPL
- E-P1
- Button
- 삼성소프트웨어멤버십
- DFS
- Lotto
- Today
- Total
목록SciPy (5)
잠토의 잠망경
표본분산 특징 ① 분산을 과소추정 함 print('표본 분산: {}'.format(sp.sum((datas - mu)**2)/(len(datas)-0))) print('표본 분산: {}'.format(sp.var(datas, ddof=0))) 불편분산 특징 ① 분산을 과소추정 하지 않는다. ② 총길이(N)에서 1을 빼준다. print('불편 분산: {}'.format(sp.sum((datas - mu)**2)/(len(datas)-1))) print('불편 분산: {}'.format(sp.var(datas, ddof=1))) 표준편차 특징 ① 제곱을 없엤다. why? 계산하는데 복잡하다. print('표준 편차: {}'.format(sp.sqrt(sp.sum((datas - mu) ** 2) / (len..
표준화 평균: 0, 표준편차: 1 로 만드는 것 방법 대상 방법 평균 Data 값들 - 평균 표준편차 Data 값들 / 표준 편차 full code github def sample_standardzation01(): import numpy as np import scipy as sp datas = np.asarray([2, 3, 3, 4, 4, 4, 4, 5, 5, 6]) # Datas mu = sp.mean(datas) # 평균 print('-'*100) print(datas) print(mu) # 변환 print(datas-mu) print(sp.mean(datas - mu)) print('-'*100) sigma = sp.std(datas, ddof=1) print(sigma) print(datas..
Github github 준비 import numpy as np import scipy as sp max, min 다른데서도 다 쓰는거 scipy에도 해당 함수가 있어서 써본다. # 최댓 값 print(sp.amax([2,3,3,4,4,4,4,5,5,6])) # 6 print('-'*100) # 최솟 값 print(sp.amin([2,3,3,4,4,4,4,5,5,6])) # 2 평균 평균에 이상치 Data가 있는 경우 평균이 무너지게 된다. 여기서 이상치 Data는 100 이다. print(sp.mean([1, 2, 3, 4, 5])) # 3.0 print(sp.mean([2, 3, 3, 4, 4, 4, 4, 5, 5, 6])) # 4.0 print(sp.mean([2,3,3,4,4,4,4,5,5,100..
사분위 구하기 목적: Data를 순서대로 늘어놓았을 때 아래부터 지정한 percent의 값에 맞는 값을 산출한다. from scipy import stats code github def sample_stats(): import numpy as np from scipy import stats fish_datas3 = np.asarray([1,2,3,4,5,6,7,8,9,10]) num = 25 print('{0}% = {1}'.format(num, stats.scoreatpercentile(fish_datas3, num))) num = 75 print('{0}% = {1}'.format(num, stats.scoreatpercentile(fish_datas3, num))) print('-'*10) for ..
github line chart의 noise를 제거하기 위하여 gaussian filter를 사용하였다. 해당 chart는 1차원으로 1d 함수를 사용하였다. sigma에 따른 결과를 아래와 같이 볼수 있다. g1 = gaussian_filter1d(g, sigma=1) g1 = gaussian_filter1d(g, sigma=2) g1 = gaussian_filter1d(g, sigma=3) 여러개를 보자 github def showgausiandata(): #임의 data np.random.seed(280490) datas = np.random.randn(101).cumsum() # 실험해볼 sigma들 sigmas = np.asarray([0.3, 1, 2, 3, 4, 5]) # chart용 fig..