简体   繁体   English

我们可以使用Logistic回归来预测数值(连续)变量,即餐厅收入吗

[英]Can we use Logistic Regression to predict numerical(continuous) variable i.e Revenue of the Restaurant

I have been given a task to predict the revenue of the Restaurant based on some variables can i use Logistic regression to predict the Revenue data. 我已经获得了一项根据一些变量来预测餐厅收入的任务,我可以使用Logistic回归来预测收入数据。 the dataset is of kaggle Restaurant Revenue Prediction Project. 该数据集是kaggle餐厅收入预测项目的。 PS :- I have been told to use Logistic regression i know its not the correct algorithm for this problem PS:-我被告知要使用Logistic回归,但我知道它不适用于此问题的正确算法

Yes... You can.!! 是的你可以。!!

Prediction using Logistic Regression can be done for numerical variables. 可以对数值变量使用Logistic回归进行预测。 The data you have right now contains all independent variables, and the outcome will be a dichotomous (dependent variable, having value TRUE/1 or FALSE/0). 您现在拥有的数据包含所有自变量,结果将是二分法(因变量,值为TRUE / 1或FALSE / 0)。

You can then use it to determine the log odds ratio to find a probability(range 0-1). 然后,您可以使用它来确定对数比值比,以找到概率(范围0-1)。

For a reference you can have look at this . 作为参考,您可以查看此内容

-------------------UPDATE------------------------------- ------------------- UPDATE ------------------------------ -

Let me give u an example of my last yr's wok.. we had to predict if a student can qualify in campus placement or not, given history data of 3 yrs of test results and their final success or failure. 让我给你举一个我上一年的炒锅的例子。.我们不得不根据给定3年测试结果的历史数据以及他们最终的成功或失败来预测学生是否有资格进入校园。 (NOTE : This is dichotomous, will talk about this later.) (注意:这是两分的,稍后将讨论。)

Sample data was, student's marks in academics, and aptitude test held at college, and their status as placed or not. 样本数据包括,学生在学术界的成绩以及在大学进行的能力测验,以及他们的地位与否。

But in your case, you have to predict the revenue (WHICH IS non-dichotomous ). 但就您而言,您必须预测收入(这是非二分法的 )。 So what to do?? 那么该怎么办?? It seems that my case was simple, right?? 看来我的情况很简单,对吧? Nope..!! 不..!!

We were not asked just to predict if the student will qualify or not, we were to predict the chances of individual student getting placed, which is not at all a dichotomous. 我们不仅被要求预测学生是否符合条件,还被预测单个学生被安置的机会,这根本不是二分法。 Looks like your scenario right? 看起来像您的情况对吗?

So, what you can do is, first classify the data as for what input variables, what is the final output variable (that will help in revenue calculation). 因此,您可以做的是,首先将数据分类为什么输入变量,什么是最终输出变量(这将有助于收入计算)。

For eg: Use data to find out if the restaurant will go in profit or loss, then relate it with some algorithms to find out the approx revenue prediction. 例如:使用数据来找出餐厅是否会盈利或亏损,然后将其与一些算法相关联以找出大概的收入预测。

I'm not sure if there are already such algorithms (identical to your need) exists or not, but I'm sure you can do much better by putting more efforts on research an analysis on this topic. 我不确定是否已经存在这样的算法(与您的需求相同),但是我敢肯定,通过在此主题上进行更多的研究分析,您可以做得更好。

TIP: NEVER think in such way that "Will Logistic Regression ONLY solve my problem?" 提示:切勿以这样的方式思考:“逻辑回归是否只能解决我的问题?” Rather expand it to, "What Logistic can do better if used with some other technique.?" 而是将其扩展为“如果与其他技术结合使用,哪种Logistic可以做得更好?”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们可以在 python 中使用逻辑回归预测数据集的未来值吗? - Can we predict future values of a dataset with logistic regression in python? 我们可以使用正态方程进行逻辑回归吗? - Can we use Normal Equation for Logistic Regression ? 我可以使用逻辑回归算法根据历史数据预测给定任务的ETA吗? - Can I use logistic regression algorithm to predict an ETA for a given task based on historical data? 如何使用分类和连续变量作为scikit逻辑回归算法的输入 - How can I use categorical and continuous variables as input to scikit logistic regression algorithm 分类数值变量为连续形式以解决回归问题 - Categorical numerical variable into continuous form for regression problem 逻辑回归预测购买 - Logistic regression to predict a buy 从逻辑回归系数中导出新的连续变量 - Deriving new continuous variable out of logistic regression coefficients 如何在Caffe中使用数字标签进行回归? - How can I use numerical labels for regression in Caffe? 逻辑回归中连续变量的缩放 - Scaling of Continuous variables in logistic regression 我如何拟合逻辑回归 model? - How can i fit the logistic regression model?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM