Unit 4 Classification notes, polytechnic 5th sem cs notes

 

4.1 Basic Concepts (मूलभूत अवधारणाएँ)

English:

Classification is the process of predicting the category or class of an object based on its features or attributes. It is a supervised learning technique where the model learns from labeled data (data with known outcomes) to predict the class of new, unseen data.

  1. Class: The category or label assigned to the data (e.g., "spam" or "not spam").
  2. Instance: A single data point with a set of attributes (e.g., an email with features such as subject, sender, etc.).
  3. Feature: A characteristic or attribute of the data (e.g., the "subject" of an email).
  4. Training Set: A dataset used to train the classification model, which contains labeled instances.
  5. Test Set: A dataset used to evaluate the performance of the classification model.

Hindi:

वर्गीकरण एक प्रक्रिया है जिसमें किसी वस्तु की श्रेणी या वर्ग का अनुमान उसके गुणों या विशेषताओं के आधार पर लगाया जाता है। यह एक पर्यवेक्षित शिक्षा तकनीक है, जिसमें मॉडल लेबल वाले डेटा (जिसमें ज्ञात परिणाम होते हैं) से सीखता है और नए, अनदेखे डेटा का वर्ग अनुमानित करता है।

  1. वर्ग (Class): वह श्रेणी या लेबल जिसे डेटा को सौंपा जाता है (जैसे "स्पैम" या "नॉन-स्पैम")।
  2. उदाहरण (Instance): एक सिंगल डेटा बिंदु, जिसके पास कुछ विशेषताएँ होती हैं (जैसे, एक ईमेल जिसमें "विषय", "प्रेषक" आदि विशेषताएँ होती हैं)।
  3. विशेषता (Feature): डेटा की कोई विशेषता या गुण (जैसे, ईमेल का "विषय")।
  4. प्रशिक्षण सेट (Training Set): एक डेटासेट जिसका उपयोग वर्गीकरण मॉडल को प्रशिक्षित करने के लिए किया जाता है, जिसमें लेबल वाले उदाहरण होते हैं।
  5. परीक्षण सेट (Test Set): एक डेटासेट जिसका उपयोग वर्गीकरण मॉडल के प्रदर्शन का मूल्यांकन करने के लिए किया जाता है।

4.2 Decision Tree Induction (निर्णय वृक्ष उत्पत्ति)

English:

A Decision Tree is a tree-like structure used to make decisions based on the input features. The root node represents the entire dataset, and branches represent decisions based on certain features. Each leaf node represents a classification outcome.

  1. How It Works:

    • The tree is built by splitting the data at each node based on the best feature that separates the data.
    • This process is recursive and continues until the data is perfectly classified or a stopping criterion is met.
  2. Algorithms for Decision Tree:

    • ID3 (Iterative Dichotomiser 3): A popular algorithm that uses entropy to decide which feature to split on.
    • C4.5: An improvement over ID3, which handles continuous attributes and pruning of trees to avoid overfitting.
  3. Advantages:

    • Easy to understand and interpret.
    • No need for data normalization.
  4. Disadvantages:

    • Prone to overfitting, especially with complex datasets.

Hindi:

निर्णय वृक्ष एक वृक्ष जैसी संरचना है जिसका उपयोग इनपुट विशेषताओं के आधार पर निर्णय लेने के लिए किया जाता है। मूल नोड पूरे डेटासेट का प्रतिनिधित्व करता है, और शाखाएँ कुछ विशेषताओं के आधार पर निर्णयों का प्रतिनिधित्व करती हैं। प्रत्येक पत्ते का नोड एक वर्गीकरण परिणाम का प्रतिनिधित्व करता है।

  1. यह कैसे काम करता है:

    • प्रत्येक नोड पर डेटा को उस सर्वोत्तम विशेषता के आधार पर विभाजित किया जाता है जो डेटा को अलग करता है।
    • यह प्रक्रिया पुनरावृत्त होती है और तब तक जारी रहती है जब तक डेटा को पूरी तरह से वर्गीकृत नहीं किया जाता या कोई रोकने का मानदंड नहीं मिलता।
  2. निर्णय वृक्ष के लिए एल्गोरिदम:

    • ID3 (इटरैटिव डाइकोटॉमाइज़र 3): एक लोकप्रिय एल्गोरिदम जो यह तय करने के लिए एंट्रॉपी का उपयोग करता है कि किस विशेषता पर विभाजन करना है।
    • C4.5: ID3 का एक सुधार, जो निरंतर विशेषताओं और वृक्षों की छंटाई को संभालता है ताकि ओवरफिटिंग से बचा जा सके।
  3. लाभ:

    • समझने और व्याख्या करने में आसान।
    • डेटा सामान्यीकरण की आवश्यकता नहीं होती।
  4. नुकसान:

    • ओवरफिटिंग की संभावना, विशेषकर जटिल डेटासेट्स के साथ।

