الممنوعات

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Quiz 1 (Lec) 16/3/2023

[1] We can solve the overfitting problem using:

a) Dropout layers b) Data augmentation c) Regularization d) All the choices

[2] What's L2 norm of vector [ -1 , 1 , -1 , 1] LP =


P P P P
X1 + X 2 + X3 + ...

a) 1 b) 2 c) 3 d) 4

[3] The example of a house that may be predicted to sell for a specific dollar value is
T F
considered a classification problem. Regression
[4] Data engineers use the data mining field to extract useful and hidden information from
T F
raw data.
[5] Data availability, scalability, management, and data draft are some of the most
T F
important issues facing artificial intelligence in production.
[6] The problem, whether a person is suffering from a disease X (answer in Yes or No) can
T F
be termed as a regression problem. Binary classification

P a g e |1 Quiz AI
CNN & Association Rules
1- CNN
[1] What is the primary task that Convolutional Neural Networks (CNNs) are commonly used for?
b) Natural language
a) Speech recognition c) Image classification d) Regression analysis
processing
[2] How do CNNs differ from other neural networks?
a) CNNs only have a single layer of neurons
b) CNNs are not capable of handling large amounts of data
c) CNNs use convolutional layers for feature extraction
d) CNNs are only able to perform binary classification tasks
[3] What are the main advantages of CNNs?
a) They are very efficient at extracting features
b) They are very robust to overfitting
from images.
c) They are very easy to train. d) They are very accurate at classifying images.
[4] What are the two main types of layers in a CNN?
a) Convolutional layers and pooling layers b) Fully connected layers and convolutional layers
c) Pooling layers and dense layers d) Convolutional layers and dense layers
[5] Which of the following is an example of a real-world application of CNNs?
c) Object detection in d) Stock price
a) Text summarization b) Spam detection
images prediction
2- Association Rules
[1] Which of the following statements about association rules is true?
a) Association rules are used primarily in image recognition.
b) Association rules measure the accuracy of a classification model.
c) Association rules are a data mining technique used to discover patterns within large datasets.
d) Association rules are used exclusively for time series forecasting.
[2] What is the purpose of the Apriori algorithm in association rule mining?
a) To generate frequent itemsets by iteratively pruning infrequent ones.
b) To classify data instances into predefined categories
c) To perform feature selection for machine learning models.
d) To visualize association rules using graph networks
[3] Which measure indicates the strength of the association between items in an association rule?
a) Support b) Confidence c) Lift d) Accuracy
[4] In association rules, support measures:
a) The frequency of an itemset in the dataset. b) The reliability or strength of an association rule.
c) The significance of a feature in a classification model d) The number of clusters in a clustering algorithm
[5] What are the limitations of association rules?
a) Association rules require a deep understanding of neural networks.
b) Association rules are computationally complex for large datasets.
c) Association rules can only be applied to numerical data.
d) Association rules can identify causation between variables.
[7] Association rules are a data mining technique used to discover interesting relationships or
T F
patterns within large datasets.
[8] The support measure in association rules indicates the reliability or strength of an association T F
rule.
[9] The Apriori algorithm is commonly used to mine association rules and generates frequent
T F
itemsets by iteratively pruning infrequent ones.
[10] Association rules can only be applied in market basket analysis and are not relevant in other
T F
domains.

P a g e |2 CNN & Association Rules


MID TERM
[1] What is the probability that the word computing appears immediately after the word cloud in the text
above?
"Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud
storage) and computing power, without direct active management by the user. Large clouds often have
functions distributed over multiple locations, each location being a data center. Cloud computing relies on
sharing of resources to achieve coherence and typically using a "pay-as-you-go" model.
The goal of cloud computing is to allow users to take benefit from all of these technologies, without the need
for deep knowledge about or expertise with each one of them. The cloud aims to cut costs and helps the users
focus on their core business instead of being impeded by IT obstacles. The main enabling technology for
cloud computing is virtualization. Virtualization software separates a physical computing device into one or
more "virtual" devices, each of which can be easily used and managed to perform computing tasks. "
a) 4/6 b) 67% of the time

[2] What is the name of this operation

a) Augmented images b) Enlarge your dataset

