简体   繁体   English

出租车共享场景中的机器学习?

[英]Machine learning in cab pooling scenario?

So I have this dataset for a transportation problem. 所以我有这个运输问题的数据集。 Which shows a cab pooling scenario. 该图显示了出租车池的情况。 Consider the following image: 考虑下图:

在此处输入图片说明

The users with same ride number went in the same cab (each user has the same starting point so please ignore that). 具有相同乘车号的用户乘坐相同的出租车(每个用户都有相同的起点,因此请忽略此点)。 Now that means, Y, Z and A are in same proximity, and so as B & C and D & E. 现在这意味着,Y,Z和A处于同一距离,B和C以及D&E也是如此。

Now I would like to fit this dataset into a machine learning model such that when I enter the destination of any user, the model should give me the prediction on with whom my destination can be coupled so I can go in the cab with those people. 现在,我想将此数据集拟合到机器学习模型中,这样当我输入任何用户的目的地时,该模型应该给我预测可以与我的目的地耦合的对象,以便我可以与这些人一起乘坐出租车。

Like if I have to go to a location 'C' I can join people who are going to 'B'. 就像我必须去“ C”位置一样,我可以加入要去“ B”位置的人们。

Which machine learning algorithm can I use in this scenario? 在这种情况下,我可以使用哪种机器学习算法?

You can probably do without machine learning algorithm. 您可能不需要机器学习算法。 Given the ride number, you can identify locations which are close to each other and group them. 给定乘车编号,您可以识别彼此靠近的位置并将其分组。 When a new location comes, you can see which group it belongs to and pair the people traveling to locations within that group. 当出现新位置时,您可以看到它属于哪个组,并将前往该组中各个位置的人员配对。

To do this you can create a matrix which has locations A, B,C,... as the rows and as columns. 为此,您可以创建一个矩阵,该矩阵的行和列的位置分别为A, B,C,... What you'll get is a num_of_locations x num_of_locations matrix. 您将得到一个num_of_locations x num_of_locations矩阵。 For the cell with row label B and column label C you can mark it as 1 since they are in proximity and the locations which aren't in proximity(like A and B ) should be marked as zero. 对于具有行标签B和列标签C的单元格,您可以将其标记为1,因为它们位于附近,并且不靠近的位置(例如AB )应标记为零。

The matrix will be a symmetric one, so if you have too many locations you can save on memory and computation by some optimizations. 矩阵将是对称矩阵,因此,如果您有太多位置,则可以通过一些优化来节省内存和计算量。 You can research around saving triangular matrices as sparse matrices. 您可以研究将三角矩阵保存为稀疏矩阵。

Also, if you have access to the right resources(paid libraries), you can replace the 0,1 with distances(displacements actually). 另外,如果您有权使用正确的资源(付费图书馆),则可以将0,1替换为距离(实际上是位移)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM