Home / Past papers / MLP Quiz 1 / this paper
Consider following common data and answer the given subquestions:
What will be the output of the following code snippet? Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet? Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet? Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet? Enter -1, if you think the above code snippet will generate an error.





















Consider following data and answer the given subquestions: Each row represents a data point. There are exactly 4 points. The index of points starts from 0 and ends at 3 (included).
Consider following data and code snippet: Based on the above data, answer the given subquestions.
What will be the output of the following code snippet: Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet: Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet: Enter -1, if you think the above code snippet will generate an error.
What will be the output of the following code snippet: Enter -1, if you think the above code snippet will generate an error.






Go through the code snippet given below and answer the given subquestions. 




Consider the following code: Which of the following may be the correct output of the above code?:




Consider the following code: Which of the following is more likely to be true?


What will be the output of the following code ? 
Consider the following code block and if needed make appropriate assumptions: Which of the following may be appropriate to be filled in the blank space value for scoring parameter?





Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.
DataFrame Operations: Creating, manipulating, and querying DataFrames.
df.shape, df.describe(), df.value_counts(), df.query()df.iloc[], df.loc[]SimpleImputer from sklearn.impute.MinMaxScaler, MaxAbsScaler, and OrdinalEncoder from sklearn.preprocessing.Pipelines: Creating and using Pipeline and ColumnTransformer for data preprocessing.
Pipeline([('impute', SimpleImputer()), ('scale', MinMaxScaler())])ColumnTransformer([('impute_scale', impute_scale_pipe, [0, 1]), ('categorical', OrdinalEncoder(), [2])])Model Training and Evaluation: Using SGDRegressor, LinearRegression, and cross_val_score.
SGDRegressor(max_iter=1000, tol=1e-3, eta0=0.04, power_t=5, n_iter_no_change=3, validation_fraction=0.3, random_state=42)LinearRegression(fit_intercept=False)cross_val_score(estimator=LinearRegression(), X=X_train, y=y_train, cv=shuffle_split, scoring='neg_mean_squared_error')Model Evaluation Metrics: Using r2_score from sklearn.metrics.
r2_score(y_test, y_pred)ShuffleSplit: Using ShuffleSplit for splitting data into training and test sets.
ShuffleSplit(n_splits=5, test_size=0.2, random_state=42)Euclidean Distance: Calculating the distance between data points.
Correlation Matrix: Understanding Pearson correlation coefficients and their range.
R² Score: Evaluating the performance of a regression model.
tol): Understanding the role of tolerance in optimization algorithms.eta0): Understanding the learning rate in stochastic gradient descent.n_iter_no_change and validation_fraction for early stopping in model training.