[3] Using your experience in linear algebra, help the player to determine
the direction of the bullet to hit the target. This direction will equal
(8,2) – (6,4) = (6,2)

a) (10,10) b) (4,1.5) c) (16,24) d) (6,2)


[4] If you have a regression problem and want to adjust a learrunq rate value, what's the suitable value
should you select?
a) 0 b) 2 c) 1 d) 0.001
P P P
[5] What's L2 norm of vector [-1,1,-1,1] LP = X1 + X 2 + X3 + ...
P

a) 4 b) 2 c) 1 d) 0
[6] The study of computer algorithms that have the ability to automatically learn and improve from
experience without being explicitly programming.
a) Machine learning

[7] What this table means

a) One Hot Encoding b) Label Encoding c) Dummy Encoding d) Frequency Encoding

P a g e |3 Mid Term AI
[8] What this operation means?

a) Linear transformations of a house drawn

[9] What is the best rate?

a) Red b) Grean c) Cyan d) None of them

[10] How many iteration to arrive to final value

a) 4 b) 6 c) 9 d) 7
[11] Which of the following figures indicates overfitting problem

‫ذاكر الجزء ده‬


‫علشان مش‬
‫متأكدين السؤال‬
‫كان ايه بالظبط‬

a b c
b) Appropirate-fitting c) Over-fitting
a) Under-fitting

P a g e |4 Mid Term AI
‫ حاجه كده‬error ‫] ايه افضل اتجاه عشان نقلل ال‬12[

‫ذاكر الجزء ده‬


‫علشان مش‬
‫فاكرين السؤال‬
‫كان ايه بالظبط‬

a) b) c) d)
[13] The global maximum according to the following figure is a point number …………
1
2
3
4

a) 1 b) 2 c) 3 d) 4

[14] What is the probability of blue balls

a) 1/12 b) 5/12 c) 4/12 d) 2/12


[15] Calculate the gradient

a) 0.5 b) 1 c) 1.5 d) 2
[16] The global maximum according to the following figure is a point number …………
1
2
3
4

a) 1 b) 2 c) 3 d) 4

P a g e |5 Mid Term AI
[17] What be the output of the following python expression?
Round (4,576)
a) 4.5 b) 4.6 c) 4 d) 5
[18] Which of the following is a Python tuple?
a) {} b) (1,2,3) c) {1,2,3} d) [1,2,3]
[19] string = "abcd" print ‫منغي كلمة‬
‫ر‬ output ‫يف بايثون مينفعش يطلع‬
"a" in string print("a" in string) ‫الصح‬

a) true b) no output c) error


[20] What is the output of this code
X = "abcd"
for i in X:
print(i.upper())
a) A b) A c) a
B b B
d) Syntax error
C c C
D d D
[21] What is the output of this code
X = "abcd"
For i in X:
print(i.upper())
a) A b) A c) a
B b B
d) Syntax error
C c C
D d D

[22] test error Larger than training error

a) True b) False

[23] Multilabel classification is a type of supervised machine-learning algorithm


that be used to assign zero or more labels to each data sample.

a) True b) False

[24] The artificial intelligence robot sophia is an example of super intelligence


machine

a) True b) False

P a g e |6 Mid Term AI
[25] The problem of detecting stock_index_price from the
four input data features (year, month interest_rate,
unemployment_rate) is considered a single variable
linear regression problem.

c) True d) False

[26] A color feature With the values: “red”,”grean”,blue”, and “black”. Can be considered a
T F
numerical quantitative variable.
[27] Al is heavily dependent on ML. T F
[28] Ai is subfield of machine learning ‫العكس‬ T F
[29] A color feature with the values ( red green blue black ) can be considered a numerical
T F
quantitative variable
[30] Learning step decrease, even fixed learning rate T F
[31] ChatGPT is application of ai T F
[32] Extract useful and hidden information from raw data. T F
[33] Data engineers use the data mining field to extract useful and hidden information from raw
T F
data
[34] only type of activation function is a step function T F
[35] The problem of classifying the email as spam or not spam is considered a binary
T F
classification problem
[36] Data preparation (also referred to as “data processing”) is the process of transforming raw
data so that data scientists and analysts can run it through machine learning algorithms to T F
uncover insights or make predictions
[37] The completeness of data equality attributes can be measured by number of missing values
T F
in the recorded data
[38] In the real world data is noisy because it may contain errors or outliers T F
[39] Before applying the machine learning model to the preprocessed data we use feature scaling
T F
in order to make sure that all feature are on similar scale

