Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Hoofdstuk 1Naam in de cursus: Machine learning basics

Learn the machine-learning words an engineer needs

An MLOps engineer does not need to invent models, but must understand what data scientists build: data, features, training, models, metrics. This chapter gives the words and the big picture.

  • 4 Lessen
  • 0 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

1.1

Know what a model is

A model is a function learned from examples. Training finds its parameters from data; inference (prediction) uses it on new data.

WordMeaning
DatasetThe examples (rows) used to learn
FeatureOne input column (age, price, number of logins)
LabelThe right answer the model should learn (fraud yes/no)
TrainingFitting the model on the training data
Validation / test setData kept apart to measure the model honestly
InferenceUsing the trained model on new data
Weights / artifactThe saved model file

1.2

Know the main kinds of ML

The kind of problem decides the model type and the metrics.

KindExampleMetric
ClassificationIs this login an attack?Accuracy, precision, recall, F1
RegressionHow many orders tomorrow?MAE, RMSE
ClusteringGroup similar servers by behaviourSilhouette
Anomaly detectionUnusual trafficPrecision at top-N
Large language modelsSummarise tickets, chatHuman rating, task success

1.3

Train a tiny model

With scikit-learn, training is a few lines — the hard parts are data and operations.

train.py
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
import joblib
 
X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
model = RandomForestClassifier(n_estimators=100, random_state=42).fit(X_train, y_train)
print("accuracy", accuracy_score(y_test, model.predict(X_test)))
joblib.dump(model, "model.joblib")

1.4

Understand why ML needs operations

Code alone does not define an ML system — data and model change too. That is why normal CI/CD is not enough.

  • The same code with new data gives a different model.
  • A model that was good can get worse when the world changes (drift).
  • Results must be reproducible: which data, code and settings made this model?
  • Models need special hardware (GPUs) and serving infrastructure.

Onthoud

MLOps = DevOps practices (versioning, CI/CD, monitoring, IaC) applied to data and models too.