CSE 140: Introduction to Intelligent Systems (Solution)

$ 25.00
Category:

Description

Assignment-1

Instructions • Keep collaborations at high level discussions. Copying/Plagiarism will be dealt with strictly.
• Late submission penalty: As per course policy.
• Your submission should be a single zip file 2022xxx HW1.zip (Where 2020xxx is your roll number). Include all the files (code and report with theory questions) arranged with proper names. A single .pdf report explaining your codes with results, relevant graphs, visualization and solution to theory questions should be there. The structure of submission should follow:
2022xxx HW1
|− code rollno.py/.ipynb
|− report rollno.pdf
|− (All other files for submission)
• Anything not in the report will not be graded.
• Your code should be neat and well commented.

1. (11 points) Section A (Theoretical)
(a) (4 marks) In logic, rules of inference are used to draw logical conclusions from premises. Provide at least eight rules of inference, including both predicate and propositional rules, along with a suitable example for each. Clearly explain how each rule works, and how it can be used to derive valid conclusions.
(b) (4 marks) In the field of Intelligent Systems, Machine Learning (ML) plays a vital role in automating decision-making and pattern recognition tasks. However, there are instances where the application of ML may not be suitable or ethical. For each of the following four scenarios, state whether ML should be applied or not with suitable justification:
(i) A credit card company wants to use ML to determine whether to approve or reject an applicant’s credit card application.
(ii) A hospital wants to use ML to predict patient outcomes and develop personalized treatment plans.
(iv) A law enforcement agency wants to use ML to identify potential suspects in a criminal investigation.
Provide a detailed explanation for your answer for each scenario, highlighting the potential benefits and risks associated with the use of ML.
(c) (3 marks) Explain the assessment that is used to test the intelligence of a machine. What are the observations found when this test was performed on ChatGPT? Comment on it.
2. (9 points) Section B (Code Implementation)
(a) (5 marks) Perform EDA on the Titanic Dataset
(i) Load the titanic dataset, print the shape and show the first ten rows and the last ten rows from the dataset.
(ii) Find if there exist any null values in the dataset.
(iii) Plot the countplot from the training dataset and comment on it.
(iv) Find inference on how many males and females survived using groupby() and count() methods on training dataset.
(v) Plot countplot for ‘Pclass’ feature showing count of Survived vs Dead on training data. Comment on it.
(vi) Find the oldest, youngest and the average of the person who survived.
(vii) Display a crosstab (available in pandas library) depicting males and females survived or died for each ‘Pclass’. Also explain your observations.
(viii) ‘SibSp’ feature indicates whether a person is alone or with his family. Siblings = {brother, sister} and Spouse = {husband, wife}. Plot the crosstab for SibSp showing how many persons survived or died. Also plot factorplot for SibSp vs Survived. Comment on your observations.
Note – Plots should have proper labels, titles and legends.
(b) (4 marks) Suppose you are building a music playlist app that allows users to create and save custom playlists. Each playlist can have multiple songs, and each song has a title and an artist. You want to write a Prolog program that can create a new playlist, add songs to an existing playlist, and display the contents of a playlist. Write a Prolog program that includes the following predicates:
(i) playlist(Name, Songs): This predicate creates a new playlist with the given Name and an empty list of Songs.
(ii) add song(Name, Title, Artist, UpdatedPlaylist): This predicate adds a new song with the given Title and Artist to the playlist with the given Name. The UpdatedPlaylist should be a new playlist with the added song.
Page 2
(iii) display playlist(Name): This predicate displays the Name of the playlist and the list of Songs in the playlist.
Your Prolog program should make use of the following built-in predicates: • cut: Use the cut predicate to prevent backtracking and ensure that only one solution is found for each predicate call.
• fail: Use the fail predicate to explicitly fail a predicate and force backtracking.
• list: Use the list data structure to store the songs in each playlist.
• append: Use the append predicate to concatenate lists when adding a new song to a playlist.
Page 3

Reviews

There are no reviews yet.

Be the first to review “CSE 140: Introduction to Intelligent Systems (Solution)”

Your email address will not be published. Required fields are marked *