By: Sama Wael


‫ نسألكم الدعاء‬. . ‫شكرا لبشمهندسه سما وائل عيل تجميعها ألغلب األسئلة‬

P a g e |7 Mid Term AI
Old Quizzes (Lec)
[6] The existence of a domain expert is very important in any artificial intelligence project
because he or she has professional experience in the application domain, for example, T F
medical expert
[7] A machine learning model uses instructions to train the model, estimate the fine-
T F
tuning parameters and answer a specific question. AI
[8] The problem, whether a person is suffering from a disease X (answer in Yes or No) can
T F
be termed as a clustering problem
[9] The example of a house that may be predicted to sell for a specific dollar value is
T F
considered a classification problem.
[10] In Deepfakes, a person in an existing image or video is replaced with someone else's
T F
likeness,
[11] Using your experience in linear algebra, help the player to
determine the direction of the bullet to hit the target. This direction
will equal

a) (10,10) b) (4,1.5) c) (16,24) d) (6,2)

[12] What's L1 norm of vector [-1 , 1 , -3 , 2] LP =


P P P P
X1 + X 2 + X3 + ...

a) 3 b) 7 c) -1 d) 3.87
[13] A human can do all things better than a computer because the computer would have
T F
difficulty in identifying the flower picture or matching it to another picture of a flower.
[14] Which of the following figures indicates that we face an overfitting problem

[15] Data availability, scalability, management, and data draft are some of the most
T F
important issues facing artificial intelligence in production.

[16] If you predict house price from a one-variable linear regression model, the number of
bedrooms is considered as an input feature. What's the model prediction if the model
parameters θ0= 100 and θ1 = 750, and the number of bedrooms = 2?
a) 1600 b) 850 c) 1500 d) 1750
For the following decision tree if the color: yellow,
shape = round and size: small, the output class
will be

a) Apple b) Lemon c) Banana d) Grapfruit

P a g e |8 Old Quiz AI
[17] If you know the equation for the perceptron line (2x1+ 3x2 - 27=0), and similarly the "score"
(2x1+ 3x2 - 27), what is the score of the student who got 5 on the test and 9 for grades

a) 7 b) 5 c) 10 d)

[18] The following structure represents the


decision tree classifier.

a) True b) False

[19] According to the following output


class distribution for the input
features. The feature root of the
decision tree.

a) Outlook b) Temperature c) Humidity d) Windy

[20] According to the binary classification


problem shown in the following figure, the
number of misclassified points

a) 8 b) 2 c) 4 d) 6

P a g e |9 Old Quiz AI
[21] The mean absolute error is considered the best form of a cost function, and it is used
to minimize the error between the true and predicted value in a linear regression model T F

[22] In a gradient descent optimization algorithm, we can use a high learning rate such as
.5 or .7 to reach the minimum point quickly. T F

[23] The problem of classifying the email as spam or not spam is considered a mufti-
T F
classification problem,
[24] You can implement the OR gate using a single perceptron. T F

[25] A collection of data in Sklearn library is called ?

a) datasets b) None c) data collection d) dataload

[26] Which is the correct syntax for importing linear regression algorithm
a) from sklearn.linear_model import LinearRegression
b) from sklearn.feature_selection import SelectFromModel
c) None
d) from sklearn.ensemble import RandomForestClassifier
[27] For the following line code, what is the common value of the "n_jobs" argument means

a) Use a single core or the default configured by your backend library.


b) Use all available cores.
c) None
d) Use the specified number of cores, in this case 4
[28] _technique re-scales a feature or observation value with a distribution value between 0 and 1
g) Min-Max h) Minkowski
e) Euclidean Distance f) Standardization
Normalization Distance
[29] Is it possible in scikit-learn to split into three sets directly? T F
[30] ____ is a technique that is used to convert the raw data into a clean data set
d) Data
a) Standardize Data b) Rescale Data c) Binarize Data
Preprocessing
[31] Which of the following is preprocessing technique which is used when we need to convert
our numerical values into Boolean values?
a) Downsampling b) Binarizer c) standardScaler d) Thresholding

