Logistic Regression Part 2 | Perceptron Trick Code

CampusX
16 Jun 202117:07

Summary

TLDRIn this YouTube tutorial, the presenter delves into logistic regression, following up on a previous discussion about the perceptron algorithm. They demonstrate converting the algorithm into code, using a dataset to illustrate the classification process. The video includes detailed explanations of data plotting, algorithm logic, and the interpretation of weights and intercepts. The presenter also addresses the limitations of the perceptron trick and compares it with logistic regression, highlighting the latter's symmetrical approach to classification and its potential for better generalization.

Takeaways

  • 🧑‍🏫 The video is focused on teaching logistic regression and contrasts it with the Perceptron algorithm, which was covered in the previous video.
  • 💻 The speaker has already written a code to implement the algorithm, and it is centered around classifying a dataset using logistic regression.
  • 📊 A classification dataset was generated and visualized, with inputs consisting of two columns and outputs represented by two classes (0 and 1), color-coded as blue and green.
  • 🛠️ A core function, called `scan`, was created to process the data, returning weights and intercepts after running the algorithm.
  • 📝 The code involves adding a bias term to the input features, creating a weight matrix, and updating it iteratively using a loop for 1,000 iterations.
  • 🎯 Logistic regression is demonstrated by selecting random samples from the dataset, calculating product values, and updating the weights based on classification results.
  • 🔍 The video demonstrates how Perceptron updates weights based on misclassified points, while logistic regression continues improving the classification boundary until an optimal solution is found.
  • 🚩 The speaker highlights the limitations of the Perceptron algorithm, particularly its inability to find the best line if the data is linearly separable.
  • 🔄 An animation is shown in the video to demonstrate how the Perceptron algorithm adjusts the decision boundary as more misclassified points are identified.
  • 💡 Logistic regression, unlike Perceptron, seeks a decision boundary that is symmetrically placed between the two classes, resulting in better generalization and less overfitting.

Q & A

  • What is the main topic discussed in the video?

    -The video discusses logistic regression and how to implement the Perceptron algorithm in code, focusing on classifying data points.

  • What was covered in the previous video?

    -The previous video covered the Perceptron Trick, which is a method used in machine learning for classification.

  • What is the dataset used in this video?

    -The dataset is a two-dimensional classification dataset with input features represented by two columns and target values being either 1 or 0.

  • How are the data points visually represented in the plot?

    -The data points are represented by different colors: green for class 1 and blue for class 0.

  • What is the function created in the video used for?

    -The function, named `scan`, takes input data (X and Y) and returns the weights and intercepts needed for classification.

  • What does the algorithm do after generating weights?

    -The algorithm selects a random data point and performs classification, updating the weights if the data point is misclassified.

  • How is misclassification handled in the Perceptron Trick?

    -If a point is misclassified, the algorithm updates the weights to adjust the decision boundary until all points are correctly classified.

  • What is the key difference between Perceptron and Logistic Regression discussed?

    -Perceptron stops updating the decision boundary once all points are correctly classified, while Logistic Regression continues optimizing to find the best model by minimizing error, leading to a more symmetric and generalized boundary.

  • What is the issue with the Perceptron Trick as discussed in the video?

    -The Perceptron Trick might not find the best decision boundary because it only focuses on correctly classifying points, ignoring further optimization that could improve the model's generalization.

  • How does Logistic Regression improve over the Perceptron Trick?

    -Logistic Regression continues to optimize the decision boundary even after points are classified correctly, ensuring better generalization and performance on new data.

Outlines

00:00

📘 Introduction to Logistic Regression

The speaker begins by welcoming viewers to their YouTube channel and introduces the topic of logistic regression, following up from a previous video on perceptron tracking. They mention planning to convert the algorithm into a code in the current video. The speaker has pre-written code to save time and explains the concept of data generation, comparing it to classification in cycles, similar to how gears function in a cycle. They created a dataset called 'solar', plotted it, and explained the two-dimensional dataset with inputs and a virus target, clarifying it's a classification problem. The explanation includes how the data is represented and the function used to calculate the weight and intercept.

05:03

🔍 Deep Dive into Algorithm Implementation

The speaker delves into the implementation of the algorithm, starting with a data set and explaining how it's processed through the algorithm. They discuss the course of action after running the course, using terms like 'first installment' and 'second call' to describe steps in the process. The explanation includes creating an edit with a specific shape, selecting random values, and storing numbers. The speaker also talks about picking students for a medical placement, using terms like 'white heads' and 'MP dot product' to describe calculations and decisions made within the algorithm. The paragraph concludes with a discussion on how the algorithm determines the placement of students based on certain conditions.

10:05

📊 Analyzing Performance and Adjustments

