일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
- Numerical Analysis
- ChatGPT
- 수식삽입
- 텝스공부
- WOX
- 논문작성법
- 고체역학
- Statics
- matplotlib
- Linear algebra
- Julia
- Zotero
- pytorch
- JAX
- 인공지능
- 수치해석
- 에러기록
- 우분투
- 생산성
- 딥러닝
- LaTeX
- 옵시디언
- MATLAB
- teps
- Dear abby
- 텝스
- Python
- obsidian
- IEEE
- 논문작성
- Today
- Total
목록전체 글 (430)
뛰는 놈 위에 나는 공대생
앙상블(ensemble) 방법 중에 boosting method가 있습니다. bagging도 ensemble에 속하는데, boosting과 차이가 있습니다. bagging 방법은 boostrap으로 데이터를 resampling해서 여러 개의 모델을 만들어서, 그 모델들을 종합하는 방식입니다. boosting 역시 여러 개의 모델을 만들지만, 그 모델에 가중치를 부여해서 가중치를 반복적으로 업데이트하는 방식입니다. Adaboost Updates weights of the observations at each iteration. Weights of well classified observations decrease relatively to weights of misclassified observations...
로지스틱 회귀모형을 통해 특정 class에 속할 확률을 알 수 있습니다. 1. Logistic Regression 소개 logistic regression은 우리가 흔히 사용하던 linear regression의 변형이라고 볼 수 있습니다. 그림 출처 : https://ko.wikipedia.org/wiki/%EC%8B%9C%EA%B7%B8%EB%AA%A8%EC%9D%B4%EB%93%9C_%ED%95%A8%EC%88%98#/media/%ED%8C%8C%EC%9D%BC:Logistic-curve.svg 위 함수는 $f(y)=\frac{1}{1+e^{-y}}$ $logit(p)=\ln\left(\frac{p}{1-p}\right)=\beta_{0}+\beta_{1}X$ linear regression처럼 회..
모델을 만들고 나서 이 모델이 실제로 사용되기 위해서는 모델의 성능을 고려해야 합니다. Sensitivity (민감도, True positive rate, recall) : 실제 true인 것 중에 모델이 true라고 예측한 비율 $\text{Sensitivity = }\frac{TP}{TP+FN}$ Specificity (True negative rate) : 실제 false인 것 중에 모델이 false라고 예측한 비율 $\text{Specificity = }\frac{TN}{FP+TN}$ Precision : 모델이 true라고 예측한 것 중에 실제로 true인 비율 $\text{Precision = }\text{TP}{TP+FP}$ F1 score : precision과 recall의 조화평균 $\..
번역하면 의사결정 나무라고 하는데, classification과 regression에 둘 다 쓰일 수 있는 머신러닝 방법입니다. decision tree는 feature에 대한 조건을 통해 가지를 치면서 학습하는 방법입니다. numerical, categorical variable 둘 다 쓸 수 있고 분석 과정이 직관적이라는 점 때문에 많이 쓰이고 있습니다. (나중에 쓸 random forest가 decision tree를 더 발전시킨 형태) 이 decision tree는 불순도(impurity, 범주들이 섞여있는 정도)를 최소화하는 방향으로 진행되어야 합니다. 우리가 decision tree를 사용할 때 이 불순도를 판단하기 위한 척도로서, 1) Gini index, 2) Entropy index가 사..
결측치에도 종류가 있기 때문에 각 결측치의 특성에 따라서 처리하는 방법이 달라질 수 있습니다. 1. 결측치 Missing data 종류 1) Missing completely at random (MCAR) 완전히 무작위로 Missing value가 있는 경우입니다. 관찰 가능한 변수에도 영향을 받지 않고, 관찰 불가능한 (우리가 관심있어하는) 변수에도 무관합니다. 예를 들면, 설문조사를 하는 데 성별이나, 나이에 관계없이 일정하게 결측치가 존재한다면 결측치가 설문의 결과를 편향되도록 만들지 않을 것입니다. 즉 이 데이터에 대한 분석은 unbiased되었다고 볼 수 있습니다. 2) Missing at random (MAR) 관찰된 데이터의 변수에 따라 결측치 경향성이 있을 뿐, 결측치 자체에는 그 경향성이..
* 파이썬 관련한 정보를 간단하게 적어두고 있습니다. 계속 추가할 예정 C, C++은 컴파일러(compiler)이고 python은 인터프리터(interpreter) MATLAB이나 R은 Reserach, prototyping, and test new ideas를 목적으로 하는 언어 Java, C#, C++은 실제 production system을 만들기 위한 언어 FORTRAN은 과학적, 수학적 계산에 적합한 언어 python은 C, C++, FORTRAN 등의 언어와 호환이 되기 때문에 많이 사용된다. 실제로 데이터 사이언스 분야에서 가장 많이 쓰이는 언어는, Python, R, SQL 등이 있다.
1. Data Wrangling raw 데이터를 cleaning하고 structuring하는 과정 - 분석에 용이한 구조로 만드는 과정 다음과 같은 과정을 포함합니다. data importing, data cleaning, data structuring, string processing, HTML parsing, handling dates and times, handling missing data, and text mining. data filtering 전체 features에서 조건에 따라서 조건을 충족하는 데이터만 가지고 오는 것 ex) 야구선수 데이터에서 타율이 0.3 이상인 rows만 가지고 오기 data selecting 전체 features에서 일부 features만 선택하는 것 ex) 환자들..
데이터 과학을 하기에 앞서 기본적인 문제 해결 프로세스에 대해 알아보려고 합니다. 기계공학에서도 어떤 학문이든 들어가기에 앞서, 어떤 관점에서 문제를 접근할 것인지를 미리 introduction에서 알려주고 시작합니다. 데이터 과학도 결국은 문제를 해결하기 위해 존재하므로, 그 분석 process를 잘 알고 있는 것 역시 중요할 것이라 생각합니다. 1. Problem definition 내가 어떤 문제를 풀 것인지 정합니다. 생각보다 이렇게 문제를 명확하게 정의하지 못해서 발생하는 문제점들이 많습니다. 설계를 할 때도 문제 상황을 제대로 파악하지 않고 해결 방법을 들이댔다가 나중에 잘못 되는 경우를 종종 봤습니다. 데이터 분석을 할 때도 문제를 정의하면서 시작합니다. 예를 들면, 고객들의 구매 패턴을 알..
비지도학습 unsupervised learning의 가장 대표적인 방법이 clustering입니다. label이 없기 때문에 prediction이나 classification이 불가능하고 객체 간의 유사성이 큰 것들끼리 묶어주는 방법입니다. 유사성 기준으로 1) 거리를 계산하거나 2) 상관계수를 구하는 방법이 있습니다. 1. 유사성 척도 1) 거리 두 n차원 데이터 $P=(p_{1},p_{2},...,p_{n})$과 $Q=(q_{1}, q_{2},..., q_{n})$이 있을 때 두 점 사이의 거리는 다양하게 구할 수 있습니다. - 유클리디안 거리(euclidean distance) 가장 흔하게 쓰이는 거리 척도 $d(P,Q)=\sqrt{\sum_{i=1}^{n}(p_{i}-q_{i})^{2}}$ - 민..
https://kr.mathworks.com/help/symbolic/subs.html?searchHighlight=%EA%B8%B0%ED%98%B8%20%EB%8C%80%EC%9E%85&s_tid=srchtitle 기호 대입 - MATLAB subs - MathWorks 한국 다음 MATLAB 명령에 해당하는 링크를 클릭했습니다. 명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다. kr.mathworks.com MATLAB 내에서 기호를 만들면 함수를 사용하기가 편해집니다. $f(x)=x^{3}+x$라는 함수를 기호로 정의하고 나중에 숫자만 대입해주면서 구할 수 있기 때문입니다. 이 때 기호를 대입할 때 쓰는 함수를 subs라고 합니다. syms..