Skip to Content
우아한 사이파이: 수학, 과학, 엔지니어링을 위한 파이썬 데이터 분석 라이브러리 SciPy
book

우아한 사이파이: 수학, 과학, 엔지니어링을 위한 파이썬 데이터 분석 라이브러리 SciPy

by 최길우, 후안 누네즈-이글레시아스, 스테판 판데르발트, 해리엇 대시나우
June 2018
Beginner to intermediate
304 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from 우아한 사이파이: 수학, 과학, 엔지니어링을 위한 파이썬 데이터 분석 라이브러리 SciPy
161
5
희소행렬과 혼동행렬
나는 희소성
sparseness
을 좋아한다. 희소성은 즉각적인 감흥을 주는 단순한 느낌에 대한 뭔
가가 있고 그 뭔가를 독특하게 해준다. 아마 항상 희소성을 생각하며 음악을 할 것이다.
단지 방법을 모를 뿐...
- 브릿 대니얼, 스푼 리드 싱어
실제 많은 행렬은 대부분 값이
0
인 희소행렬이다.
넘파이 배열로 희소행렬을 계산할 때
0
을 곱하는 데 대부분 시간을 쓴다. 사이파이의
sparse
모듈을 사용해서
0
이 아닌 값을 검사하면 이 문제를 효율적으로 해결할 수 있다. 이뿐만 아니
sparse
모듈은 희소행렬과 관련이 없는 문제를 해결하는 데도 사용할 수 있다.
이러한 문제 중 하나는 이미지 분할
image
segmentation
에 대한 비교다 (분할의 정의에 대해서는
3
을 참고한다 ).
아래의 코드 샘플에서 희소행렬을 두 번 사용한다. 먼저 두 분할 간의 레이블 유사도를 파악하
는 혼동행렬
contingency
matrix
을 계산한다. 그런 다음, 분할 간 정보 변형
variation
of
information
을 계산하
는 데 혼동행렬을 사용한다.
희소행렬과 혼동행렬
CHAPTER
5
162
우아한 사이파이
def
variation
_
of
_
information
(
x
,
y
):
# 혼동행렬(
contingency
matrix
)를
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

머신러닝을 위한 실전 데이터셋: 개인 정보를 보호하고 머신러닝 학습에 사용할 합성 데이터 만들기

머신러닝을 위한 실전 데이터셋: 개인 정보를 보호하고 머신러닝 학습에 사용할 합성 데이터 만들기

심상진, 칼리드 엘 에맘, 루시 모스케라, 리처드 홉트로프

Publisher Resources

ISBN: 9791162240748