The speaker analyzes the performance of the algorithm, discussing the concept of a single tension and how it relates to the data. They mention extracting functions and using operations to determine placement. The paragraph includes a detailed explanation of the logic used to decide whether a placement will occur based on certain conditions. The speaker also talks about updating rates and learning from actual data, comparing the results of the algorithm to actual hospital placement data. They conclude by discussing the logic and process of refining the algorithm based on the results and the importance of understanding the animation of the process.

15:07

🌟 Conclusion and Future Recommendations

In the concluding paragraph, the speaker summarizes the key points discussed in the video, emphasizing the differences between perceptron trick and logistic regression. They highlight the importance of understanding the problems associated with the perceptron trick and how logistic regression can be a better model for certain types of data. The speaker encourages viewers to experiment with the concepts learned and to document their findings, promising to cover an extra approach to logistic regression in the next video. The paragraph ends with a thank you for watching and an encouragement to apply the knowledge gained.

Mindmap

Keywords

💡Logistic Regression

Logistic Regression is a statistical method for analyzing a dataset in which there are one or more independent variables that determine an outcome. In the context of the video, it is used to predict a binary outcome, such as whether an observation belongs to a certain class or not. The video discusses how to convert the logic of logistic regression into a code, demonstrating its application in a classification problem with a dataset.

💡Perceptron

The Perceptron is a type of linear classifier, a binary classifier typically used for two-class prediction. It is a simple neural network that is usually a single layer. The video script mentions reading about the Perceptron in the last video and converting it into an algorithm, indicating its use in machine learning for classification tasks.

💡Algorithm

An algorithm is a set of rules or steps used to solve a problem or perform a computation. The video script refers to converting the Perceptron track into an algorithm, which means creating a step-by-step procedure that a computer can follow to perform a task, in this case, classification of data.

💡Classification

Classification is the process of predicting the category or class of an entity based on its features. The video focuses on classification problems where the goal is to classify data points into two categories, such as spam and non-spam, or in the script's context, using a dataset with two-dimensional data points.

💡Dataset

A dataset is a collection of data. In the video, the script mentions generating a dataset using a function, which is a common practice in machine learning to create a structured collection of data that can be used to train models. The dataset is used to train the classification model.

💡Features

Features are the variables or attributes that are used as input for a model. The script refers to 'x' and 'y' as features, which are the inputs to the model. Features are crucial in machine learning as they help the model learn to make predictions.

💡Weights

In machine learning, weights are the parameters of the model that are learned during training. The video script discusses creating an 'edit' with a shape equal to one column, which likely refers to adjusting the weights of the model. Weights are essential for making the model's predictions align with the actual outcomes.

💡Loss Function

A loss function is a measure of how well the model's predictions are matching the actual data. The script mentions a loss function, which is used to calculate the error of the model during training. The goal is to minimize this loss through the adjustment of weights.

💡Gradient Descent

Gradient Descent is an optimization algorithm used to minimize the loss function by iteratively moving in the direction of steepest descent as defined by the negative of the gradient. The video script refers to running a loop 'thousand times', which is indicative of the iterative nature of gradient descent used to update the weights of the model.

💡Binary Classification

Binary Classification is a type of classification problem where the outcome has only two possible classes. The video script discusses a classification problem with two classes, indicated by the use of a two-dimensional dataset where one axis represents the input features and the other represents the binary outcome.

💡Model

A model in machine learning is a mathematical representation of the data used for making predictions. The video script talks about creating a model using the data and plotting it, which involves using the dataset to train a machine learning algorithm to make predictions about new, unseen data.

Highlights

Introduction to the YouTube channel and the topic of logistic regression being studied.

Discussion about the previous video's focus on the Perceptron algorithm and plans to convert it into code in this video.

Explanation of how to generate data for classification, similar to how a perceptron track is used in a cycle.

Presentation of a two-dimensional dataset with 61 data points, where the input has two columns and the target is for classification.

Description of the data representation, with green inputs indicating one class and blue indicating another.

Introduction of a function that takes input data and returns the weight and intercept for classification.

Explanation of the logic behind the algorithm, starting with initializing the weight and intercept.

Discussion on how the algorithm adjusts the weight and intercept based on the data points, aiming to minimize misclassification.

Illustration of the algorithm's process with a visual representation of how it learns and updates over time.

Mention of creating an edit to adjust the shape of the decision boundary to better classify the data.

Explanation of the weight vector and its role in determining the classification of data points.

Discussion on the selection of random values to update the weight and intercept, and the impact on the decision boundary.

Introduction of a method to classify values and identify which students are selected for a particular program.

Explanation of the logic used to determine placement based on the product of weights and features.

Demonstration of extracting a function to return a value based on the input number, which is used for classification.

Discussion on the update of rates in the code to improve the model's learning and classification accuracy.

Conclusion on the logic of the algorithm, which stops processing once all points are classified correctly.

Final thoughts on the limitations of the Perceptron trick and its comparison with logistic regression for better classification.

Transcripts

play00:00

