एक-चर ड्रिफ्ट डिटेक्शन

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

Hakim Elakhrass

CEO and co-founder

एक-चर ड्रिफ्ट डिटेक्शन क्या है?

चित्र में मॉनिटरिंग वर्कफ़्लो और उसमें एक-चर विधि की स्थिति दिखती है.

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

एक-चर विधियाँ

  • Jensen-Shannen distance - श्रेणीबद्ध और सतत, दोनों
  • Hellinger - श्रेणीबद्ध और सतत, दोनों
  • Wasserstein - केवल सतत
  • Kolgomorov-Smirnov - केवल सतत

  • L-infinity - केवल श्रेणीबद्ध

  • Chi2 - केवल श्रेणीबद्ध

1 https://nannyml.readthedocs.io/en/stable/how_it_works/univariate_drift_comparison.html
Python में मशीन लर्निंग मॉनिटरिंग

कोड इम्प्लीमेंटेशन

# एक-चर ड्रिफ्ट कैलकुलेटर इनिशियलाइज़ करें
uv_calc = nannyml.UnivariateDriftCalculator(
    continuous_methods=['wasserstein', 'hellinger'],
    categorical_methods=['jensen_shannon', 'l_infinity', 'chi2'],
    column_names=feature_column_names,
    timestamp_column_name='timestamp',
    chunk_period='d'
    )
# फिट करें, कैलकुलेट करें और परिणाम प्लॉट करें
uv_calc.fit(reference)
uv_results = uv_calc.calculate(analysis)
uv_results.plot().show()
Python में मशीन लर्निंग मॉनिटरिंग

फ़िल्टरिंग

  • कॉलम नामों के आधार पर
  • एक-चर विधियों के आधार पर
# एक-चर परिणाम फ़िल्टर करें
filtered_figure = uv_results.filter(column_names=['trip_distance', 'fare_amount'], 
            methods=['jensen_shannon'])

# फ़िल्टर किए गए परिणाम प्लॉट करें
filtered_figure.show().plot()
Python में मशीन लर्निंग मॉनिटरिंग

अलर्ट काउंट रैंकर

  • अलर्ट की संख्या के आधार पर फीचर्स को रैंक करें
# अलर्ट काउंट रैंकर इनिशियलाइज़ करें
alert_count_ranker = nannyml.AlertCountRanker()
alert_count_ranked_results = alert_count_ranker.rank(
    uv_results,
    only_drifting=False)
# परिणाम दिखाएँ
display(alert_count_ranked_results)

चित्र में किसी फीचर के लिए अलर्ट की संख्या वाला डेटाफ़्रेम दिखता है.

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

कोरिलेशन रैंकर

  • परफॉर्मेंस में पूर्ण परिवर्तनों से सहसंबंध के आधार पर फीचर्स को रैंक करता है
# कोरिलेशन रैंकर इनिशियलाइज़ करें
correlation_ranker = nannyml.CorrelationRanker()
correlation_ranker.fit(perf_results.filter(period='reference'))
correlation_ranked_results = correlation_ranker.rank(uv_results, perf_results)

# परिणाम दिखाएँ
display(correlation_ranked_results)

चित्र में प्रत्येक फीचर के लिए पियर्सन कोरिलेशन और p-value वाला डेटाफ़्रेम दिखता है.

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

फीचर के डिस्ट्रीब्यूशन की मॉनिटरिंग

  • बेहतर इनसाइट्स देता है और explainability बढ़ाता है
# डिस्ट्रीब्यूशन प्लॉट बनाएँ
distribution_results = uv_results.plot(kind='distribution')

# प्लॉट दिखाएँ
distribution_results.show()
Python में मशीन लर्निंग मॉनिटरिंग

फीचर डिस्ट्रीब्यूशन प्लॉट

 

चित्र में सतत और श्रेणीबद्ध फीचर्स के डिस्ट्रीब्यूशन प्लॉट दिखते हैं.

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

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

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

Preparing Video For Download...