Certificate 106

[Supervised learning] tree based model, Decision Tree, Python, max_depth, 지니계수, 정보균일, GridSearchCV, cross validation, k-fold

목차 Tree-based learning A type of supervised machine learning that performs classification and regression tasks. Desision tree Flow-chart-like supervised classification model, and a representation of various solutions that are available to solve a given problem, based on the possible outcomes of related choices. 데이터의 어떤 기준을 바탕으로 규칙을 만들어, 학습을 통해 정답을 자동으로 찾아낸다. 트리 기반이며, 가장 효율적인 분류가 되도록 알고리즘을 짠다. 정보..

[Cluster] Python, silhouette score, inertia, kmeans

목차 data 1. 라이브러리 import numpy as np import pandas as pd from sklearn.cluster import KMeans from sklearn.metrics import silhouette_score from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt import seaborn as sns 2. EDA unique(), dropna(), value_counts(), isnull(), reset_index() 1) encoding: categorical to numeric penguins_subset['sex'] = penguins_subset['sex'].str.uppe..

[Cluster] DBSCAN, Evaluation, inertia, silhouette score, Python

목차 DBSCAN Density based Spatial Clustering of Applications with Noise 밀도 기반 군집화의 대표 알고리즘으로 데이터 분포가 기하학적으로 복잡한 데이터 세트에 효과적이다. 높은 밀도의 데이터 포인트의 군집을 형성하고, 밀도가 낮은 지역은 노이즈로 처리한다. 입실론과 MinPts를 사용한다. ★ 입실론: 주변 영역의 반경 ★ Min Pts: 해당 영역 내에 존재하는 최소 데이터 포인트 수 클러스터 개수를 지정할 필요 없이, 알고리즘이 자동 결정함. Evaluation clustering에서 군집이 잘 만들어졌는지 보기 위해 시각화 작업을 했다. 2차원이나 3차원일 때는 가능하다. 하지만 n차원으로 넘어가면, 쉽지 않아진다. 따라서 다른 방법으로 군집이 잘..

[Unsupervised learning] K-means, centroid, Python

목차 K-means models - Unsupervised learning(using unlabled data) - Partitioning algorithm - Clusters unlabeled data - centroid : each cluster is defined by a central point or a centroid that is center of a cluster determined by the mathematical mean of all the points in that cluster. 그래서 이름이 k-means이다. 군집화에서 가장 일반적으로 사용하는 알고리즘으로, centroid(중심점)을 임의로 선택해 이와 가장 가까운 포인트들을 선택하는 방법이다. - metrics : inerti..

[Machine learning - Construct] Naive Bayes, 나이브베이즈, python, stratify

목차 Naive Bayes classifier A supervised classification technique that is based on Bayes' Theorem with an assumption of independence among predictors. 나이브 베이즈 알고리즘은 베이즈 정리에 기반한다. 베이즈 정리는 각각의 사건이 일어날 확률을 측정하는 것인데, 아래의 formula를 보자. c사건과 x사건이 있다. x가 발생한 이후에 c가 발생한다고 가정하자. P(c|x): x사건이 일어난 후 c사건이 일어날 확률이다. = 조건부 확률 P(c) : 사건 C가 일어날 확률 P(x) : 사건 x가 일어날 확률= 사건 c가 일어나기 전 사건 X가 일어날 확률 =사전확률= Predictor pri..