4.3 Bayesian Classification Methods (बेयेसियन वर्गीकरण विधियाँ)

English:

Bayesian Classification uses probability theory to predict the class of a given data point. It assumes that the features of the data are independent, which is known as Naive Bayes classification.

  1. Naive Bayes:

    • Based on Bayes' Theorem: This theorem calculates the probability of a class given the data and updates the probability based on new data.
    • Assumes that features are conditionally independent, which simplifies the calculation.
    • Commonly used in text classification tasks like spam detection.
  2. Advantages:

    • Simple and fast.
    • Performs well with large datasets.
  3. Disadvantages:

    • Assumes independence of features, which may not always be true.

Hindi:

बेयेसियन वर्गीकरण डेटा के एक दिए गए बिंदु का वर्ग अनुमान करने के लिए संभावना सिद्धांत का उपयोग करता है। यह मानता है कि डेटा की विशेषताएँ स्वतंत्र होती हैं, जिसे नैव बेयेस वर्गीकरण कहा जाता है।

  1. नैव बेयेस:

    • बेयेस प्रमेय पर आधारित: यह प्रमेय डेटा को देखते हुए किसी वर्ग की संभावना की गणना करता है और नए डेटा के आधार पर संभावना को अपडेट करता है।
    • यह मानता है कि विशेषताएँ शर्तीय रूप से स्वतंत्र होती हैं, जो गणना को सरल बनाता है।
    • इसे आमतौर पर टेक्स्ट वर्गीकरण कार्यों में उपयोग किया जाता है जैसे कि स्पैम डिटेक्शन।
  2. लाभ:

    • सरल और तेज़।
    • बड़े डेटासेट्स के साथ अच्छा प्रदर्शन करता है।
  3. नुकसान:

    • यह मानता है कि विशेषताएँ स्वतंत्र होती हैं, जो हमेशा सही नहीं हो सकता।

4.4 Rule-Based Classification (नियम-आधारित वर्गीकरण)

English:

Rule-based classification involves using a set of "if-then" rules to classify data. Each rule maps an instance to a class based on certain conditions.

  1. How It Works:

    • Rules are generated by learning algorithms based on training data.
    • Example: If age > 40 and income > 50000, then class = "high income".
  2. Advantages:

    • Easy to understand and interpret.
    • Can handle complex relationships.
  3. Disadvantages:

    • Rules can become complex if the data is highly variable.

Hindi:

नियम-आधारित वर्गीकरण में डेटा को वर्गीकृत करने के लिए "यदि-तो" नियमों का एक सेट उपयोग किया जाता है। प्रत्येक नियम एक उदाहरण को एक वर्ग से जोड़ता है, जो कुछ शर्तों पर आधारित होता है।

  1. यह कैसे काम करता है:

    • प्रशिक्षण डेटा के आधार पर सीखने वाले एल्गोरिदम द्वारा नियम उत्पन्न किए जाते हैं।
    • उदाहरण: यदि आयु > 40 और आय > 50000, तो वर्ग = "उच्च आय"।
  2. लाभ:

    • समझने और व्याख्या करने में आसान।
    • जटिल रिश्तों को संभाल सकता है।
  3. नुकसान:

    • यदि डेटा बहुत बदलता है, तो नियम जटिल हो सकते हैं।

