What Is The Value Of An R G Potter Signed Photography

by -26 views



Enroll Here: Data Analysis with Python

Module 1 – Introduction

Question 1: What does CSV correspond ?


  • Comma Separated Values
  • Car Sold values
  • Auto State values
  • None of the above

Question ii: In the data set what represents an aspect or feature?

  • Row
  • Column
  • Each element in the data set

Question 3: What is another proper noun for the variable that nosotros desire to predict?

  • Target
  • Feature
  • Dataframe

Question 4: What is the command to brandish the first 5 rows of a dataframe df?

  • df.caput()
  • df.tail()

Question five: what command do you use to get the information type of each row of the dataframe df?

  • df.dtypes
  • df.head()
  • df.tail()

Question 6: How do you get a statistical summary of a dataframe df?

  • df.draw()
  • df.head()
  • df,tails()

Question vii: If you use the method draw() without changing any of the arguments you will go a statistical summary of all the columns of blazon object?

  • False
  • True

Module 2 – Information Wrangling

Question ane: Consider the dataframe “df” what is the consequence of the following operation df[‘symbolling’] = df[‘symbolling’] + 1?:

  • Every chemical element in the column “symbolling” will increase past one
  • Every element in the row “symbolling” will increase by one
  • Every element in the dataframe will increase by one

Question ii: Consider the dataframe “df”, what does the command df.rename(columns={‘a’:’b’}) change well-nigh the dataframe “df”

  • rename column “a” of the dataframe to “b”
  • rename the row “a” to “b”
  • nothing as you must set the parameter “inplace =Truthful “

Question 3: Consider the dataframe “df” , what is the result 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 ‘cost’ to an integer value
  • catechumen or bandage the entire dataframe to an integer value

Question 4: Consider the column of the dataframe df[‘a’]. The colunm has been standardized. What is the standard deviation of the values, i.e the event of applying the following operation df[‘a’].std() :

  • 1
  • 0
  • 3

Question 5: Consider the cavalcade of the dataframe df[‘Fuel’], with 2 values ‘gas’ and’ diesel’. What volition be the name of the new colunms pd.get_dummies(df[‘Fuel’]) ?

  • 1 and 0
  • Only diesel
  • But gas
  • Gas and diesel fuel

Question vi: What are the values of the new columns from part 5 a)

  • ane and 0
  • But diesel
  • Only gas
  • Gas and diesel

Module three – Exploratory Information Analysis

Question 1: Consider the dataframe “df”. Which method provides the summary statistics?

  • df.describe()
  • df.head()
  • df.tail()
  • df.summary()

Question 2: Consider the following dataframe:

df_test = df[‘body-style’, ‘toll’]

The following operations is applied:

df_grp = df_test.groupby([‘body-style’], as_index=Imitation).mean()

What are resulting values of df_grp[‘price’]:

  • The average price for each body way
  • The average price
  • The average body fashion

Question 3: Correlation implies causation :

  • False
  • True

Question four: What is the minimum possible value of Pearson’s Correlation :

  • 1
  • -100
  • -1

Question 5: What is the Pearson correlation between variables X and Y, if X=Y:

  • -1
  • 1
  • 0
  • X
  • Y

Module 4 – Model Development

Question 1: Let 10 exist a dataframe with 100 rows and 5 columns, allow y be the target with 100 samples,bold all the relevant libraries and data have been imported, the following line of code has been executed:

LR = LinearRegression()

LR.fit(X, y)

yhat = LR.predict(X)

How many samples does yhat incorporate :

  • 5
  • 500
  • 100
  • 0

Question 2: What value of R^two (coefficient of determination) indicates your model performs best ?

  • -100
  • -i
  • 0
  • ane

Question 3: What argument is truthful nearly Polynomial linear regression

  • Polynomial linear regression is not linear in any fashion
  • Although the predictor variables of Polynomial linear regression are not linear the relationship between the parameters or coefficients is linear.
  • Polynomial linear regression uses wavelets

Question four: The larger the mean square error, the improve your model has performed

  • False
  • True

Question 5: Assume all the libraries are imported, y is the target and X is the features or dependent variables, consider the following lines of lawmaking:

Input = [(‘scale’, StandardScaler()), (‘model’, LinearRegression())]

pipe = Pipeline(Input)

pipe.fit(10,y)

ypipe = piping.predict(X)

What have nosotros merely done in the above code?

  • Polynomial transform, Standardize the information, then perform a prediction using a linear regression model
  • Standardize the data, and so perform prediction using a linear regression model
  • Polynomial transform then Standardize the information

Module five – Model Evaluation:

Question 1: In the following plot, the vertical access shows the mean square error andthe horizontal axis represents the lodge of the polynomial. The scarlet line represents the training error the blue line is the test fault. What is the best order of the polynomial given the possible choices in the horizontal axis?

  • two
  • viii
  • 16