[32] Which of the following are Features of Scikit Learn?


a) It is used to extract the features from data to define the attributes in image and text data
b) It is open source library and also commercially usable under BSD license
c) It is used to identify useful attributes to create supervised models
d) All of the answers
[33] Any machine or deep learning model has infinity learning scope and this mean that
the model able to predict Ot classify output that has not learned in training phase. T F
[34] The problem of detecting stock_index_price from the four input data features (year, month
interest_rate, unemployment_rate) is considered a single variable linear regression problem.

P a g e |10 Old Quiz AI


a) True b) False
[35] The gradient according to the following figure equal …………..

a) 1 b) 2 c) 3 d) 4
[36] The global maximum according to the following figure is a point number …………

a) 1 b) 2 c) 3 d) 4

[37] Which of the following are Features of Scikit Learn?


a) It is used to extract the features from data to define the attributes in image and text data
b) It is open source library and also commercially usable under BSD license
c) It is used to identify useful attributes to create supervised models
d) All of the answers

P a g e |11 Old Quiz AI


Old Quizzes (Sec)
[1] What are the values of the following Python expressions?
2**(3**2)
(2**3)**2
2**3**2
a) 64,512,64 b) 512,512,512 c) 64,64,64 d) 512,64,512
[2] What will be the output of the following Python code snippet?
for 1 in [1, 2, 3 , 4] [ : :-1]
d) None of the
a) Error b) 4321 c) 1234
mentioned
[3] What is zero ( ) function in numpy use to?
a) make a matrix with b) make a matrix with c) make a matrix with
d) All of the above
diagonal elements 0 all elements 0 first column 0
[4] What will be the output of the following Python expression? Round (4.576)

a) 4.6 b) 4 c) 4 d) 5
[5] The following python program can work with _________ parameters.
def f (x):
def f1 (*args, **kwargs):
print ( "Sanfoundry" )
return x (*args, **kwargs)
return f1
a) 2 b) 0 c) 1 d) any number of
[6] What will be the output of the following Python code?
x — ‘abcd’
for i in x:
print(i upper( ) , end=' ')
a) ABCD b) Error c) abcd d) aBCD
[7] What will be the output of the following Python function?
Len(["hello", 2, 4, 6])
a) 3 b) 6 c) Error d) 4
[8] What will be output for the following code?
Import numpy as np
a = np.array ([[1,2,3],[0,1,4]])
Print (a, size)
a) 4 b) 1 c) 5 d) 6
[9] wthat will be the output of the following Python code?
i=1
while true;
if i%3==0;
break
print (i)
i+1=0
c) None of the
a) 123 b) 12 d) Error
mentioned

P a g e |12 Old Quiz AI


[10] What will be output for the following code?
Import numpy as np
ary = np.array ([1,2,3,5,8])
ary = ary + 1
print (ary [1] )
a) 2 b) 1 c) 0 d) 3

[11] What arithmetic operators cannot be used with strings in Python?

a) * b) + c) - d) All of the mentioned


[12] import numpy as np
x = np.array(list)
what is the output of x here?
a) conversion of array b) conversion of List c) conversion of list to
d) All of above
to list to array list
[13] Which of the following Python statements will result in the output: 6?
A = [ [1,2,3],
[4,5,6],
[7.8.9]]
a) A [1][2] b) A [2][1] c) A [3][2] d) A [2][3]
[14] What will be output for the following code?
import numpy as np
a = np.array ([1,2,3])
print (a)
a) Error b) [[1,2,3]] c) [1,2,3] d) [1]
[15] import numpy as ramadan
ramadan.array (list)
is it true to import numpy module like this?
a) True b) False

[16] full ( ) function requires 2 arguments minimum to pass it,

a) True b) False

[17] Which of the following is a Python tuple?

a) {} b) (1,2,3) c) {1,2,3} d) [1,2,3]

[18] which keyword is used for function in Python language?

a) function b) Define c) def d) Fun