हेलो हाय गाइस वेलकम टू माय YouTube चैनल

play00:02

हम लोग लॉजिस्टिक रिग्रेशन पढ़ रहे हैं

play00:04

हमने लास्ट वीडियो में परसेप्ट्रॉन ट्रैक

play00:06

के बारे में पढ़ा हम इस वीडियो में क्या

play00:09

करने वाले हम उस पर एक को उस अल्गोरिदम को

play00:12

एक कॉर्ड में कंवर्ट करेंगे एनिमल्स पे कि

play00:15

कैसे काम करता हूं ठीक सो लेट्स स्टार्ट द

play00:18

वीडियो इस कॉर्ड मैंने पहले से लिख रखा है

play00:20

क्योंकि को थोड़ा बड़ा है और टाइप करने

play00:23

में टाइम चला जाएगा सो आईएस योर बॉथरूम तो

play00:26

सबसे पहले मैंने क्या किया मैंने एक डाटा

play00:29

से जनरेट किया है ठीक है सब जैसे मेक

play00:31

रिग्रेशन होता है साइकिल में वैसे ही मे

play00:35

क्लासिफिकेशन होता है इसको यूज करके आप

play00:37

क्लासिफिकेशन डाटा सेट्स बना सकते हो ठीक

play00:39

है सूर्य डेटासेट मैंने बनाया और मैंने

play00:42

इसको प्लॉट किया सोलर प्लांट करने के बाद

play00:46

दिस इज द डाटा सेट स्विच डाटा सेट में

play00:49

आपको दिखाई दे रहा होगा कि 61

play00:53

two-dimensional डेटासेट मतलब इनपुट में

play00:55

दे रहा टू कॉलम्स एक्सएक्सिस है और एक

play00:57

वायरस पर और जो टारगेट

play01:00

कि है वह 180 मतलब क्लासिफिकेशन प्रॉब्लम

play01:04

है और जितना भी वन है उसको मैंने ग्रीन से

play01:07

इनपुट किया है और जितना भी जीरो इसको

play01:09

मैंने ब्लूटूथ सेटिंग को किया है ठीक है

play01:11

तो यहां पर जो आउट प्रॉब्लम है वह कलर

play01:13

रिप्रेजेंट कर रहा है ठीक है ना मैंने

play01:16

यहां पर यह फंक्शन मनाया पर स्कैन बोलकर

play01:20

जिसको अगर आप डाटा पास करोगे अपना एक्स और

play01:23

वाई तो यह आपको पलट करके आपका वेट और आपका

play01:28

इंटरसेप्टर आपको रिटर्न करेगा ठीक है इसका

play01:30

लॉजिक एक डिस्कस कर लेते हैं तो मैंने

play01:33

सबसे पहले क्या किया मुझे जो एक महिला

play01:35

मैंने इस एक्स के आगे वन लगा दिया सो अगर

play01:39

मैं आपको भी दिखा हूं इस पॉइंट पर यह

play01:42

कोर्स चलाने के बाद कि आपका एक्स इस

play01:46

समथिंग लाइक दिस ए

play01:48

कि एक समथिंग लाइक दिस तो यह फर्स्ट

play01:51

इंस्टॉलमेंट यह सेकंड कॉलम है और यह जो

play01:54

पॉइंट है यह पॉइंट को लंबा है जिसमें 180

play01:57

की वैल्यू है ठीक है मैंने यह कोर्स चलाया

play02:00

सबसे पहले यह कोर्स चलाने से क्या हुआ कि

play02:04

उस मेरा एक था जो कि अभी ऐसा दिखाओ

play02:09

कि वह जैसा दिखने लग गया है

play02:13

कि हर रोज के आगे एक बार लगा दिया यह बायर

play02:16

सिस्टम के लिए हमने ऐसा किया ठीक है अगर

play02:18

आपने फैमिली से इसे देखा होगा तो आपको समझ

play02:20

में आ जाएगा अब आयल उड़ान नेक्स्ट हमने

play02:25

क्या किया हमने वेट बोल करके एक एडिट

play02:28

क्रिएट किया जिसका जो शेप है वह एक के

play02:33

कॉलम के बराबर है मतलब अब आपने अभी आपका

play02:38

एक्स का कॉलम कितना था तू जवान उदयभान

play02:42

जैसी वन शर्ट किया एक और एक्स्ट्रा ऑइल ऐड

play02:44

हो गया तो वे इसका शेप लिप्त हो गया फ्री

play02:47

तो अगर आप इस लाइन पर delete करके मैं

play02:50

आपको दिखा हूं तो एक मुल्क लाइक दिस यहां

play02:54

पर एक्स्ट्रा क्षेत्र के बदले अगर मत डाल

play02:57

दो तो मैंने बेसिकली एक वेट सेलिब्रेट

play03:01

किया जिसमें तीनों आइटम्स शुरू में बने

play03:04