Question 2: What is the  use of the “train_test_split” role such that xl% of the data samples will be utilized for testing, the parameter “random_state” is set to zero, 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=2)?

  • The predicted values of the examination data using cross validation.
  • The average R^2 on the test 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 10

  • RR=LinearRegression(blastoff=10)
  • RR=Ridge(alpha=10)
  • RR=Ridge(alpha=i)

Question five: What dictionary value would we use to perform a grid search for the following values of blastoff: 1,10, 100. No other parameter values should be tested

  • blastoff=[1,10,100]
  • [{‘alpha’: [1,10,100]}]
  • [{‘alpha’: [0.001,0.i,one, x, 100, 1000,10000,100000,100000],’normalize’:[Truthful,Faux]} ]

Data Analysis with Python Final Exam Answers

Question 1: Question 1: What does the following command do:

df.dropna(subset=[“price”], centrality=0)

  • Drop the “not a number” from the column price
  • Drop the row price
  • Rename the data frame toll

Question 2: How would you provide many of the summery statistics for all the columns in the dataframe “df”:

  • df.depict(include = “all”)
  • df.head()
  • type(df)
  • df.shape

Question 3: How would you detect the shape of the dataframe df

  • df.describe()
  • df.caput()
  • blazon(df)
  • df.shape

Question four: What task does the following control to df.to_csv(“A.csv”) perform

  • change the name of the column to “A.csv”
  • load the data from a csv file chosen “A” into a dataframe
  • Save the dataframe df to a csv file called “A.csv”

Question five: What chore does the post-obit line of code perform:

df[‘peak-rpm’].replace(np.nan, 5,inplace=True)

  • supercede the not a number values with v in the column ‘elevation-rpm’
  • rename the column ‘top-rpm’ to 5
  • add 5 to the data frame

Question six: What chore does the following line of code perform:

df[‘height-rpm’].replace(np.nan, five,inplace=True)

  • replace the not a number values with 5 in the column ‘peak-rpm’
  • rename the column ‘summit-rpm’ to 5
  • add together 5 to the data frame

Question seven: How practise you “one hot encode” the cavalcade ‘fuel-blazon’ in the dataframe df

  • pd.get_dummies(df[“fuel-type”])
  • df.mean([“fuel-type”])
  • df[df[“fuel-blazon”])==1 ]=1

Question 8: What does the vertical axis in a scatter plot represent

  • contained variable
  • dependent variable

Question 9: What does the horizontal axis in a scatter plot represent

  • independent variable
  • dependent variable

Question 10: If nosotros have 10 columns and 100 samples how large is the output of df.corr()

  • 10 x 100
  • 10 x 10
  • 100×100
  • 100×100

Question 11: what is the largest possible element resulting in the following operation “df.corr()”

  • 100
  • thou
  • ane

Question 12: if the Pearson Correlation of 2 variables is cipher:

  • the two variable accept zero hateful
  • the 2 variables are not correlated

Question 13: if the p value of the Pearson Correlation is 1:

  • the variables are correlated
  • the variables are not correlated
  • none of the above

Question fourteen: What does the following line of lawmaking practice: lm = LinearRegression()

  • fit a regression object lm
  • create a linear regression object
  • predict a value

Question fifteen: If the predicted function is:

Yhat = a + b1 X1 + b2 X2 + b3 X3 + b4 X4

The method is

  • Polynomial Regression
  • Multiple Linear Regression

Question xvi: What steps do the post-obit lines of code perform:

Input=[(‘scale’,StandardScaler()),(‘model’,LinearRegression())]

pipe=Pipeline(Input)

pipe.fit(Z,y)

ypipe=pipe.predict(Z)

  • Standardize the data, then perform a polynomial transform on the features Z
  • find 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^2 that can be obtained

  • 10
  • ane
  • 0

Question eighteen: We create a polynomial feature as follows “PolynomialFeatures(degree=2)”, what is the club of the polynomial

  • 0
  • 1
  • 2

Question 19: Y’all have a linear model the average R^2 value on your grooming data is 0.five, you perform a 100th order polynomial transform on your information then use these values to train some other model, your boilerplate R^2 is 0.99 which comment is correct

  • 100-thursday order polynomial will work better on unseen data
  • Y’all should always use the simplest model
  • the results on your training information is non the all-time indicator of how your model performs, y’all should use your test data to get a beter idea

Question twenty:Yous train a ridge regression model, you go a R^2 of 1 on your grooming information and you get a R^two of 0 on your validation data, what should you lot do:

  • Cypher your model performs flawlessly on your test information
  • 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/

Posted by: Fusiontr.com