Almost every day we are struggling at work merging objects based on some conditions that keep manually. I wonder how difficult this could be to train a model using elixir ML ecosystem that helps predicting the master for the others to be merged onto?
Any guide out there on how perform this trainings in Elixir? I do not have ML background
These are not just Maps in Elixir. This is information I get from an external system (Hubspot) and these records when hey have the same value on key âdomainâ then should be merged into one, we do it manually following kind of same process to determine the master to merge into, so if I provide these merges as input and train a model where the master record is tagged as such then I can predict future ones.
I got something working using Python but was wondering how to translate same thing to Elixir.
So really this is the crux of what youâre hoping to solve with ML right? Like youâre merging a few large data structures, and obviously you can ignore any unset fields, but for fields that are set and in conflict you need to decide which of those structures is going to take precedence in the merge?
So yeah, Axon is definitely worth your time there, youâll find good docs and a nice overview linked from the README.
Cynicism/sarcasm aside, this is a totally valid question. If the merging process requires recognizing certain patterns in the data itself (regardless of whether itâs being represented in a map), then training a model can be a good way to go about it. It depends on which data is being interpreted and how the decisions are made. I donât think there is any reason why ML could not be a good fit, based on what OP shared.
Thanks @linusdm , thatâs exactly the point. To explain it better, Iâm NOT trying to merge Elixir Maps, instead I have an endpoint that receives the master and the other records that should be merged. So, in summary:
I get the records via API, want to pass them to a trained model that helps me to predict the master one, when master is detected, call the merge endpoint ({master record}, [the other records]).
Right now my team is doing it manually based on some patterns that can be easily put into samples to train a model (I guess), so then we can start testing.
I got something in Python, sooo basic, but wanted this in Elixir to keep learning and also because I found in the pass this forum pointing me out really good documentation and samples
If you can collapse all that patterns in an algorithm written by yourself I think it would be the most stable/debuggable solution.
If you canât, going for a ML solution is a very good try , I would suggest to go for a non opaque model like decision tree. You will have less issues if you need to debug it and you will need less samples to train it.
I think the SciKit-Learn version for NX is Scholar, donât know which models are available currently.