ठीक है तो सबसे पहला जो आइटम यह इंटरसेप्ट

play03:06

क्वालिटी में एग्जाम w9 है यह w1 है और यह

play03:10

w2 है ठीक है फिर मैंने व्याख्या-1

play03:13

रेटिंग स्लाइस किया पॉइंट वंश ओके यहां तक

play03:16

कोई प्रॉब्लम नहीं है फिर मैंने लूप चलाया

play03:19

थाउजेंड टाइम्स हमारा फैब्रिक पर हर्बल

play03:23

उसके अंदर मैंने एक रेंडम वैल्यू सेलेक्ट

play03:26

किया जीरो से लेकर हंड्रेड के बीच में

play03:29

डाइनर वे मेरे एक शेप अगर आप देखो तो

play03:34

डिटेल्स फंड कमर 2000 12 प्रॉब्लम्स इस

play03:39

मैंने वही किया मैंने हर्बल उसके अंदर एक

play03:43

रेंडम इंटीरियर सेलेक्ट किया बिटवीन 1000

play03:48

लाइक्स थिस

play03:50

है और भी नंबर आ रहा है उसको मैं धीमे

play03:53

स्टोर कर रहा हूं ठीक है फिर मैंने क्या

play03:56

किया इस बेसिकली कि हमने मतलब कि जाएगा

play04:00

वैल्यू क्लासिफिकेशन कर रहे अवैध यू के

play04:02

सिन्हा कर रहे हैं कि हम उन्हें ज़ में

play04:06

कौन से स्टूडेंट को पिक कर रहे हैं अगर

play04:08

431 आया तो फिफ्टी फर्स्ट स्टूडेंट को पिक

play04:11

कर रहे चिकित्सक उसके बाद मैंने क्या किया

play04:13

मैंने वाइट हेड्स प्रेरित किया मतलब उस

play04:16

पर्टिकुलर स्टूडेंट का फॉर टीचर्स

play04:19

स्टूडेंट्स का प्लेसमेंट होगा या नहीं

play04:21

होगा का यह मुझे क्रेडिट करना था

play04:23

चिकित्सकों ने कैसे किया यह काम मैंने

play04:25

निकाला एमपी डॉट प्रोडक्ट ऑफ दिस सो अगर

play04:28

मैं आपको यह करके दिखाओ तो यह कुछ ऐसा

play04:30

दिखाई देगा सबसे पहले एक्स में मैंने 34

play04:33

पॉइंट एलिमेंट को निकाला और रेड्डी मिला

play04:37

है वह है 151 ठीक है और यहां पर x41 में

play04:45

अच्छी तो इस पॉइंट पर सिर्फ दो ही आइटम्स

play04:48

मतलब अ

play04:50

मैं सिर्फ दो ही आइटम सेक्टर-41 में इसमें

play04:55

आगे व नगर में लगाना होगा तो हमें यह नोट

play04:57

देखना पड़ेगा अलग से एमपी रोड इन सर

play05:02

एक्सपोर्ट तो 15909 मक्सिको स्वप्न है

play05:10

में आ एक्सर्साइज नहीं कि सिंगल टेंशन है

play05:15

या सुबह पिछली रात दम x41 अगर मैं यह चीज

play05:19

वालों को

play05:21

टॉप किया और है डोंट हो रहे हैं और यह

play05:24

मुझे आंसर मिल रहा है पॉइंट टू 9 सुनो

play05:26

मेरा पति फिर स्टूडेंट है उसके लिए जब मैं

play05:29

ऐड कर रहा हूं तो यह दो प्रोडक्ट पॉजिटिव

play05:32

आ रहे हैं ठीक है अब मुझे पता करना इसका

play05:35

प्लेसमेंट होगा कि नहीं होगा अब अगर लॉजिक

play05:37

पता होगा तो हमारा लॉजिक किया था अगर यह

play05:39

दो प्रोडक्ट काव्य उस ग्रेटर थन ही कोई टू

play05:42

जीरो तो प्लेसमेंट होगा और लें इसे मगर जो

play05:45

है तो प्लेसमेंट नहीं होगा तो मैंने

play05:47

एक्सट्रेक्ट फंक्शन मना लिया जब फंक्शन को

play05:49

आप एक नंबर देते हुए इनपुट में वह वन

play05:52

रिटर्न करता है अगर वह नंबर जीरो से

play05:54

ज्यादा है अदरवाइज जीरो रिटर्न करता है तो

play05:57

अगर मैं सेल को और चला लूं तो अगर मैं

play06:00

लिखूं टैप 0.2 9021 आ रहा हूं ठीक है और

play06:08

यह घर में - 20 है सुबह क्या कि देश में

play06:13

फॉर टीचर्स स्टूडेंट्स हफम ने उसका ऑपरेशन

play06:15

किया कि उसका प्लेसमेंट होगा या नहीं होगा

play06:18

