Selecting ML Algorithms for Resource-Constrained Environments
Short answer
A Linear regression should be used because it is a computationally efficient algorithm suitable for predicting continuous values like housing prices on resource-constrained hardware.
Question
algorithm should you use?
Key Takeaways
The question tests the ability to match algorithm complexity with infrastructure constraints, specifically identifying that regression problems require different algorithms than classification ones.
This page explains why Linear Regression is the correct choice for predicting housing prices on a resource-constrained virtual machine, balancing model simplicity with computational efficiency.
Common mistake: Candidates often choose neural networks (C or D) assuming they are always superior for prediction tasks, failing to recognize that their high computational overhead makes them unsuitable for resource-constrained environments compared to simpler models like linear regression.
Expert Analysis
The question presents a classic trade-off scenario in machine learning: model complexity versus computational resources. The task is to predict housing prices, which is a regression problem because the target variable (price) is continuous numeric data. This immediately eliminates logistic classification (Option B), as that algorithm is designed for binary or multi-class classification tasks (e.g., predicting 'yes/no' outcomes).
Between the remaining regression options—Linear Regression (A), Recurrent Neural Network (C), and Feedforward Neural Network (D)—the deciding factor is the constraint: a "single resource-constrained virtual machine." Neural networks, including both feedforward and recurrent architectures, are computationally intensive. They require significant memory for weights and activations, substantial processing power for matrix multiplications during training, and often benefit from specialized hardware like GPUs. Deploying them on a resource-constrained VM would likely lead to poor performance, long training times, or inability to run at all.
In contrast, Linear Regression is a linear model with a simple mathematical structure. It has few parameters, requires minimal memory, and can be trained efficiently using closed-form solutions (like normal equations) or simple gradient descent on a single CPU core. Comments highlight this efficiency, noting that it is "computationally lightweight" and "well-suited for single machines with limited resources." While neural networks might offer higher accuracy for complex non-linear relationships, the prompt explicitly prioritizes the resource constraint over maximum predictive power, making Linear Regression the only viable choice among the options provided.
Exam Strategy
When faced with ML algorithm questions, first identify the problem type (classification vs. regression). Next, evaluate any infrastructure constraints mentioned (e.g., limited RAM, CPU-only, edge devices). Prioritize simpler, linear models (like Logistic/Linear Regression) when resources are tight, reserving complex models (Neural Networks, Ensembles) for scenarios where accuracy outweighs compute costs or sufficient hardware is available.
Frequently Asked Questions
Why not use a neural network for housing prices?
Is linear regression accurate enough for housing prices?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 29 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 29
-
Radhika7983 👍 60Correct answer is A. A tip here to decide when a liner regression should be used or logistics regression needs to be used. If you are forecasting that is the values in the column that you are predicting is numeric, it is always liner regression. If you are classifying, that is buy or no buy, yes or no, you will be using logistics regression.
-
muzammilnxs 👍 27Neural Networks(Feed Forward or Recurrent) require resource intensive machines(i.e GPU's) whereas Linear regression can be done on ordinary CPU's
-
Anirkent 👍 7Liner Regression is correct but this is one aspect of the question, how does it relates to resource constrained machines? or that could be just a distraction?
-
samdhimal 👍 4correct answer -> Linear Regression Linear regression is a statistical method that allows to summarize and study relationships between two continuous (quantitative) variables: One variable, denoted X, is regarded as the independent variable. The other variable denoted y is regarded as the dependent variable. Linear regression uses one independent variable X to explain or predict the outcome of the dependent variable y. Whenever you are told to predict some future value of a process which is currently running, you can go with a regression algorithm.
-
saurabh1805 👍 4Correct Answer is A, refer below link for more information.
Show 24 more comments
-
rtcpost 👍 3 Answered ALinear regression is a simple and resource-efficient algorithm for predicting continuous values like housing prices. It's computationally lightweight and well-suited for single machines with limited resources. It doesn't require the extensive computational power or specialized hardware that more complex algorithms like neural networks (options C and D) might need. Option B (Logistic classification) is used for binary classification tasks, not for predicting continuous values like housing prices, so it's not the right choice in this context.
-
MaxNRG 👍 3A as Supervised learning using Regression can help build a model to predict house prices. Option B is wrong as Classification would not help to solve the problem. Options C & D are wrong as they would need more resources.
-
PRABHUKKARTHI 👍 3Option A: Because Linear Regression is applicable for the continuous value output as the Price for the House will be a continuous values.
-
samdhimal 👍 2Linear regression is a simple and computationally efficient algorithm that can be used to predict a continuous target variable based on one or more input variables. It is particularly well-suited for resource-constrained environments, as it requires minimal computational resources and can be run on a single virtual machine. Linear regression is a good fit for this problem as it is a supervised learning algorithm that can be used for regression problems, and it's not computationally expensive. Option B is not recommended as Logistic classification is a supervised learning algorithm that is used for classification problems, not regression problems. Option C and D are not recommended as Recurrent Neural Network (RNN) and Feedforward Neural Network (FNN) are computationally expensive and may require significant computational resources and memory to run on a single virtual machine.
-
StefanoG 👍 2Ok the right answer is A, but the question is why? Then: - B not because we are make forecasting and not classifying - C and D not because this solution need more nodes, then more VM. Right?
-
SamuelTsch 👍 2 Answered Athe keyword here is running it on a single resource-constrained virtual machine. linear regression is a simple and efficient algorithm that is well-suited for predicting continuous values.
-
rowan_ 👍 2A for sure. B is for classification. Neural nets can accomplish the task but they take WAY too many resources
-
Zosby 👍 2predict housing prices = linear regresssion
-
sid091 👍 2Easy One. Linear Regression . Option A
-
davidbilla 👍 2A. Linear Regression
-
naga 👍 2Correct A
-
Fazan456 👍 1 Answered AHere, due to budget constraints, we're utilizing a single resource-constrained virtual machine, operating in a minimal resource environment. Linear regression emerges as the appropriate algorithm. It's a lightweight predictive model that suits our resource limitations
-
AmmarFasih 👍 1 Answered ACorrect Answer is A. Since linear regression is used to predict a numeric value. While logistic regression is used to classify among the binary scenario. Further option C and D are advance ML options and not cost and resource effective for the current situation.
-
RT_G 👍 1 Answered ALinear regression will be used since the prediction requires forecasting prices involving numeric values and is computationally less resource intensive
-
willyunger 👍 1 Answered Alinear regression to predict numeric with least cost. for classifying with options use logistics.
-
daghayeghi 👍 1A: When a model is used to predict a continuous value, it is known as a regression model.
-
JJJJim 👍 1 Answered Amust be A. Though C can do it, linear regression is the better practice.
-
AshishDhamu 👍 1 Answered ALinear regression is used for continous distribution.
-
azuavi 👍 1 Answered ACorrect answer is A, thanks
-
rocky48 👍 1 Answered ACorrect answer is A
-
lbhhoya82 👍 1Correct : A
-
sumanshu 👍 1Vote for A
-
lukas_xls 👍 1 Answered AMust be A
-
anji007 👍 1Ans: A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.