Create multi models
Kuyu
New Altair Community Member
I want to create a multi-model by param, what I mean:
I have a country column, and I want to have a different model per country.
So, I want to have a model, that takes the country and applies the relevant model on it. (for the train and for the predict)
What is the best way to do it? if there is away?
I have a country column, and I want to have a different model per country.
So, I want to have a model, that takes the country and applies the relevant model on it. (for the train and for the predict)
What is the best way to do it? if there is away?
Tagged:
1
Best Answer
-
Hello @Kuyu
I created a sample process for you. In this process, I used Titanic Training and Titanic Unlabelled datasets available in Rapidminer. The training dataset is for training and unlabelled data is for applying or testing. Similar to your case, I wanted to build a different model for different "Passenger Class". I looped based on "loop_value" operator and used %{loop_value} macro to filter the data inside loop to create and test models. The output is a collection of Training data's cross-validation performance and labeled test dataset.
I provided clear comments in the process for your understanding. Do let us know if you need any clarifications or if you ar looking for something else.
To use this process in your rapidminer studio, just download this .rmp file attached and then go to studio and click on FILE --> Import Process and navigate it to this downloaded .rmp file.2
Answers
-
Hello Kuyu,
If you have a country variable in your data, you can loop values operator and then inside that you can use filter examples based on the macro in loop values operator and build a model inside loop.
This will help you create multiple models based on data.
1 -
Hey there!Sounds like you need indexed models. They construct as many models as there are different values of the chosen index, in your case country. They are easy to use and highly efficient. You can get them with our Jackhammer Extension – unfortunately, I'm afraid, indexed models are not part of the free demo version of the extension, but there are lots of other helpful features included, so you might want to have a look anyways.For info on indexed models, including an example process, check out this community forum post.If would like more details, you can also take a look at this blog post.Hope this helps!CheersLeonie3
-
Hello @Kuyu
I created a sample process for you. In this process, I used Titanic Training and Titanic Unlabelled datasets available in Rapidminer. The training dataset is for training and unlabelled data is for applying or testing. Similar to your case, I wanted to build a different model for different "Passenger Class". I looped based on "loop_value" operator and used %{loop_value} macro to filter the data inside loop to create and test models. The output is a collection of Training data's cross-validation performance and labeled test dataset.
I provided clear comments in the process for your understanding. Do let us know if you need any clarifications or if you ar looking for something else.
To use this process in your rapidminer studio, just download this .rmp file attached and then go to studio and click on FILE --> Import Process and navigate it to this downloaded .rmp file.2