ठीक है फिर हमने ग्रेट अपडेट

play06:21

अपने का कोड लिखा रेट्स अपडेट करने का कोड

play06:24

क्या था वेस्ट इज इक्वल टू मेक इट्स प्लस

play06:27

लर्निंग रेट टाइम्स वाइज हमने एक्चुअल

play06:30

डाटा में एपिसोड में फोर्टिस हॉस्पिटल का

play06:34

प्लेसमेंट हुआ या नहीं हुआ आखिरी नहीं हुआ

play06:36

तो यहां पर इस काम के बदले जीरो आ गया

play06:39

यहां पर वाइट के बदले वरना आ गया सूजी

play06:42

पूरा टर्म - हो गया और फिर आपने एक जैसे

play06:45

दोबारा मल्टीप्लाई करके सुब्स्क्रिब और यह

play06:47

मैं वहां पर लिखा था शैंपू से यहां पर लगा

play06:49

दिया और ऐसा हमने थाउजेंड टाइम्स किया और

play06:53

था उस टाइम करने के बाद मैंने बीड्स

play06:55

क्लासेज इन intersect वाला टाइम रिटर्न

play06:57

किया और आगे का सारा टर्म एंड कंडीशन

play06:59

रिटर्न की है एंड सॉ ए कोड बस यह लॉजिक है

play07:03

ठीक है इसको मैं 18 इसको बेटा अरोड़ा और

play07:07

यहां पर मैंने फंक्शन को कॉल किया एक्स और

play07:10

वाई पास किया उसने मुझे पलट के इन थेसे

play07:12

ट्वेल्व दिया और कोई फीस इंप्रेस लुधियाना

play07:14

और यह वह इंटरसेप्टर कॉपी शिमला उस यह

play07:18

मेरा डबल है यह मेरा डब्लू है

play07:21

है और यह मेरा डब्लू डॉट है ठीक है यह

play07:24

मेरा इंटरसेप्ट है ठीक है अब मैं रह गया

play07:26

मुझे प्लाट करके आपको दिखाना था तो मैंने

play07:30

इनसे MB निकाल लिया MB कैसे निकाला बहुत

play07:33

ही सिंपल एपलेट विशु है

play07:38

तो 100MB निकाला बहुत सिंपल है अगर आपके

play07:41

पास एक प्लस बी स्क्वायर प्लस सीट 120 का

play07:47

ए बी और सी वैल्यू है तो आप इस लाइन को

play07:50

वायर्स इक्वल टू एक्स प्लस बी के फॉर्म

play07:53

में बहुत इजीली ला सकते हो यहां पर एम

play07:55

काव्य होगा माइनर एबीसीडी

play08:01

है और सीता वाली होगा - सी वाइब P1

play08:06

में चिकन सूप मैंने क्या किया मैंने यही

play08:08

किया एवं निकालने के लिए एक है

play08:11

इंस्टिट्यूट ऑफ़ सेंट ओं

play08:14

है मतलब प्रोफिशिएंट के अंदर तेरा 210 तो

play08:19

एक है फर्स्ट वाला टर्म और B.Ed सेकंड

play08:22

वाला टाइम फॉर इंटर्नशिप के अंदर एक सिंगल

play08:24

टॉम है तो सी क्या है यह वाला टाइम और बीच

play08:27

है फिर से सेकंड वाला टाइम तो मैंने

play08:29

इग्नोर एक्चुअली यही काम यहां पर किया

play08:31

मैंने निकाल लिया और फर्स्ट क्लास जीरो

play08:33

डिवाइडेड बाय ऑफिशल्स का वध और बी के लिए

play08:36

मैंने सैम काम किया इंटरसेप्टेड बाय ऑफिशल

play08:38

पावर फॉर मोर भी मिलने के बाद मैंने उस

play08:42

लाइन को प्लॉट किया और यह तो गाइस यह वो

play08:45

लाइन से यह मेरा बेटा था और यह आपको लाइन

play08:48

जो हमने अभी बनाया यूजिंग परसेप्ट्रॉन

play08:52

ट्रैक ठीक है अब मैंने इक्वल काम किया

play08:54

मैंने एनिमेशन ड्रा किया इस प्रेम चीज का

play08:58

सुधरता एनिमेशन ठीक है एक बार स्टार्टिंग

play09:01

से देखते हैं देखो अभी पहला पॉइंट देखो कई

play09:04

बॉक्स में आपका लाइन लोग नहीं करेगा जो

play09:08

मूर्ख नहीं करेगा क्योंकि उसी कॉर्ड में

play09:10

जो पॉइंट्स कलेक्ट हुआ है वह पॉइंट अगर

play09:13

एलाइंस

play09:14

बोल रहा मुझे कोई प्रॉब्लम नहीं है तो

play09:16

लास्ट वाली लाइन भूख नहीं करेंगे कोई लाइव

play09:18

