AI After mids chap 7 to 10
AI After mids chap 7 to 10
CHAPTER 7: Detecting
Patterns with
Unsupervised Learning
Topics:
1) What is unsupervised
learning?
Unsupervised learning ka matlab hai jab computer khud
patterns aur structures ko samjhe baghair data se seekhta hai.
Ismein, hum computer ko labeled examples nahi dete.
Computer ko bas data di jati hai aur wo usme se apne aap
patterns aur clusters dhoondhta hai. Is tarah se computer khud
se data mein similarities aur relationships ko explore karta hai.
Unsupervised learning techniques data exploration, clustering,
dimensionality reduction, anomaly detection, aur pattern
recognition mein istemal hote hain.
2) Clustering data with the K-
Means algorithm:
Chapter 7 END
Chapter 8: Building
Recommender Systems
Topics:
2) Building a K-Nearest
Neighbors classifier:
"Building a K-Nearest Neighbors classifier" ka matlab hota hai "K-
Nearest Neighbors classifier banane ka tareeka". Is topic mein hum
baat karenge K-Nearest Neighbors (KNN) classifier banane ke
process ke bare mein.
System:
Ab tak humne apne recommendation system ko banane ke liye
foundation rakha hai aur humne in topics ke baare mein seekha
hai:
Lets start:
Create a new Python file
Define a function to parse the input arguments. The input
argument is the name of the user.
Define a function to get the movie recommendations for a
given user. If the user doesn't exist in the dataset, the code
will raise an error.
Define the variables to track the scores.
Compute a similarity score between the input user and all the other
users in the dataset.
If the similarity score is less than 0, you can continue with the next
user in the dataset.
Extract a list of movies that have been rated by the current user but
haven't been rated by the user.
For each item in the filtered list, keep a track of the weighted rating
based on the similarity score. Also keep a track of the similarity
scores.
If there are no such movies, then we cannot recommend anything.
Normalize the scores based on the weighted scores.
Sort the scores and extract the movie recommendations.
Define the main function and parse the input arguments to extract
the name of the input user.
Load the movie ratings data from the file ratings.json.
Extract the movie recommendations and print the output.
So ye steps thy iske bad movie recommender
system tyar hu jay gaa
Chapter 8 END
Chapter 9: Logic
Programming
Topics:
1) What is logic
programming?
Logic programming logic programming ek programming paradigm hai
jo formal logic aur logical karane par mushtamil hota hai. Isme,
programs ko rules aur facts ka istemal karke banaya jata hai jisse rishte
aur sharton ko dikhaya jata hai. Logic programming ma set of logical
rules ko define karna hai aur phir program ko query karke solutions ya
naye information ko hasil karna hai.
Logic programming mein dhyan "kya" karana par hota hai, "kaise"
karana nahi. Programs ko logical aur rishton ke bunyad se dekha jata hai
aur logic programming language, execution aur inference process ka
dhyan rakhta hai.
2) Understanding the
building blocks of logic
programming:
Programming mein, object-oriented ya imperative paradigms mein, ek
variable ko hamesha define karna zaroori hota hai. logic programming
mein, cheezein thoda alag tareeke se kaam karti hain. Ek argument ko
ek function mein pass kiya ja sakta hai aur interpreter user ki madad se
define kiye gaye facts ko dekh kar ye variables ko instantiate karega. Ye
variable matching problem ko hal karne ka ek behtren tarika hai.
Variables ko alag-alag items ke saath match karne ka yeh process
unification kehlata hai. Yeh Logic programming mein ek alag tareeka
hai. logic programming mein, relations bhi define ki ja sakti hain.
Relations facts aur rules ke roop mein define kiye jate hain.
Facts sirf program aur data ke bare mein sahi baatein hoti hain. Unka
syntax seedha hota hai. For example, "Donald Allan ka beta hai" ek fact
hai, jabki "Allan ka beta kaun hai?" ek fact nahi hai. Har logical program
ko facts ki zaroorat hoti hai taaki uske bunyad par diye gaye swal ka
answer de sky
3) Solving problems
using logic
Programming:
Ye topic me coding ha ye 1
bar book se prh li jie gaa
laikin mujhe ye important
nahi lg rha phr bhi apne tor
pe 1 bar prh li jie gaa book
se.
Thanks
4) Validating
primes:
Primes ko Accept krna (Validating Primes). Is topic mein hum
dekhenge ki hum kis tarah logic programming ke saath "primes"
ko accept kar sakte hain aur unko verify kar sakte hain.
5) Parsing a family
tree:
Ye topic book pe bht easy English me diaa giaa ha or wahan se krna
ha inshallah easily smjh ajay gi because bht simple English ha book
me or iska page number ha=209page number
Ye page number book ka ha slide ka nahi ok.
Next topics 6)Analysing Geography .
7)building puzzle solver .
In donu topics ma coding ha sir ne sirf kaha tha ke jo code likha hua
ha osko run krna bs yehi kaha ke isko apny laptop me run krein
code ko dekh ke. Mazeed agr is topic ko dekhna ha to ap book ke
page no.214 pr dekh skty hain.
END
Chapter 10:Heuristic
Search Techniques
Topics:
1) Is heuristic search
artificial intelligence?
Han, heuristic search artificial intelligence ka hissa hai. Yeh technique
AI mein istemal hoti hai problem solving mein mufeed faislon par hal
talaash karne ke liye. Heuristic search, heuristics ka istemal karke search
space ko tezi se tafteesh karne mein madad karta hai.
2) What is heuristic
search?
Data ki talaash aur tarteeb ek ahem topic hai artificial intelligence mein.
Kai masail aise hote hain jin mein humein hal talaash karna hota hai. Ek
masle ke liye kai possible hal hote hain aur humein yeh nahi pata hota ke
kaun se sahi hain. Data ko behtrin tareeqe se tarteeb diye jaane se hum
tafteesh ko jald aur asar se kar sakte hain.
Aksar, ek masle ka hal talaash karne ke liye itne saare moujood tareeqe
hote hain ke ek behtareen hal talaash karne ke liye koi aik algorithm
tayyar nahi kiya ja sakta. Saath hi, har hal ko check karna bhi mumkin
nahi hai kyunki yeh bohat mehnga ho sakta hai. Aise halat mein hum ek
rule of thumb ka istemal karte hain jo humein options ko chunne mein
madad karta hai aur woh wazeh tor par galat hain unko khatam kar deta
hai. Is rule of thumb ko heuristic kehte hain. Heuristic search ko uss
tareeqe ko kehte hain jisme hum heuristics ka istemal karke talaash ko
guide karte hain.
3) Uninformed versus
informed search:
Agla topic hai "Uninformed versus informed search" jismein
bataya gaya hai ke kaise uninformed (bina jankari wale) talaash
aur informed (jankari wale) talaash ek dusre se alag hote hain.
Uninformed search, jaise ke breadth-first search aur depth-first
search, mein humein kisi bhi node ki jankari nahi hoti, bas hum
unhein explore karte jaate hain. Iske khilaaf, informed search,
jaise ke A* (A-star) search, humein node ke baare mein kuch
jankari hoti hai jo humein sahi raaste ki taraf le jaati hai.
4) Constraint
satisfaction problems
Tasawwur kijiye ke kuch aise masle hote hain jo sharton ke tahat hal
karna zaruri hota hai. Ye shartein asal mein aisi hain jo masle ko hal
karne ke doran toorna mumkin nahi. In masle ko hum Constraint
Satisfaction Problems (CSPs) kehte hain.
CSP aur Sudoku ke qawaid ka istemal karke hum jaldi se yeh tay kar
sakte hain ke puzzle ko hal karne ke liye konse numbers ko koshish
karenge aur konse numbers ko koshish nahi karenge. Upar di gayi
Sudoku board ki missal(ye picture page 223 pe h) se samjha sakte hain
ke humein kis square ke liye kis number ka istemal karna chahiye.
Agar hum CSP ka istemal na karte toh hume brute force approach ka
istemal karna padta, jahan hum sabhi squares mein number 1 se start
karke sabhi combinations ko try karte aur fir uska result check karte.
Lekin CSP ka istemal karke hum pehle se hi koshishon ko kam kar sakte
hain.
Maslay mein highlight kiye gaye square ke liye soch kar chalte hain.
Hum jante hain ke is square mein number 1, 6, 8 ya 9 istemal nahi kar
sakte kyunki woh numbers pehle se maujood hain. Hum jante hain ke
yeh number horizontal line mein 2 aur 7 pe bhi maujood nahi ho sakte
aur vertical line mein 3 aur 4 bhi maujood hain. Isse humare paas ek hi
possibility bachti hai ke is square ke liye number kya hona chahiye – 5.
CSPs bary masle hote hain jinhein kuch variables ke set ke roop mein
tay karna zaruri hota hai. Jab hum final hal tak pahunchte hain, tab
variables ko sabhi sharton ka palan karna hota hai. Ye takneek masle ke
entities ko variables par tay sharton ki ek collection ke roop mein hai. In
variables ko hal karne ke liye constraint satisfaction methods ka istemal
karna hota hai.
THE END