# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# ## Chapter5.1 scikit-learn 간단하게 살펴보기 

# +
from sklearn.datasets import make_blobs

X_dataset, y_dataset = make_blobs(centers=[[-0.3, 0.5], [0.3, -0.2]],
                                  cluster_std=0.2,
                                  n_samples=100,
                                  center_box=(-1.0, 1.0),
                                  random_state=42)

# +
from sklearn.linear_model import LogisticRegression

# 로지스틱스 회귀 모델 인스턴스 만들기
classifier = LogisticRegression()

# 학습 하기
classifier.fit(X_dataset, y_dataset)

# +
# 테스트 전용 데이터
test_data = [[0.1, 0.1],
             [-0.5, 0.0]]

print(classifier.predict(test_data))

StarcoderdataJupyterScriptsDedupFiltered