गणना किए और अनुमानित परिणामों के साथ काम करना

Python में मशीन लर्निंग मॉनिटरिंग

Maciej Balawejder

Data Scientist

डेटा को चंक्स में कैसे बाँटें?

छवि में चंकिंग के तीन प्रकार दिखे हैं: type-आधारित, size-आधारित, और number-आधारित.

Python में मशीन लर्निंग मॉनिटरिंग

अलग-अलग चंक्स निर्दिष्ट करना

छवि में time-आधारित chunking aliases दिखे हैं जिन्हें chunk period पैरामीटर के आर्गुमेंट के रूप में पास किया जा सकता है.

# Initialize the algorithm
cbpe = nannyml.CBPE(
   problem_type='classification_binary',
   y_pred_proba='predicted_probability',
   y_pred='prediction',
   y_true='employed',
   metrics=['roc_auc'],
   chunk_period='m',
   # chunk_size = 5000, 
   # chunk_number = 10
)
Python में मशीन लर्निंग मॉनिटरिंग

कस्टम thresholds इनिशियलाइज़ करना

Standard deviation thresholds

  • lower और upper standard deviation multiplier मैन्युअली सेट करें
# Standard deviation thresholds
stdt = StandardDeviationThreshold(
    std_lower_multiplier=3, 
    std_upper_multiplier=3
    )

Constant thresholds

  • lower और upper threshold मान मैन्युअली सेट करें
# Constant thresholds
ct = ConstantThreshold(
    lower=0.85, 
    upper=0.95
    )
Python में मशीन लर्निंग मॉनिटरिंग

कस्टम thresholds निर्दिष्ट करना

# Import threshold methods(last slide)
from nannyml.thresholds import ConstantThreshold, StandardDeviationThreshold

# Passing thresholds to the CBPE algorithm
estimator = nannyml.CBPE(...
    metrics = ['roc_auc', 'accuracy'],
    thresholds={'roc_auc': ct, 'accuracy' : stdt}
)

छवि में ROC AUC और accuracy मेट्रिक के लिए कस्टम thresholds के साथ अनुमानित परफॉर्मेंस प्लॉट्स दिखे हैं.

Python में मशीन लर्निंग मॉनिटरिंग

परिणाम फ़िल्टर करना

  • period के आधार पर
    filtered_results = results.filter(period='analysis')
    
  • metrics के आधार पर

    filtered_results = results.filter(metrics=['mae'])
    
  • दोनों

    filtered_results = results.filter(period='analysis', metrics=['mae'])
    
Python में मशीन लर्निंग मॉनिटरिंग

परिणामों को dataframe में एक्सपोर्ट करें

# परिणामों को dataframe फ़ॉर्मेट में एक्सपोर्ट करें
results.filter(period='analysis').to_df()

छवि में dataframe फ़ॉर्मेट में परिणाम दिखे हैं.

Python में मशीन लर्निंग मॉनिटरिंग

अभ्यास करते हैं!

Python में मशीन लर्निंग मॉनिटरिंग

Preparing Video For Download...