Question 3
Consider a regression dataset, the features are "Temperature" and "Humidity", and the label is "Precipitation" (i.e. rain fall in centimeter), both the features are numerical and there are no missing values in the dataset. Following code snippet trains a simple model on this dataset, assume necessary imports:
data = pd.read_csv('dataset.csv')X = data[data.columns[:-1]]y = data[data.columns[-1]]X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.8)mms = MinMaxScaler()X_train['Temperature'] = mms.fit_transform(X_train['Temperature'])X_train['Humidity'] = mms.fit_transform(X_train['Humidity'])
X_test['Temperature'] = mms.fit_transform(X_test['Temperature'])X_test['Humidity'] = mms.fit_transform(X_test['Humidity'])
lr = LinearRegression().fit(X_train,y_train)Choose the correct statements from the options:
The training set will have 20% of the data, which is a good practice.
The training set size is smaller than test set size.
The train and test samples are not scaled appropriately.
One of the fundamental assumption of Machine Learning, which is, training and test data belong to same distribution, is not upheld.