简体   繁体   English

这个问题是否适合机器学习——brain.js?

[英]Is this problem suitable for machine leaning - brain.js?

The problem I would like to solve is how to choose the best seats on a train based on some ordered user preferences.我想解决的问题是如何根据一些有序的用户偏好选择火车上的最佳座位。 eg.例如。 whether they'd like a seat facing forwards, backwards (or don't care), whether they'd like a seat at a table or not, whether they need to be near a toilet, luggage rack, buffet car, near the door.他们是否喜欢朝前、朝后(或不在乎)的座位,他们是否喜欢餐桌旁的座位,他们是否需要靠近厕所、行李架、自助餐车、靠近门. Window / Aisle seat.靠窗/过道座位。 Whether they want the aisle to the left or the right (can be very important some someone with a stuff knee!).他们是否想要左侧或右侧的过道(对于有些膝盖受伤的人来说可能非常重要!)。

Most customers will specify one or two preferences, other may specify more.大多数客户会指定一两个偏好,其他可能会指定更多。 For some, being near the toilet might be the most important factor, for others having that table to work at might be the most important.对于一些人来说,靠近厕所可能是最重要的因素,而对于其他人来说,有一张桌子可以工作可能是最重要的。

There may be more than one passenger (although they will share preferences).可能有不止一名乘客(尽管他们会分享偏好)。 These should be sat as close to each other as possible.这些应该尽可能靠近彼此。 2 passengers would ideally be sat next to each other, or opposite each other at a table seat.理想情况下,2 名乘客应并排坐着,或在桌位上彼此相对。 A group of 8 passengers might best be split into 2 groups of 4 or 4 groups of 2... 8 人一组最好分成 2 组 4 人或 4 组 2 人……

Position is defined by carriage number (seats in the same carriage are better then seats in different carriages) and by x/y coordinate within that carriage - so easy enough to calculate distance between any pair of seats - but a BIG job to calculate distances between EVERY pair of seats...)位置由车厢编号(同一车厢的座位比不同车厢的座位更好)和车厢内的 x/y 坐标定义 - 计算任何一对座位之间的距离很容易 - 但是计算之间的距离是一项艰巨的工作每对座位...)

Each [available] seat (pre-filtered by ticket class) will have the above attributes either defined or set to NULL (for unknown - seat facing is often unknown).每个 [可用] 座位(按票类预过滤)将具有上述属性,或者定义或设置为 NULL(对于未知 - 面向座位通常是未知的)。

So for training I can provide a vast array of example trains and customer preferences with the best balance of preferences version position.因此,对于培训,我可以提供大量示例列车和客户偏好,以及偏好版本位置的最佳平衡。

For execution I want to provide a run-time specific array of seats with attributes, a set of user preferences and a set if weighting for those preference (eg. passenger 1 thinks being near toilet is most important, passenger 2 think having a table is most important, passenger 3 think being in the quiet carriage is..) and finally the number of passengers.为了执行,我想提供一个运行时特定的座位数组,包括属性、一组用户偏好和一组如果对这些偏好进行加权(例如,乘客 1 认为靠近厕所是最重要的,乘客 2 认为有一张桌子是最重要的)最重要的是,乘客 3 认为在安静的车厢里是..),最后是乘客数量。

Output will be an array of seats (one per passenger) that strike the best compromise between matching as many customer preferences as possible (usually not possible to match all preferences) and keeping the seats fairly close to each other.输出将是一系列座位(每个乘客一个),在匹配尽可能多的客户偏好(通常不可能匹配所有偏好)和保持座位彼此相当接近之间取得最佳折衷。

eg.例如。 We might be able to match 2 preferences with seats 2 rows apart, but match 3 preference with seats 10 rows apart...我们也许可以将 2 个偏好与相隔 2 排的座位相匹配,但可以将 3 个偏好与相隔 10 排的座位相匹配……

Obviously distance will need a weighting the same as the individual preference and necessary to choose between those two.显然,距离需要与个人偏好相同的权重,并且必须在这两者之间进行选择。 I suppose a distance not greater than X becomes just one more customer preference...我想一个不大于 X 的距离只是一个更多的客户偏好......

I've not done any ML work before, so it's all going to be a learning exercise for me.我以前没有做过任何机器学习工作,所以这对我来说都是一个学习练习。 I wish I had the time to just play and see what comes out, but I don't, Happy to do that, but I need to have a reasonable expectation of a positive result otherwise I'll have to focus on a more traditional approach.我希望我有时间玩一下看看结果,但我没有,很高兴这样做,但我需要对积极的结果有合理的期望,否则我将不得不专注于更传统的方法. Limited time and all that...时间有限,等等……

So, my questions are:所以,我的问题是:

  1. Is this a suitable problem for machine learning?这是一个适合机器学习的问题吗?
  2. If so, is brain.js a good choice, or is something else more suitable?如果是这样,brain.js 是一个不错的选择,还是其他更合适的选择? AWS ML service perhaps?也许是 AWS ML 服务?
  3. Any advice on how to organise all my data into something suitable for an ML engine to process?关于如何将我的所有数据组织成适合 ML 引擎处理的内容有什么建议吗?

Machine Learning is good at finding hidden patterns in complex data.机器学习擅长发现复杂数据中的隐藏模式。 In your case, you would need a lot of data where user preferences are already matched with optimal seating arrangements.在您的情况下,您需要大量数据,其中用户偏好已经与最佳座位安排相匹配。

You could then try to see if the ML model can actually make optimal seating arrangements by itself.然后,您可以尝试查看 ML 模型是否可以自行做出最佳座位安排。 It's an interesting problem but it may also lead to unexpected seating :)这是一个有趣的问题,但它也可能导致意外的座位:)

If you don't have training data you could collect it live, by registering where people sit down, knowing their preferences.如果您没有训练数据,您可以通过注册人们坐下的位置并了解他们的喜好来实时收集数据。

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

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