Skip to playerSkip to main content
  • 1 year ago
Basic arithmetic in AI refers to fundamental mathematical operations like addition, subtraction, multiplication, and division used within AI algorithms and models. These operations are crucial for tasks such as data processing, model training, and predictions. While AI relies heavily on more complex mathematical concepts like linear algebra and calculus, basic arithmetic forms the foundation for many AI operations.

Category

📚
Learning
Transcript
00:00okay guys
00:04so last lecture
00:04we have some basic mathematical operations
00:07and we have told you
00:09that this part is
00:11this action defined
00:12and this part is
00:14this material
00:14okay
00:15now this is just print
00:18there are multiple types of existing
00:22predefined actions
00:23which we call
00:25python's terminology
00:26methods or function
00:29if you have a simple google
00:31and you can write
00:33python's documentation
00:34then you can see
00:35all the built-in functions
00:36basically
00:37if you have a built-in functions
00:38then you can see
00:39ABS absolute
00:41which is basically
00:42you can see
00:43positive value
00:44or absolute value
00:45return
00:45and this is all
00:47functions
00:47you can see
00:48all the functions
00:49by the way
00:50this is all
00:51you can use
00:51to not be
00:53in your career
00:54but it's a good thing
00:55that python's
00:56support
00:58documentation
00:59exists
00:59and you can see
01:00that in case
01:02if you have a problem
01:03you can see
01:06Python programming
01:07is the way to go
01:09okay
01:11so
01:12python function type, this is our lecture and our previous lecture
01:17has been linked, so we use type function.
01:20Now we have to print and something, I will comment out,
01:25let's say python 1 plus 2, here we go, python 1 plus 2, execute, result 3.
01:35Now if I perform this function, this is the result,
01:42we have three, three what is, three what is,
01:45one number is, one integer.
01:48If I type function call here,
01:54what do I say,
01:57the result is three,
02:00procedure, which is the result is solved,
02:06then the result is three,
02:08three which is the type,
02:10then I will print it,
02:13I will run it,
02:14I will show it,
02:18that this is a integer,
02:20if I do point 0,
02:23then I will run it,
02:25this is a float,
02:27that now I will tell you data type,
02:30basically, type function,
02:31which I will tell you data type,
02:33this is the integer and this is the float,
02:35now I will tell you that,
02:37I will tell you that,
02:391 divided by 2,
02:41and I will tell you,
02:43that result is run,
02:45which I will tell you,
02:46you can tell your float,
02:47I will tell you,
02:50that result is 0.5,
02:52and then I will tell you,
02:545 और फिर आपको फ्लोट चोड़ अब थोड़ा समय इसको explain कर देता हूं ज़रा यह हो क्या रहा है background के अंदर यह देखिए मैं कहता हूं one plus two यह हमारे पास
03:04एक whole number आ रहा है ठीक है फिर उसके बाद floating value आ रही है ठीक है मैं इस तरह करता हूं कि ऊपर की type
03:10भी आपके सामने लिख देता हूं यह इस तरह करो कि one plus two की भी type मुझे बता दो please ठीक है run करते हैं पहले उसने कहा three उसकी type
03:19है integer फिर उसने का point five उसकी type है float अब basically जो whole number होता है जो integer होता है वो memory के अंदर या memory के अंदर जो space है वो
03:29कम लेता है however एक floating value के लिए जो python है basically वो क्या करता है कि point से पहले और point के बाद एक number इसको treat नहीं करता है वो इसको divide कर देता है
03:41यहां पे जहां पे point है ना यहां पे एक line डाल देता है कहता है zero को मैंने एक memory के address पे save करना है और जो five है उसको memory के एक address पे save करना है
03:52तो दो memory के address एक memory के address से ज्यादा होते हैं इसका मतलब यह है कि floating value जो है वो ज्यादा memory लेती है अच्छा इस चीज़ को aside पे छोड़के हम अपने topic की discussion को मजीद आगे बढ़ाते है
04:03तो built-in function की जैसा कि मैं बात करा था मिसाल के तोर पर यह देखिए मैं again कहता हूँ यार print करो मुझे क्या करके दो
04:09यार इस तरह करो मेरे पास एक number है ठीक है और let's call this round function है अब जर गोर करना है कि यह IDE इसको again blue कर देता है
04:19अगर मैं round के spelling गलत लिख दूँ round लिख दूँ तो वो इसको पहचान नहीं रहा है
04:23जिसको वो पहचानता है उसको color change कर देता है कि अच्छा है मेरे हिसाफ़ यह function है method है
04:28अब जर आपने गोर करना है कि यह point five है ना ठीक है अब अगर मैं इसको कहता हूं let's say round कर दो one point two को
04:37ऐसे करके run करते हैं तो अब देखिए उसने क्या किया कि इसको round कर दे जिरो कर दे जिरो कर दे अब अगर आप इसको कहते है let's say three point six
04:49iis ko round keo run kiya
04:51isne like 4 kere dhiya
04:52اور round ka joh pivot point ho 5 hai
04:54misal ke taur pe peo 4 lighe to ya
04:56isko 3 kar dhe ga
04:58ager bag 6 lighe to ya isko 4 kere gha
05:01thik ha
05:01og 5 keo peo pa brah ni sko ya 4 kar dhe gha
05:05as you can see
05:06öz 5 say egore nivo ga
05:08to this ko 3 kar dhe gha
05:10achiva abhi nume ek or function
05:12sikha liya ki round function kiya hai
05:14type kiya apne dhekhi ki type hume basically data ki type
05:16nota ra ha hai
05:17abzi enough nau go carna ha
05:18کہ اگر میں کہتا ہوں
05:19نہیں یار
05:20آپ نے اگر غور کیا ہو
05:21پہلا پہلا مارے پاس
05:22abs function ہے
05:23abs
05:24تو میں absolute
05:25ڈال رہا ہوں
05:26مثال کے طور پر
05:27میں کہتا ہوں
05:27یار یہ جو 3.5 ہے نا
05:28یہ میرے پاس minus value ہے
05:29اس کو مجھے
05:30absolute value چاہیے
05:31abs value چاہیے
05:33اب run کرتا ہوں
05:34تو یہ minus نہیں
05:35آپ کو show ہوگا
05:36کیونکہ آپ کو
05:37absolute value دے رہا ہے
05:38کبھی کبھی
05:38data science کے اندر
05:39بلکہ ایک سروقات
05:40آپ کو ہمیشہ
05:41absolute value
05:42use کرنے پڑتی ہے
05:43negative values
05:43آپ کو نہیں
05:44use کرنے پڑتی ہے
05:45مثال کے طور پر
05:46آپ کے پاس
05:46time کی value
05:47negative آ رہی ہے
05:47تو
05:48normally
05:49time negative میں
05:50نہیں ہوتا
05:51time ہمیشہ
05:51positive میں ہوتا ہے
05:52تو آپ کو پھر
05:53absolute function
05:54call کر کے
05:54ان سب کو
05:55positive کرنا پڑتا ہے
05:56کیونکہ آپ کو
05:56پتہ چل دیتا ہے
05:57یہ realistic value
05:58نہیں ہے
05:58ٹھیک ہوگی بات

Recommended