Train a model to order a set of points
2 次查看(过去 30 天)
显示 更早的评论
I am in need of guidance or any example online that can help.
I would like to learn how to train a model in MATLAB to order a set of points based on what it has learned given the solution to some problems.
I have the following data:
SCRAMBLED is a cell array the contains X number of problems to solve, each problem consists of an array of size Nx2, where the first column is the x coordinate and the second is the y coordinate. The rows of this array are not in order and are to be ordered correctly.
SORTED is a cell array that contains X number of solutions, and it corresponds exactly to the SCRAMBLED cell array, similarily each solution contains an array of size Nx2 however the rows are now ordered to the correct order.
I would like to train a model to take in each cell of the cell array and learn how to correctly order the rows based on the solution so that if given a new scrambled array it will be able to re order it based on what it has learned. Any online tutuorials of something similar or pages that can help are much appreciated
(attached is a sample of those two cell arrays that contain the data structure i currently have)
2 个评论
Matt J
2023-10-16
It doesn't appear that your data is sorted, e.g.,
load Sample SORTED
issorted(SORTED{1},'ascend')
issorted(SORTED{1},'descend')
回答(1 个)
Shivansh
2023-11-10
Hi Ahmed,
I understand that you want to train the current arrays on a model such that it predicts the output for the “SORTED” array, given a “SCRAMBLED” array.
You can use a deep learning approach like sequence-to-sequence (Seq2Seq) modelling to train the model in MATLAB. Seq2Seq models are commonly used in natural language processing tasks, but they can also be applied to other sequence-based problems like ordering points.
Refer to the following links for more information:
- For sequence data workflows: https://www.mathworks.com/help/deeplearning/sequence-and-numeric-feature-data-workflows.html?s_tid=CRUX_lftnav.
- Example for sequence to sequence translation: https://www.mathworks.com/help/deeplearning/ug/sequence-to-sequence-translation-using-attention.html.
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!