नहीं कर रही है बट यूज कोई ऐसा पॉइंट

play09:20

मिलेगा जो मिस क्लासिफाइड है वह उसको अपनी

play09:23

तरफ पुल आएगा और फिर लाइन मुक्त करेगी तो

play09:25

यहां पर मैंने वस्तु उन्हें रोक लिया है

play09:27

धुंधली 212 मेरा काम हो गया बट डिफरेंट

play09:30

सांप के डाटा के ऊपर डिपेंड करता है तो यह

play09:32

किसी कभी-कभी बीच में भूख नहीं कर रही है

play09:34

लाइन क्योंकि अभी जो भी पॉइंट से लेफ्ट हो

play09:36

रहे हैं वह सही से क्लासिफाइड है तो वह

play09:38

लाइन को रिमूव करने को नहीं बोल रहे हैं

play09:40

ठीक है बट कभी-कभी ऐसा पॉइंट मिल रहा है

play09:42

उसको ब्लॉक करने को बोल रहा है ठीक है तो

play09:44

डांटेगा सेंटा सेटिंग वॉइस आफ क्राइम लाइन

play09:47

से स्टार्ट कर रहे हो फिर आप रैंडमली

play09:49

पॉइंट सेलेक्ट करो अगर वह पॉइंट मिस

play09:51

क्लासिफाइड है तो हौसला इनको चेंज कर रही

play09:53

है अगर पॉइंट सही से फेस्टिवल है तो उस

play09:56

लाइन को चेंज नहीं कर रही है दैट इज भाई

play09:58

कुछ ही बॉक्स में अवश्य लाइन बिल्कुल वैसे

play10:00

का वैसा ही बैठा हुआ ठीक है थैंक यू कैन

play10:02

सी यह बहुत इंपोर्टेंट है यह जो एनिमेशन

play10:04

है यह नोट बुक आपके साथ शेयर कर दूंगा

play10:06

डिस्क्रप्शन में एक बार आप इस एनिमेशन को

play10:09

बैठकर के तसल्ली से थोड़ा देख लेना ठीक है

play10:11

तो आप का कांसेप्ट लास्ट वीडियो में जो

play10:13

आपने पढ़ा गोइंग

play10:14

ए क्लियर हो जाएगा ठीक है अब सब कुछ ठीक

play10:18

है मतलब सोचकर जो आपको जो लाइन मिल रहा है

play10:21

वह इसे कैसे फ्राई कर रहे हैं सोच करें जो

play10:24

आपका यह लाइन है यह सिर्फ और सिर्फ कर रहे

play10:27

हैं इसके सारे ग्रीन पॉइंट्स लाइन की तरफ

play10:29

है बहुत सारे पॉइंट्स लाइन की दूसरी तरफ

play10:32

है ऐड में यह तो कर रहा था हमें

play10:34

क्लासिफिकेशन ऐसी तो परफॉर्म करना था पर

play10:37

मैंने आपको बोला कि लॉजिस्टिक रिग्रेशन जो

play10:39

होता है वह थोड़ा अलग ढंग से काम करता है

play10:42

परसेप्ट्रॉन करें कि सिंपल तरीका है यह

play10:45

काम करने का बट आप चल सके टर्न ओन के अंदर

play10:48

जो इंप्लिमेंटेशन है वह थोड़ा सा और

play10:51

डिफरेंट है थोड़ा सा और एडवांस और थोड़ा

play10:53

सा और अच्छा है अच्छा है मतलब इस पोस्ट

play10:56

में कुछ प्रॉब्लम होनी चाहिए अब हम वही

play10:58

डिस्कस करेंगे कि परसेप्ट्रॉन ट्रिक ऑल दो

play11:01

काम करता है इसकी प्रॉब्लम क्या है ठीक है

play11:04

और फिर हम उसको सॉल्व करेंगे एक अच्छे

play11:06

तरीके से ठीक है सो मैं आपको दिखा देता

play11:08

हूं कि इसमें क्या गड़बड़ है तुम्हें क्या

play11:11

प्लान किया कि मैंने एक्चुअल

play11:14

कि साइकिल वाले क्लास टो इंप्लीमेंट किया

play11:17

एक ग्लास को बुलाया और अपना डाटा फिट कर

play11:21

आया और उससे जो मुझे MB मिला उसको मैंने

play11:25

प्लेट किया और उसको मेरे जैसी प्लॉट किया

play11:28

यह तो गाइस रेड वाला लाइन हमारा

play11:31

परसेप्ट्रॉन ट्रिक छाया और ब्लैक वाला

play11:34

लाइन लॉजिस्टिक रिग्रेशन जो ऑफिशियल साइट

play11:37

लंका लॉजिस्टिक रिग्रेशन है उससे आया

play11:39

दोनों लाइंस में डिफरेंस है इसका मतलब कुछ

play11:42

