题目
单项选择题
Which code can be used directly to predict prices for new HDB resale cases using a trained Linear Regression model?
选项
A.lr.predict([[3, 'Ang Mo Kio', '4-room'], [4, 'Bedok', '5-room']])
B.lr.predict([[1200, 30, 1, 0, 0], [980, 12, 0, 1, 0]])
C.df.predict(y_test)
D.df.fit(X_test, y_test)
查看解析
标准答案
Please login to view
思路分析
Question restatement: Which code can be used directly to predict prices for new HDB resale cases using a trained Linear Regression model?
Option A: lr.predict([[3, 'Ang Mo Kio', '4-room'], [4, 'Bedok', '5-room']])
- This input uses categorical data like location names ('Ang Mo Kio', 'Bedok') and room labels ('4-room', '5-room') directly, which is inconsistent with a trained Linear Regression model that typically expects numerical feature values. Unless those categories have been......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
Many people struggle to get loans due to insufficient or non-existent credit histories. And, unfortunately, this population is often taken advantage of by untrustworthy lenders. Home Credit strives to broaden financial inclusion for the unbanked population by providing a positive and safe borrowing experience. In order to make sure this underserved population has a positive loan experience, Home Credit makes use of a variety of alternative data--including telco and transactional information--to predict their clients' repayment abilities. Home Credit can provide three types of loans: Cash loans are one-time loans for any purpose Consumer loans will be for a specific item such as a refrigerator, washing machine or car. Revolving loans allow a client to borrow up to a limit, repay the loan and then borrow again. The company would like to improve their ability to select clients who will successfully repay loans, so that additional money can be loaned to future borrowers. Here are the variables available for the analysis: Variable Description Application_id ID of the loan application Loan_type Cash, Consumer or Revolving (see description above) Loan_term_months Number of months until loan maturity (pay off due date) Education_level Highest education level (None, High School, 2-Year College, etc.) Own_car_flag Client owns a car (true/false) Own_home_flag Client owns a home (true/false) Months_in_current_residence Number of months residing at current apartment or home Monthly_income_amount Average total monthly income for the household, including tips and informal payments (ex. Venmo) Total_consumer_debt Total debt for the household, including home, car and credit card debt Credit_bureau_score Credit rating score (FICO) Cash_savings_total Total amount of money available as cash Cell_phone_payments_last_12_months Number of completed cell phone payments in the last year Profession Description of the employment of the primary borrower Loan_amount Amount of the requested loan Default Final outcome of the loan account ('true' indicates that the account was not paid in full by the end of the loan term) Underwriter_notes Text notes from interviews with the prospective client Loan_purpose Description of the reason for the loan Predicting loan_amount requires what algorithm? (We are not predicting a yes or no outcome rather we are predicting a numeric value)
神经网络中需要有多少个神经元才能解决一维的线性回归任务? How many neurons are necessary in a neural network to solve a linear regression task in one dimension?
Recall that a single-neuron network for linear regression with two features looks as follows. Let’s assume I have already trained this network, and I ended up with the following optimal values: w1=1, w2=1, b=0. Now let’s say I have a test sample that I'd like to make a prediction on. It has feature values x1=2, x2=3, and target value 10. (i) What is z for this test sample? [ Select ] 20 10 15 5 25 (ii) What is g(z) for this test sample? [ Select ] 25 10 15 20 5 (iii) What is yhat for this test sample? [ Select ] 25 15 5 20 10 (iv) What is y for this test sample? [ Select ] 25 20 5 10 15 (v) What is J for this test sample? [ Select ] 15 5 25 20 10 (vi) I now have another test sample I'd like to make a prediction on. Which of these is a complete list of all the values that might change: [ Select ] x1, x2, y x1, x2, w1, w2, b, z, g(z), yhat, y, J x1, x2, z, g(z), yhat, y, J w1, w2, b z, g(z), yhat, J
Let's say I have some training data with just one feature (X) and a continuous target variable (Y), and the scatter plot of the training data looks as follows. I decide to use the functional form Y = w1*X + b with MSE loss. On completing training, I find that the training set loss is still quite high and the performance on my test set is not good. Which of the following will help improve performance in this situation?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!