Skip to Content
잘되는 머신러닝 팀엔 이유가 있다
book

잘되는 머신러닝 팀엔 이유가 있다

by 데이비드 탄, 에이다 양, 데이비드 콜스, 라인 AI Lab
June 2025
Beginner to intermediate
484 pages
10h 52m
Korean
Hanbit Media, Inc.
Content preview from 잘되는 머신러닝 팀엔 이유가 있다
319
Chapter 8
리팩터링과 기술 부채 관리
코드 스멜
다음은 
ML
 코드베이스에서 자주 보게 되는 일반적인 코드 스멜 종류입니다.
1. 의도를 드러내지 않는 변수 이름
변수 이름이 불명확하면 퍼즐을 풀기 위해 정신적 노력을 낭비하게 됩니다. 
ML
 코드에서 흔히 문제를 일으키
는 것 중 하나는 데이터프레임입니다. 모든 데이터프레임의 이름이 
df
로 지정됩니다. 데이터프레임에 더 좋은 
이름을 찾기 위해서는 각 행에 무엇이 들어 있는지 생각해야 합니다. 예를 들어, 데이터프레임의 각 행이 ‘대
출’이라면, 데이터프레임은 ‘대출의 모음’입니다. 따라서 데이터프레임을 ‘대출들
loans
’이라고 부를 수 있습니다.
다음 두 가지 대조적인 예시를 통해 이름을 잘 지은 변수의 가치를 설명하겠습니다.
[나쁜 예시]
  
df
=
pd
.
read
_
csv
('
loans
.
csv
')
  _
df
=
df
.
groupby
(['
month
']).
sum
()
  __
df
=
filter
_
loans
(_
df
,
month
=
12
)
  #
12
의대출금액을계산해시다.
  
total
_
loan
_
amount
=__
df
...#잠깐,
df
,_
df
,__
df
중어을사용해할?
[좋은 예시]
  
loans
=
pd
.
read
_
csv
('
loans
.
csv
')
  
monthly
_
loans
=
loans ...
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

AI를 위한 필수 수학

AI를 위한 필수 수학

할라 넬슨
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에

Publisher Resources

ISBN: 9791169213875