तो अलग कर रहे साइड वाला लाइन फट क्या वह

play11:46

हमसे अच्छा है इस पॉइंट को इंप्रूव नहीं

play11:48

कर सकते बट मैं एक चीज दिखा सकूं आपको

play11:50

जिससे आपको समझ में आ जाएगा कि साइटेड

play11:52

लैंड ओं वाली चीज हमारे परसेप्ट्रॉन ट्रिक

play11:54

से बैटर है कैसे लेकिन इस हुए हम मैं क्या

play11:57

करूं मैं डेट ऑफ बर्थ चेंज करो तो यहां पर

play12:00

अगर आप देखो तो एक पैरामीटर होता है क्लास

play12:02

ई कोल्ड 10th क्लास चैप्टर इक्वल टू टैंक

play12:04

दोनों क्लास के बीच में मार्जिन कितना

play12:06

होगा या आप अपने हिसाब से चेंज कर सकते हो

play12:09

तो अभी मैरिटाइम रखा है मैं इसको 21वें और

play12:13

देखना तो एंट्री कर दी क्या

play12:14

कि यह क्लास थोड़े और दूर चले गए सी

play12:19

डिफरेंस आ गया क्लासेस दूर हो गए चिक अब

play12:23

नीचे अपॉइंटमेंट और सारा प्रॉसेस रिपीट

play12:25

करता तो मैंने फिर से पर 57 वाला को ड्रम

play12:27

किया फिर से स्टेप फंक्शन रंग की आ फिर से

play12:30

अपने अल्गोरिदम को रन किया फिर से नया

play12:33

रिजल्ट आया फिर से मोरबी कैलकुलेट किया

play12:37

फिर से एक्शन फूड वाइट कैलकुलेट करके

play12:40

मैंने अपना ग्राफ प्लॉटर किया और यह तो

play12:42

गाइस जैसे माइनक्राफ्ट यहां पर आ रहा है

play12:46

ठीक है अब मैं थोड़ा नीचे जाता हूं और सेम

play12:50

काम रिपीट करूंगा मैं विथ लॉजिस्टिक

play12:53

रिग्रेशन नए डाटा सेट किए ऊपर और यह होगा

play12:59

इस दिस इज डिफरेंस दिस इज द डिफरेंस ऑफ

play13:03

कि हमारा परसेप्ट्रॉन रूल का लॉजिक गया था

play13:07

कि जैसे ही सारे पॉइंट्स सही से क्लासिफाई

play13:10

हो जाएंगे हमारा परसेप्ट्रॉन रोल वहीं पर

play13:13

रुक जाएगा अब एक और अपडेट जैसे ही उसने

play13:17

सारे लाइन सारे पॉइंट्स को सही से काफी

play13:18

ट्राय किया तो यहीं पर रुक गया बट

play13:21

लॉजिस्टिक रिग्रेशन वाला क्लास यहीं पर

play13:23

नहीं रुका उसने और इंप्रूव कि आपने आपको

play13:26

और वहां जाकर रूका जहां पर एक्ट्रेस को

play13:29

रोकना चाहिए था अगर आप डाटा को देखो और

play13:31

अगर आप से भी पूछे कि दो मॉडल्स राइट वाला

play13:34

मॉडल और ब्लैक वाला मॉडल कौन सा मॉडल बैटर

play13:37

है अगर आपसे क्वेश्चन पूछा तो आप खुद

play13:39

बोलोगे कि ब्लैक वाला मॉडल बैटर है

play13:41

क्योंकि यह लार द सिमिट्रिकली बेटा को

play13:45

काटना है मतलब दोनों साइड में इक्वल

play13:47

मार्जिन है तो जब नया टेस्ट डेटा आएगा तो

play13:50

उस पर इस ब्लैक लाइन का हेयर कम होगा

play13:53

ग्रीन वाला लाइन क्या है सॉरी फ्रेंड वाला

play13:56

लाइक क्या प्रॉब्लम है कि वह ग्रीन वाले

play13:58

पॉइंट के बहुत पास में अगर मैं आपको इस

play14:00

पॉइंट और अच्छे से देखा पाहवा विल डू इस

play14:03

है

play14:03

में का जश्न शुरू क्लासिफिकेशन को और

play14:07

बढ़ाते हैं फटी करते हैं Galaxy S8 दिखाई

play14:09

देता है पता नहीं और ज्यादा बढ़ गया है

play14:12

लपसी देखते हैं फिर से मैंने सब कुछ को

play14:15

रंग किया कुछ को फिर से बंद किया या

play14:20

स्टेट्स और अभी देखो यह ग्रीन के बस पास

play14:24

आकर रुक गया है और अब जानते हैं तो वर्ड्स

play14:28

लॉजिस्टिक रिग्रेशन

play14:30

[संगीत]

play14:32

ए टेंडेंसी इन दोनों मॉडल्स में बहुत

play14:36

