The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Set condition for cross distance
Dear everyone!
As you may have seen (http://rapid-i.com/rapidforum/index.php/topic,9557.0.html), I'm working on a process that matches similar products.
Well, currently I use several text fields to calculate the distance like "manufacturer", "class", "article number", "longtext" and so on.
What I now want to do to receive even better results is to say "Ok cross distance operater: please only match those products that belong into the same category and are from the same brand".
Is that possible?
At the moment I just set k to "10" in cross distance operator, but if for example there is only a short description, a product might also get associated with a similar product, but from another brand.
The result should still be 10 matching products per product, but only if the category and the brand are the same.
In addition, I might also set a filter of how many percent a product has to be similar.
Thanks!
As you may have seen (http://rapid-i.com/rapidforum/index.php/topic,9557.0.html), I'm working on a process that matches similar products.
Well, currently I use several text fields to calculate the distance like "manufacturer", "class", "article number", "longtext" and so on.
What I now want to do to receive even better results is to say "Ok cross distance operater: please only match those products that belong into the same category and are from the same brand".
Is that possible?
At the moment I just set k to "10" in cross distance operator, but if for example there is only a short description, a product might also get associated with a similar product, but from another brand.
The result should still be 10 matching products per product, but only if the category and the brand are the same.
In addition, I might also set a filter of how many percent a product has to be similar.
Thanks!
0
Answers
what about adding a loop value around?
~Martin
Dortmund, Germany
Please excuse my late reply, I've been trying many versions of the process but unfortunately, I didn't receive what I wanted.
I added a loop to the process but the documents column also shows ids that are in other categories or from other manufacturers.
Do I understand correctly that when using the "loop attributes" operator, it executes a subprocess again and again for each set of data that has the same value in the specified attribute?
Any idea what's wrong with the following code? (Just to be sure: I want the process only to get the similar documents / ids that are in the same category as well as from the same manufacturer): Thanks!
have a look on this process, this is how I would do it. Of course you can do your process documents etc. in the loop.
~Martin
Dortmund, Germany
Thanks for your support again,
I made a few changes to the process to further meet my needs:
., disabled "Generate ID" as this is already set in the example set
., sampled the data (to run the process faster for testing purposes)
., added "filter examples" after "cross distance" to filter out those where request and document are the same (using a regex)
., aggregated everything
The only problem remaining is that when I use "manufacturer" to loop, that categories might not be the same in request and document.
Is the only way to filter for those results that have the same category in request and document to add a filter after join (2)? (This would reduce the number of results of course; I'd prefer setting that filter before "cross distance" calculated the X nearest)
Is it possible to merge the resulting example sets into one?
This seems to be easier then I thought by just adding the "append" operator:
https://rapid-i.com/rapidforum/index.php?topic=4510.0