What Is the Average Number of Times Americans Read Through the Entire Bible
Enroll Here: Data Analysis with Python
Module i – Introduction
Question 1: What does CSV stand up for ?
- Comma Separated Values
- Car Sold values
- Car State values
- None of the in a higher place
Question 2: In the data set what represents an attribute or feature?
- Row
- Column
- Each element in the data set
Question 3: What is some other name for the variable that nosotros want to predict?
- Target
- Characteristic
- Dataframe
Question iv: What is the command to display the get-go 5 rows of a dataframe df?
- df.caput()
- df.tail()
Question 5: what command do you use to go the data blazon of each row of the dataframe df?
- df.dtypes
- df.caput()
- df.tail()
Question 6: How do y'all become a statistical summary of a dataframe df?
- df.describe()
- df.head()
- df,tails()
Question vii: If y'all utilize the method describe() without changing whatever of the arguments y'all will get a statistical summary of all the columns of blazon object?
- False
- Truthful
Module ii – Data Wrangling
Question 1: Consider the dataframe "df" what is the result of the following functioning df['symbolling'] = df['symbolling'] + 1?:
- Every element in the column "symbolling" will increase past one
- Every element in the row "symbolling" will increment by one
- Every element in the dataframe volition increment by i
Question 2: Consider the dataframe "df", what does the command df.rename(columns={'a':'b'}) change most the dataframe "df"
- rename column "a" of the dataframe to "b"
- rename the row "a" to "b"
- cypher equally you must set the parameter "inplace =True "
Question 3: Consider the dataframe "df" , what is the issue of the following operation df['price'] = df['price'].astype(int) ?
- convert or cast the row 'price' to an integer value
- convert or cast the column 'price' to an integer value
- convert or cast the unabridged dataframe to an integer value
Question four: Consider the column of the dataframe df['a']. The colunm has been standardized. What is the standard difference of the values, i.east the result of applying the following performance df['a'].std() :
- 1
- 0
- 3
Question v: Consider the column of the dataframe df['Fuel'], with two values 'gas' and' diesel'. What will be the proper noun of the new colunms pd.get_dummies(df['Fuel']) ?
- 1 and 0
- Just diesel
- Simply gas
- Gas and diesel fuel
Question 6: What are the values of the new columns from part v a)
- 1 and 0
- Just diesel
- Just gas
- Gas and diesel
Module 3 – Exploratory Data Assay
Question 1: Consider the dataframe "df". Which method provides the summary statistics?
- df.describe()
- df.head()
- df.tail()
- df.summary()
Question ii: Consider the following dataframe:
df_test = df['body-style', 'price']
The following operations is applied:
df_grp = df_test.groupby(['trunk-style'], as_index=False).hateful()
What are resulting values of df_grp['price']:
- The average price for each torso style
- The average toll
- The boilerplate trunk style
Question 3: Correlation implies causation :
- False
- True
Question 4: What is the minimum possible value of Pearson's Correlation :
- 1
- -100
- -one
Question five: What is the Pearson correlation betwixt variables X and Y, if X=Y:
- -1
- ane
- 0
- X
- Y
Module 4 – Model Development
Question ane: Permit X exist a dataframe with 100 rows and 5 columns, allow y be the target with 100 samples,assuming all the relevant libraries and data have been imported, the following line of code has been executed:
LR = LinearRegression()
LR.fit(10, y)
yhat = LR.predict(X)
How many samples does yhat contain :
- 5
- 500
- 100
- 0
Question 2: What value of R^two (coefficient of determination) indicates your model performs best ?
- -100
- -1
- 0
- 1
Question 3: What argument is truthful nigh Polynomial linear regression
- Polynomial linear regression is not linear in whatsoever fashion
- Although the predictor variables of Polynomial linear regression are not linear the human relationship between the parameters or coefficients is linear.
- Polynomial linear regression uses wavelets
Question iv: The larger the mean foursquare mistake, the better your model has performed
- Faux
- True
Question five: Assume all the libraries are imported, y is the target and X is the features or dependent variables, consider the following lines of code:
Input = [('scale', StandardScaler()), ('model', LinearRegression())]
pipe = Pipeline(Input)
pipe.fit(Ten,y)
ypipe = pipe.predict(Ten)
What have we just done in the to a higher place code?
- Polynomial transform, Standardize the data, so perform a prediction using a linear regression model
- Standardize the data, then perform prediction using a linear regression model
- Polynomial transform then Standardize the information
Module 5 – Model Evaluation:
Question ane: In the following plot, the vertical access shows the mean foursquare error andthe horizontal axis represents the social club of the polynomial. The scarlet line represents the preparation mistake the bluish line is the examination error. What is the all-time lodge of the polynomial given the possible choices in the horizontal centrality?
- ii
- eight
- 16
Question 2: What is the employ of the "train_test_split" function such that 40% of the data samples will be utilized for testing, the parameter "random_state" is set to cypher, and the input variables for the features and targets are_data, y_data respectively.
- train_test_split(x_data, y_data, test_size=0, random_state=0.4)
- train_test_split(x_data, y_data, test_size=0.4, random_state=0)
- train_test_split(x_data, y_data)
Question 3: What is the output of cross_val_score(lre, x_data, y_data, cv=ii)?
- The predicted values of the test data using cross validation.
- The average R^ii on the examination data for each of the two folds
- This function finds the free parameter alpha
Question 4: What is the code to create a ridge regression object "RR" with an blastoff term equal ten
- RR=LinearRegression(alpha=10)
- RR=Ridge(alpha=ten)
- RR=Ridge(alpha=one)
Question 5: What dictionary value would we use to perform a filigree search for the following values of alpha: 1,10, 100. No other parameter values should be tested
- alpha=[1,10,100]
- [{'alpha': [i,10,100]}]
- [{'alpha': [0.001,0.1,1, 10, 100, chiliad,10000,100000,100000],'normalize':[True,False]} ]
Data Analysis with Python Last Exam Answers
Question 1: Question one: What does the following command practise:
df.dropna(subset=["price"], axis=0)
- Drop the "not a number" from the column price
- Drop the row cost
- Rename the information frame price
Question 2: How would you lot provide many of the summery statistics for all the columns in the dataframe "df":
- df.depict(include = "all")
- df.head()
- blazon(df)
- df.shape
Question 3: How would you discover the shape of the dataframe df
- df.describe()
- df.caput()
- type(df)
- df.shape
Question four: What task does the following control to df.to_csv("A.csv") perform
- alter the name of the column to "A.csv"
- load the data from a csv file called "A" into a dataframe
- Salvage the dataframe df to a csv file called "A.csv"
Question 5: What chore does the following line of code perform:
df['superlative-rpm'].replace(np.nan, 5,inplace=True)
- supercede the not a number values with 5 in the column 'peak-rpm'
- rename the column 'superlative-rpm' to v
- add v to the data frame
Question 6: What task does the following line of code perform:
df['acme-rpm'].replace(np.nan, 5,inplace=Truthful)
- replace the not a number values with 5 in the column 'acme-rpm'
- rename the column 'meridian-rpm' to 5
- add 5 to the data frame
Question vii: How do you "i hot encode" the column 'fuel-blazon' in the dataframe df
- pd.get_dummies(df["fuel-type"])
- df.hateful(["fuel-type"])
- df[df["fuel-blazon"])==1 ]=1
Question 8: What does the vertical axis in a scatter plot represent
- independent variable
- dependent variable
Question 9: What does the horizontal centrality in a scatter plot represent
- contained variable
- dependent variable
Question ten: If we take 10 columns and 100 samples how large is the output of df.corr()
- ten x 100
- x x 10
- 100×100
- 100×100
Question eleven: what is the largest possible element resulting in the following operation "df.corr()"
- 100
- g
- i
Question 12: if the Pearson Correlation of two variables is zero:
- the two variable have zero mean
- the two variables are not correlated
Question thirteen: if the p value of the Pearson Correlation is 1:
- the variables are correlated
- the variables are not correlated
- none of the above
Question 14: What does the following line of code do: lm = LinearRegression()
- fit a regression object lm
- create a linear regression object
- predict a value
Question 15: If the predicted role is:
Yhat = a + b1 X1 + b2 X2 + b3 X3 + b4 X4
The method is
- Polynomial Regression
- Multiple Linear Regression
Question sixteen: What steps do the following lines of lawmaking perform:
Input=[('scale',StandardScaler()),('model',LinearRegression())]
pipe=Pipeline(Input)
piping.fit(Z,y)
ypipe=pipage.predict(Z)
- Standardize the data, then perform a polynomial transform on the features Z
- discover the correlation between Z and y
- Standardize the information, then perform a prediction using a linear regression model using the features Z and targets y
Question 17: What is the maximum value of R^two that tin can be obtained
- 10
- i
- 0
Question 18: We create a polynomial feature as follows "PolynomialFeatures(caste=ii)", what is the social club of the polynomial
- 0
- ane
- 2
Question xix: Yous have a linear model the average R^2 value on your grooming data is 0.v, y'all perform a 100th guild polynomial transform on your information then use these values to train another model, your average R^2 is 0.99 which comment is correct
- 100-thursday gild polynomial will work better on unseen data
- You should always use the simplest model
- the results on your training data is non the all-time indicator of how your model performs, you should use your test data to get a beter thought
Question xx:You train a ridge regression model, you get a R^two of one on your preparation data and you get a R^2 of 0 on your validation information, what should you practise:
- Nothing your model performs flawlessly on your test data
- your model is under fitting perform a polynomial transform
- your model is overfitting, increment the parameter alpha
Source: https://priyadogra.com/data-analysis-with-python-cognitive-class-answers/
0 Response to "What Is the Average Number of Times Americans Read Through the Entire Bible"
Publicar un comentario