4.5 Model Evaluation and Selection (मॉडल मूल्यांकन और चयन)

English:

Once the classification model is built, it must be evaluated to ensure it performs well. The most common evaluation metrics are:

  1. Accuracy: The proportion of correctly classified instances.

    • Formula: Accuracy = (Correctly classified instances) / (Total instances)
  2. Precision and Recall: Precision is the ratio of correctly predicted positive instances to all predicted positive instances. Recall is the ratio of correctly predicted positive instances to all actual positive instances.

  3. F1 Score: The harmonic mean of precision and recall.

  4. Cross-validation: Splitting the data into multiple subsets and training the model on different subsets to check its generalization capability.

Hindi:

एक बार जब वर्गीकरण मॉडल बनाया जाता है, तो इसे मूल्यांकित करना आवश्यक होता है ताकि यह सुनिश्चित किया जा सके कि यह अच्छा प्रदर्शन करता है। सबसे सामान्य मूल्यांकन मीट्रिक हैं:

  1. सटीकता (Accuracy): सही ढंग से वर्गीकृत उदाहरणों का अनुपात।

    • सूत्र: Accuracy = (सही ढंग से वर्गीकृत उदाहरण) / (कुल उदाहरण)
  2. सटीकता और पुनः प्राप्ति (Precision and Recall): सटीकता वह अनुपात है जो सही ढंग से भविष्यवाणी किए गए सकारात्मक उदाहरणों को सभी भविष्यवाणी किए गए सकारात्मक उदाहरणों से जोड़ता है। पुनः प्राप्ति वह अनुपात है जो सही ढंग से भविष्यवाणी किए गए सकारात्मक उदाहरणों को सभी वास्तविक सकारात्मक उदाहरणों से जोड़ता है।

  3. F1 स्कोर: सटीकता और पुनः प्राप्ति का हार्मोनिक माध्य।

  4. क्रॉस-मान्यता (Cross-validation): डेटा को कई उप-समूहों में विभाजित करना और विभिन्न उप-समूहों पर मॉडल को प्रशिक्षित करके इसकी सामान्यीकरण क्षमता की जांच करना।


4.6 Techniques to Improve Classification Accuracy (वर्गीकरण सटीकता में सुधार करने की विधियाँ)

4.6.1 Ensemble Methods (एन्सेम्बल विधियाँ)

English:

Ensemble methods combine multiple models to improve classification accuracy. The idea is that a group of models will perform better than any single model. Common techniques include:

  1. Bagging: Training multiple models on different subsets of the data and combining their predictions (e.g., Random Forest).
  2. Boosting: Sequentially training models where each new model tries to correct the mistakes of the previous model (e.g., AdaBoost).
  3. Voting: Combining the predictions of multiple models and choosing the class with the most votes.

Hindi:

एन्सेम्बल विधियाँ सटीकता को सुधारने के लिए कई मॉडलों को जोड़ती हैं। विचार यह है कि एक समूह के मॉडल किसी एक मॉडल से बेहतर प्रदर्शन करेंगे। सामान्य तकनीकें में शामिल हैं:

  1. बैगिंग (Bagging): डेटा के विभिन्न उप-समूहों पर कई मॉडलों को प्रशिक्षित करना और उनके भविष्यवाणियों को मिलाना (जैसे, रैंडम फॉरेस्ट)।
  2. बूस्टिंग (Boosting): अनुक्रमिक रूप से मॉडल प्रशिक्षित करना जहां प्रत्येक नया मॉडल पिछले मॉडल की गलतियों को सुधारने की कोशिश करता है (जैसे, एडा बूस्ट)।
  3. वोटिंग (Voting): कई मॉडलों की भविष्यवाणियों को मिलाना और सबसे अधिक वोट प्राप्त वर्ग का चयन करना।

4.6.2 Handling Different Kinds of Cases in Classification (विभिन्न प्रकार के मामलों को संभालना)

English:

