Phát triển mô hình Machine Learning cho môi trường sản xuất
Sinan Ozdemir
Data Scientist and Author
Nền tảng mã nguồn mở để theo dõi và quản lý thí nghiệm học máy. MLflow có thể:

# standard scikit-learn imports
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
# new imports from MLflow
import mlflow
import mlflow.sklearn
with mlflow.start_run(): # Start an MLflow run assuming we have data prepared
# Build and train model
rf = RandomForestClassifier()
rf.fit(X_train, y_train)
# Log parameters and model information
mlflow.log_param("n_estimators", rf.n_estimators)
mlflow.sklearn.log_model(rf, "model")
y_pred = rf.predict(X_test) # Evaluate model
accuracy = accuracy_score(y_test, y_pred)
mlflow.log_metric("accuracy", accuracy) # log the test accuracy metric


Phát triển mô hình Machine Learning cho môi trường sản xuất