ज्यादा डिफरेंस है तो लॉजिस्टिक रिग्रेशन

play14:38

वाला जो मॉडल है वह आपके डेटा को बहुत

play14:40

सिमिट्रिकली काट रहे हैं मतलब मतलब बराबर

play14:44

मार्जिन देर है दोनों साइड एक गैप है ठीक

play14:47

है वैसा आपका जो रेड वाला है वह बस मतलब

play14:50

काम चला रहे हैं मतलब जैसे इसका काम खत्म

play14:53

हो उसके बाद वह एक ट्राय होने लगा रहा है

play14:55

सोचने में की कहना इंप्रूव वॉल्यूम रुख

play14:58

नहीं कर रहे हैं क्योंकि हमारा लॉजिक बस

play14:59

इस चीज में बेस है कि आपको तभी तक काम

play15:02

करना है जब तक देर और मिक्स क्लासिफाइड

play15:04

पॉइंट्स जैसे ही बस क्लासिफाइड पॉइंट खत्म

play15:07

आपका एल्गोरिदम रुक जाएगा एंड वाइब्रेंट

play15:10

वाला एल्गोरिदम वहीं पर आकर रुक गया बट

play15:12

लॉजिस्टिक रिग्रेशन वाला एल्गोरिदम एक

play15:15

तमेश्वर कर रहा है कि आप बेस्ट मॉडल अचीव

play15:18

कर पाओ ठीक है तो इज द मेन प्रॉब्लम

play15:22

परसेप्ट्रॉन में प्रेसिडेंट टैक्स लगाने

play15:25

का मेन प्रॉब्लम यही है कि आपको बेस्ट

play15:27

लाइन नहीं मिलता है मैं इग्नोर करके आपको

play15:29

दिखा दे तो कि

play15:32

कि आपका लाइन मॉडल जो भी बोलो आप वह और

play15:36

अच्छा हो सकता है बट परसेप्ट्रॉन ट्रिक उस

play15:39

बात का खयाल नहीं रखेगा तो अगर आपके पास

play15:42

यह पॉइंट शहद और आपके पास यह पॉइंट है तो

play15:48

हो सकता है कि आपका परसेप्ट्रॉन ट्रिक ऐसे

play15:51

जा करके रुक जाए क्योंकि उसने जैसे ही

play15:53

अवॉइड किए सारे मिस क्लासिफाइड पॉइंट्स

play15:55

वहां पर जाकर रुक जाएगा व्हेयर आईएस

play15:57

लॉजिस्टिक रिग्रेशन बिल ट्राइड टो फाइंड

play15:59

इवन बेटर मॉडल इन थिस ब्वॉय आप लॉजिस्टिक

play16:03

रिग्रेशन वाली चीज को यूज करते हो पर

play16:06

शत्रुओं स्कूल नहीं है इसमें एक बहुत बड़ा

play16:08

मेजर स्लो है कि ट्रेनिंग डाटा पर भले ही

play16:10

आप अपना एड्रेस मिनीमाइज़ कर लोगे बट हो

play16:14

सकता है टेलर ज्यादा आ जाए मतलब

play16:17

जनरलाइजेशन एयर उतना अच्छा नहीं आए और

play16:21

आपका व फिटिंग का चांद हो जाता है विद थिस

play16:24

व्हाय यू डोंट यूज परसेप्ट्रॉन टेक यू

play16:26

बड़ा होने पर परसेप्ट्रॉन ट्रिक बिकॉज़

play16:28

अगर आपको परसेप्ट्रॉन ट्रिक समझ में आ गया

play16:31

और उसमें क्या

play16:32

प्रॉब्लम है समझ में आ गया तो फिर आप अ

play16:34

एक्चुली सोच सकते हो उस प्रॉब्लम को कैसे

play16:37

फोल्ड करना है और एक बार जब जैसे हम समझ

play16:39

जाएंगे इस प्रॉब्लम कैसे सॉल्व करना है तो

play16:41

हम समझ जाएंगे कि लॉजिस्टिक रिग्रेशन कैसे

play16:43

काम करता है ठीक है तो आज की वीडियो में

play16:45

इतना ही आई वह आप कोई पूरी चीज समझ में आए

play16:48

मैं आपको रेकमेंड करूंगा कि इस नोट बुक को

play16:51

उठाकर के थोड़े से एक्सपेरिमेंट करो कहीं

play16:55

पर डोकोमेंट करो कि मैंने यह सीखा और फिर

play16:58

हम लोग नेक्स्ट वीडियो स्टार्ट करते हैं

play17:00

लॉजिस्टिक रिग्रेशन का जो एक्स्ट्रा ऑइल

play17:02

अप्रोच है वह पढ़ना टैग्ड सोया डक्ट

play17:05

थैंक्स वाचिंग माय

Rate This

5.0 / 5 (0 votes)

¿Necesitas un resumen en inglés?