[19] What will be printed?
import numpy as np
a = np,array ([1,2,3,5,8])
b = np,array ([0,3,4,2,1])
c=a+b
c=c*a
print (c[2])
a) 21 b) 7 c) 12 d) 10

P a g e |13 Old Quiz AI


[20] what will be the output of the following Python code?
i=1
while True:
if % 3 ==0;
break
print (i)
i+=1
d) None of the
a) Error b) 12 c) 123
mentioned
[21] for a dataframe df, to fill the empty cells in Age column only we use the command:
a) df.fillna(10,inplace=True) b) df[“Age”].filna(df[“Age”].mean(),inplace=True)
c) df.fillna(df[“Age”].mean(),inplace=True) d) none of the above
[22] if we want to retrieve only a subset of the dataframe having Age>20, we use the command:

a) df[“Age”>20] b) df[“Age”][“Age”>20] c) df[df“Age”>20] d) df[“Age”]>20

[23] What is a correct syntax to return the first row in a Pandas dataframe?

a) Df.iloc[0] b) df[0] c) df.get(0) d) df.iloc[1]

[24] to load a CSV file as dataframe we use the Pandas function

a) read_csv() b) Load_csv() c) Read_CSV() d) read_file()

[25] for the following dataframe.


What is the correct syntax to add new column
"City" to this df?

a) df.add(“City”)
b) df[“city”]=[“Mans”,”cairo”,”Alex”]
c) df[“city”]=[“Mans”,”cairo”,”Alex”,”Aswan”]
d) df.iloc[“city”]=[“ Mans”,”cairo”,”Alex”]
[26] For the following code:
What is the correct syntax to create a dataframe?

a) df=pd.dataframe(data)
b) df=pd.read(data)
c) df=pd.DataFrame(data,index=[1,2,3,4],columns==[“A”,”B”,”C”])
d) df=pd.DataFrame(data)
[27] For a dataframe df, what is the output of the following command df.head()
a) Returns information about the dataframe b) Returns total number of rows in the dataframe
c) Returns the first 5 rows of the dataframe d) Returns columns names in the dataframe
[28] for the following dataframe df:
What is the output of the following code?
New_df=df.drop(“city”,inplace=”False”) ≤1
a) Error
b) drop City column and save the result in both df and new_df
c) delete only the content of City column
d) drop City column and save the result in new_df
P a g e |14 Old Quiz AI
[29] What is a correct method to find relationships between column in a dataframe?

a) df.corr() b) df.describe() c) df.shape d) df.info()


[30] For a dataframe df, what is the output of the following code
a) Subset of the dataframe after deleting the rows containing Null values
b) The original dataframe with no change
c) Error
d) Subset of the dataframe after deleting the columns containing Null values
How to fix the following ERROR

a) " fit transform()" needs arguments (x,y) to work on it


b) change the object name found in line 9
c) Remove function which called " fit_transform()"
d) "fit transform()" needs arguments (x,z) to work on it
[31] The result if the following command is Sub with absolute
(3 – 2.5) , (-0.5 – 0) , (2 – 2) , (7 – 8)
0.5 , 0.5 , 0 , 1
‫نرتب من الصغير للكبير‬
0 , 0.5 , 0.5 , 1
0.5+0.5
average error = = 𝟎. 𝟓
2

a) 1 b) 0.5 c) 0 d) 5

️ ‫شكرا لكل اليل ساعدنا يف تجميع امتحان الميدتيرم وان شاء الله ناليق األسئلة كلها ف االمتحان‬

By: Mahmoud Maher


‫نسألكم الدعاء والتوفيق‬

P a g e |15 Old Quiz AI


‫المسائل اليل الدكتورة قالت جايه بالرقام‬

‫‪P a g e |16‬‬ ‫المسائل‬


‫‪P a g e |17‬‬ ‫المسائل‬
‫ايوة هي دي االجابه اليل تتبصم‬

‫‪P a g e |18‬‬ ‫المسائل‬


‫‪P a g e |19‬‬ ‫المسائل‬
‫‪By: Mohamed Salah‬‬
‫نسألكم الدعاء‬

‫‪P a g e |20‬‬ ‫المسائل‬

You might also like