7 장 sklearn

7.1 주요기능

  1. Classification:
    • Applications: Spam detection, Image recognition.
    • Algorithms: SVM, nearest neighbors, random forest
  2. Regression
    • Applications: Drug response, Stock prices.
    • Algorithms: SVR, ridge regression, Lasso
  3. Clustering
    • Applications: Customer segmentation, Grouping experiment outcomes
    • Algorithms: k-Means, spectral clustering, mean-shift
  4. Dimensionality reduction
    • Applications: Visualization, Increased efficiency
    • Algorithms: PCA, feature selection, non-negative matrix factorization
  5. Model selection
    • Modules: grid search, cross validation, metrics
  6. Preprocessing
    • Application: Transforming input data such as text for use with machine learning algorithms.
    • Modules: preprocessing, feature extraction

7.2 sklearn.datasets

  1. 데이터 셋

    데이터 로드 함수 데이터설명 참고
    load_boston 보스턴 집값 내장데이터
    load_diabetes 당뇨병 자료
    load_linnerud linnerud 자료
    load_iris 붓꽃자료
    load_digits 필기 숫자(digit)이미지
    load_wine 포도주(wine) 등급
    load_breast_cancer 유방암진단 자료
    fetch_california_housing 캘리포니아 집값 자료 인터넷 다운로드
    fetch_covtype 토지조사 자료
    fetch_20newsgroups 뉴스 그룹 텍스트 자료
    fetch_olivetti_faces 얼굴 이미지 자료
    fetch_lfw_people 유명인 얼굴 이미지
    fetch_lfw_pairs 유명인 얼굴 이미지
    fetch_rcv1 로이터 뉴스 말뭉치
    fetch_kddcup99 Kddcup 99 Tcp dump
    make_regression 회귀분석용 가상데이터
    make_classification 분류용
    make_blobs 클러스터링용
  2. 데이터 형식: Bunch라는 클래스 객체로 생성

    • data: (필수) 독립 변수 ndarray 배열
    • target: (필수) 종속 변수 ndarray 배열
    • feature_names: (옵션) 독립 변수 이름 리스트
    • target_names: (옵션) 종속 변수 이름 리스트
    • DESCR: (옵션) 자료에 대한 설명
  3. Example