Skip to Content
DevOpsのためのPython
book

DevOpsのためのPython

by Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu
March 2025
Intermediate to advanced
506 pages
8h 3m
Japanese
O'Reilly Media, Inc.
Content preview from DevOpsのためのPython

第14章. MLOpsと機械学習エンジニアリング

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

2020年に最も注目される職種のひとつがマシンラーニング・エンジニアだ。他にも、データエンジニア、データサイエンティスト、マシンラーニングサイエンティストなどが注目されている。 DevOpsのスペシャリストになることもできるが、DevOpsは振る舞いであり、DevOpsの原則は機械学習を含むあらゆるソフトウェアプロジェクトに適用できる。DevOpsの中核となるベストプラクティスを見てみよう:継続的インテグレーション、継続的デリバリ、マイクロサービス、コードとしてのインフラ、モニタリングとロギング、コミュニケーションとコラボレーションだ。どれがマシン学習に当てはまらないだろうか?

ソフトウェアエンジニアリングのプロジェクトが複雑であればあるほど、そしてマシン学習が複雑であればあるほど、DevOpsの原則が必要になる。 機械学習の予測を行うAPI以上にマイクロサービスの良い例があるだろうか? この章では、DevOpsの考え方を使って、プロフェッショナルで再現性のある方法でマシンラーニングを行うための細部に飛び込んでいこう。

マシンラーニングとは何か?

機械学習とは、アルゴリズムを使ってデータから自動的に学習するメソッドである。 主に、教師あり、半教師あり、教師なし、強化の4種類がある。

教師あり機械学習

教師ありマシン学習では、正解はすでに知られており、ラベル付けされている。 例えば、体重から身長を予測したい場合、人々の身長と重みの例を集めることができる。 身長がターゲットで、重みが特徴となる。

教師あり機械学習の例がどのようなものか見てみよう:

摂取

In[0]:

import pandas as pd

In[7]:

df = pd.read_csv(
  "https://raw.githubusercontent.com/noahgift/\
  regression-concepts/master/\
  height-weight-25k.csv")
df.head()

Out[7]:

インデックス 高さ-インチ 重み-ポンド

0

1

65.78331

112.9925

1

2

71.51521

136.4873

2

3

69.39874

153.0269

3

4

68.21660

142.3354

4

5

67.78781

144.2971

電子データ処理

データを見て、何が探れるか見てみよう。

散布図

この例では、Pythonの有名なプロット・ライブラリであるseabornを使ってデータセットを可視化している。 もしインストールする必要があれば、いつでもノートブックの!pip install seaborn!pip install <name of package> Colabノートブックを使っている場合は、これらのライブラリがインストールされている。高さ/重みlmプロットのグラフを見よ(図14-1)。

In[0]:

import seaborn as sns
import numpy as np

In[9]:

sns.lmplot("Height-Inches", "Weight-Pounds", data=df)
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

FastAPIで生成型AIサービスを作る

FastAPIで生成型AIサービスを作る

Alireza Parandeh

Publisher Resources

ISBN: 9798341625402