How to merge personalized models together
$begingroup$
Let's say I'm building an app like Uber and I want to predict the user's most likely destination based on the user's past history, current latitude-longitude, and current date and time.
We have millions of users, but each user needs will be probably too unique for generalization. I.e., everyone's commute is so different that what you have learned from other users are probably not applicable to other users.
In conclusion, I have to build millions of models, how can I merge these models together for a better deployment process?
If not, what are the best practices to deploy millions of models?
machine-learning predictive-modeling feature-extraction geospatial
$endgroup$
bumped to the homepage by Community♦ 7 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
Let's say I'm building an app like Uber and I want to predict the user's most likely destination based on the user's past history, current latitude-longitude, and current date and time.
We have millions of users, but each user needs will be probably too unique for generalization. I.e., everyone's commute is so different that what you have learned from other users are probably not applicable to other users.
In conclusion, I have to build millions of models, how can I merge these models together for a better deployment process?
If not, what are the best practices to deploy millions of models?
machine-learning predictive-modeling feature-extraction geospatial
$endgroup$
bumped to the homepage by Community♦ 7 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01
add a comment |
$begingroup$
Let's say I'm building an app like Uber and I want to predict the user's most likely destination based on the user's past history, current latitude-longitude, and current date and time.
We have millions of users, but each user needs will be probably too unique for generalization. I.e., everyone's commute is so different that what you have learned from other users are probably not applicable to other users.
In conclusion, I have to build millions of models, how can I merge these models together for a better deployment process?
If not, what are the best practices to deploy millions of models?
machine-learning predictive-modeling feature-extraction geospatial
$endgroup$
Let's say I'm building an app like Uber and I want to predict the user's most likely destination based on the user's past history, current latitude-longitude, and current date and time.
We have millions of users, but each user needs will be probably too unique for generalization. I.e., everyone's commute is so different that what you have learned from other users are probably not applicable to other users.
In conclusion, I have to build millions of models, how can I merge these models together for a better deployment process?
If not, what are the best practices to deploy millions of models?
machine-learning predictive-modeling feature-extraction geospatial
machine-learning predictive-modeling feature-extraction geospatial
edited Dec 20 '18 at 15:07
wacax
1,91021038
1,91021038
asked Dec 20 '18 at 5:56
user64626user64626
61
61
bumped to the homepage by Community♦ 7 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 7 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01
add a comment |
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Feature engineering is the name of the game when it comes to this cases. I stumbled upon a similar problem a few years ago and it can be baffling to have a model nor generalize well for all cases. However, one model for one user is never the way to go, after all you, in many cases have only one data point for that user in particular. Additionally, you will never be able to make predictions if a new user appears.
Therefore, you need to use one model for as many as possible users. There are many more approaches but these are the ones worth considering in my opinion.
- You can cluster users by location, city, neighborhood, region. Usually people in the same areas frequent the same places. If one model is incapable of generalization for all possible users then splitting the data into similar clusters is an approach.
- In the case a model can generalize well for most cases but there is a big cluster when it cannot generalize, use a second model for the hard cases.
- Basic feature engineering: users living nearby are going to go to similar places based on their current location and are going to use the same ways. There is a lot of information similar users will share. Use starting location as a feature as well.
- Advanced feature engineering: Use old targets from the same users along with time features in a meaningful way as training features to predict future targets.
- Use users ids: user ids can be used to predict targets in modern machine learning algorithms, sparse matrices do the trick, think of them as NLP words. Some might be useful others don't but let the algorithm do its work. Search for algorithms that support sparse matrices if you take this approach.
- Research GIS (Geographic Information System) forecast: there are other tricks and feature engineering methods in that field that are not applicable for other ML problems which are useful for forecasting these kind of problems.
- Try different targets. Longitude - -latitude is often not possible but a raw estimate of the region can be done. You can treat the targets as a multilabel preferably (not multiclass) classification with each region/neighborhood/block be one label. Remember, algorithms can handle many targets like in the case of image classification, research those approaches.
- Consider simpler methods if you don't have enough data: If user Bob goes to spot A every Monday then probably Bob will be at A the next Monday as well.
- Use dates/days of the week/holidays as features. People change transit behaviors during holidays.
tl.dr. Find a way to use many users for a model that generalizes well because training one model for one person never works due to users having often just one point of data. Because, all algorithms need massive amounts of data to generalize well.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "557"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f42922%2fhow-to-merge-personalized-models-together%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Feature engineering is the name of the game when it comes to this cases. I stumbled upon a similar problem a few years ago and it can be baffling to have a model nor generalize well for all cases. However, one model for one user is never the way to go, after all you, in many cases have only one data point for that user in particular. Additionally, you will never be able to make predictions if a new user appears.
Therefore, you need to use one model for as many as possible users. There are many more approaches but these are the ones worth considering in my opinion.
- You can cluster users by location, city, neighborhood, region. Usually people in the same areas frequent the same places. If one model is incapable of generalization for all possible users then splitting the data into similar clusters is an approach.
- In the case a model can generalize well for most cases but there is a big cluster when it cannot generalize, use a second model for the hard cases.
- Basic feature engineering: users living nearby are going to go to similar places based on their current location and are going to use the same ways. There is a lot of information similar users will share. Use starting location as a feature as well.
- Advanced feature engineering: Use old targets from the same users along with time features in a meaningful way as training features to predict future targets.
- Use users ids: user ids can be used to predict targets in modern machine learning algorithms, sparse matrices do the trick, think of them as NLP words. Some might be useful others don't but let the algorithm do its work. Search for algorithms that support sparse matrices if you take this approach.
- Research GIS (Geographic Information System) forecast: there are other tricks and feature engineering methods in that field that are not applicable for other ML problems which are useful for forecasting these kind of problems.
- Try different targets. Longitude - -latitude is often not possible but a raw estimate of the region can be done. You can treat the targets as a multilabel preferably (not multiclass) classification with each region/neighborhood/block be one label. Remember, algorithms can handle many targets like in the case of image classification, research those approaches.
- Consider simpler methods if you don't have enough data: If user Bob goes to spot A every Monday then probably Bob will be at A the next Monday as well.
- Use dates/days of the week/holidays as features. People change transit behaviors during holidays.
tl.dr. Find a way to use many users for a model that generalizes well because training one model for one person never works due to users having often just one point of data. Because, all algorithms need massive amounts of data to generalize well.
$endgroup$
add a comment |
$begingroup$
Feature engineering is the name of the game when it comes to this cases. I stumbled upon a similar problem a few years ago and it can be baffling to have a model nor generalize well for all cases. However, one model for one user is never the way to go, after all you, in many cases have only one data point for that user in particular. Additionally, you will never be able to make predictions if a new user appears.
Therefore, you need to use one model for as many as possible users. There are many more approaches but these are the ones worth considering in my opinion.
- You can cluster users by location, city, neighborhood, region. Usually people in the same areas frequent the same places. If one model is incapable of generalization for all possible users then splitting the data into similar clusters is an approach.
- In the case a model can generalize well for most cases but there is a big cluster when it cannot generalize, use a second model for the hard cases.
- Basic feature engineering: users living nearby are going to go to similar places based on their current location and are going to use the same ways. There is a lot of information similar users will share. Use starting location as a feature as well.
- Advanced feature engineering: Use old targets from the same users along with time features in a meaningful way as training features to predict future targets.
- Use users ids: user ids can be used to predict targets in modern machine learning algorithms, sparse matrices do the trick, think of them as NLP words. Some might be useful others don't but let the algorithm do its work. Search for algorithms that support sparse matrices if you take this approach.
- Research GIS (Geographic Information System) forecast: there are other tricks and feature engineering methods in that field that are not applicable for other ML problems which are useful for forecasting these kind of problems.
- Try different targets. Longitude - -latitude is often not possible but a raw estimate of the region can be done. You can treat the targets as a multilabel preferably (not multiclass) classification with each region/neighborhood/block be one label. Remember, algorithms can handle many targets like in the case of image classification, research those approaches.
- Consider simpler methods if you don't have enough data: If user Bob goes to spot A every Monday then probably Bob will be at A the next Monday as well.
- Use dates/days of the week/holidays as features. People change transit behaviors during holidays.
tl.dr. Find a way to use many users for a model that generalizes well because training one model for one person never works due to users having often just one point of data. Because, all algorithms need massive amounts of data to generalize well.
$endgroup$
add a comment |
$begingroup$
Feature engineering is the name of the game when it comes to this cases. I stumbled upon a similar problem a few years ago and it can be baffling to have a model nor generalize well for all cases. However, one model for one user is never the way to go, after all you, in many cases have only one data point for that user in particular. Additionally, you will never be able to make predictions if a new user appears.
Therefore, you need to use one model for as many as possible users. There are many more approaches but these are the ones worth considering in my opinion.
- You can cluster users by location, city, neighborhood, region. Usually people in the same areas frequent the same places. If one model is incapable of generalization for all possible users then splitting the data into similar clusters is an approach.
- In the case a model can generalize well for most cases but there is a big cluster when it cannot generalize, use a second model for the hard cases.
- Basic feature engineering: users living nearby are going to go to similar places based on their current location and are going to use the same ways. There is a lot of information similar users will share. Use starting location as a feature as well.
- Advanced feature engineering: Use old targets from the same users along with time features in a meaningful way as training features to predict future targets.
- Use users ids: user ids can be used to predict targets in modern machine learning algorithms, sparse matrices do the trick, think of them as NLP words. Some might be useful others don't but let the algorithm do its work. Search for algorithms that support sparse matrices if you take this approach.
- Research GIS (Geographic Information System) forecast: there are other tricks and feature engineering methods in that field that are not applicable for other ML problems which are useful for forecasting these kind of problems.
- Try different targets. Longitude - -latitude is often not possible but a raw estimate of the region can be done. You can treat the targets as a multilabel preferably (not multiclass) classification with each region/neighborhood/block be one label. Remember, algorithms can handle many targets like in the case of image classification, research those approaches.
- Consider simpler methods if you don't have enough data: If user Bob goes to spot A every Monday then probably Bob will be at A the next Monday as well.
- Use dates/days of the week/holidays as features. People change transit behaviors during holidays.
tl.dr. Find a way to use many users for a model that generalizes well because training one model for one person never works due to users having often just one point of data. Because, all algorithms need massive amounts of data to generalize well.
$endgroup$
Feature engineering is the name of the game when it comes to this cases. I stumbled upon a similar problem a few years ago and it can be baffling to have a model nor generalize well for all cases. However, one model for one user is never the way to go, after all you, in many cases have only one data point for that user in particular. Additionally, you will never be able to make predictions if a new user appears.
Therefore, you need to use one model for as many as possible users. There are many more approaches but these are the ones worth considering in my opinion.
- You can cluster users by location, city, neighborhood, region. Usually people in the same areas frequent the same places. If one model is incapable of generalization for all possible users then splitting the data into similar clusters is an approach.
- In the case a model can generalize well for most cases but there is a big cluster when it cannot generalize, use a second model for the hard cases.
- Basic feature engineering: users living nearby are going to go to similar places based on their current location and are going to use the same ways. There is a lot of information similar users will share. Use starting location as a feature as well.
- Advanced feature engineering: Use old targets from the same users along with time features in a meaningful way as training features to predict future targets.
- Use users ids: user ids can be used to predict targets in modern machine learning algorithms, sparse matrices do the trick, think of them as NLP words. Some might be useful others don't but let the algorithm do its work. Search for algorithms that support sparse matrices if you take this approach.
- Research GIS (Geographic Information System) forecast: there are other tricks and feature engineering methods in that field that are not applicable for other ML problems which are useful for forecasting these kind of problems.
- Try different targets. Longitude - -latitude is often not possible but a raw estimate of the region can be done. You can treat the targets as a multilabel preferably (not multiclass) classification with each region/neighborhood/block be one label. Remember, algorithms can handle many targets like in the case of image classification, research those approaches.
- Consider simpler methods if you don't have enough data: If user Bob goes to spot A every Monday then probably Bob will be at A the next Monday as well.
- Use dates/days of the week/holidays as features. People change transit behaviors during holidays.
tl.dr. Find a way to use many users for a model that generalizes well because training one model for one person never works due to users having often just one point of data. Because, all algorithms need massive amounts of data to generalize well.
edited Dec 20 '18 at 15:18
answered Dec 20 '18 at 14:56
wacaxwacax
1,91021038
1,91021038
add a comment |
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f42922%2fhow-to-merge-personalized-models-together%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Could you provide the outome of your research? There is no evidence, that you search it by yourself. One of ideas of this website is to research by yourself, then ask.
$endgroup$
– wind
Dec 20 '18 at 6:13
$begingroup$
@wind This is a valid question and somewhat common idea for many engineers in data science that needs clarification in my opinion. There is no need to ask for the results of his research when he in fact is in the middle of it.
$endgroup$
– wacax
Dec 20 '18 at 15:01