Different types of cases in classification can include:

  1. Imbalanced Data: When some classes are underrepresented. Techniques like resampling or using weighted classifiers can help address this issue.
  2. Missing Data: Techniques like imputation (filling in missing values) can be used to handle missing data.
  3. Noisy Data: Data with errors or outliers. Techniques like noise filtering and data cleaning can help improve model accuracy.

Hindi:

वर्गीकरण में विभिन्न प्रकार के मामलों में शामिल हो सकते हैं:

  1. असंतुलित डेटा (Imbalanced Data): जब कुछ वर्गों का प्रतिनिधित्व कम होता है। पुनः नमूना लेने या वजन वाले वर्गीकरणकर्ताओं का उपयोग करने जैसी तकनीकें इस समस्या को हल करने में मदद कर सकती हैं।
  2. लापता डेटा (Missing Data): लापता मानों को भरने जैसी तकनीकों का उपयोग किया जा सकता है।
  3. शोर डेटा (Noisy Data): डेटा जिसमें गलतियाँ या बाहरी मान होते हैं। शोर फिल्टरिंग और डेटा सफाई जैसी तकनीकें मॉडल की सटीकता में सुधार कर सकती हैं।

4.6.3 Classification by Neural Networks (न्यूरल नेटवर्क द्वारा वर्गीकरण)

English:

Neural networks are used for classification tasks by simulating the way the human brain processes information. A neural network consists of layers of neurons, and each layer transforms the input data through activation functions.

Hindi:

न्यूरल नेटवर्क्स वर्गीकरण कार्यों के लिए उपयोग किए जाते हैं, जो मानव मस्तिष्क के जानकारी संसाधित करने के तरीके की नकल करते हैं। एक न्यूरल नेटवर्क में न्यूरॉन्स की परतें होती हैं, और प्रत्येक परत सक्रियण कार्यों के माध्यम से इनपुट डेटा को रूपांतरित करती है।


4.6.4 Support Vector Machines (सपोर्ट वेक्टर मशीन)

English:

Support Vector Machines (SVM) are powerful classifiers that find a hyperplane that best separates different classes of data. They are effective in high-dimensional spaces and are often used in image and text classification.

Hindi:

सपोर्ट वेक्टर मशीन (SVM) शक्तिशाली वर्गीकरणकर्ता होते हैं जो एक हाइपरप्लेन खोजते हैं जो डेटा के विभिन्न वर्गों को सबसे अच्छा अलग करता है। ये उच्च-आयामी स्थानों में प्रभावी होते हैं और अक्सर छवि और टेक्स्ट वर्गीकरण में उपयोग किए जाते हैं।


4.6.5 Pattern-Based Classification (पैटर्न-आधारित वर्गीकरण)

English:

Pattern-based classification involves identifying patterns in data and using them to assign data to the correct class. This method is often used when the relationships in the data are complex.

Hindi:

पैटर्न-आधारित वर्गीकरण में डेटा में पैटर्न्स की पहचान करना और उनका उपयोग करके डेटा को सही वर्ग में सौंपना शामिल होता है। जब डेटा में रिश्ते जटिल होते हैं तो इस विधि का उपयोग किया जाता है।


4.6.6 Lazy Learners (or Learning from Your Neighbors) (लेजी लर्नर्स (या आपके पड़ोसियों से सीखना))

English:

Lazy learners do not learn a model during the training phase. Instead, they store the training data and make predictions only when a new instance is given, using the data that is most similar to the new instance (e.g., K-Nearest Neighbors).

Hindi:

लेजी लर्नर्स प्रशिक्षण चरण के दौरान मॉडल नहीं सीखते। इसके बजाय, वे प्रशिक्षण डेटा को संग्रहित करते हैं और केवल तब भविष्यवाणियाँ करते हैं जब कोई नया उदाहरण दिया जाता है, और वे उस डेटा का उपयोग करते हैं जो नए उदाहरण से सबसे अधिक समान होता है (जैसे, K-Nearest Neighbors)।

Post a Comment

0 Comments