5 ms·
My quick and dirty answers are below. I'm thinking of moving jobs within the next year so I could use the practice. Can anyone do better? > How do you treat co
by soVeryTired 9y ago
My quick and dirty answers are below. I'm thinking of moving jobs within the next year so I could use the practice. Can anyone do better?
> How do you treat colinearity?
Throw away the redundant part of the data
> How will you deal with unbalanced data where the ratio of negative and positive is huge?
This is very problem-dependent, but it's got the potential to wreak havoc with your learning algorithms. You might get seemingly good results by e.g. always predicting positive. Think carefully about your loss function.
> How will you decide whether a customer will buy a product today or not given the income of the customer, location where the customer lives, profession and gender? Define a machine learning algorithm for this.
This is a messy combination of continuous, categorical, and binary data. I'd encode the data in a vector [salary, x-y co-ords, one-hot encoding of profession, and binary indicator for gender]. Something like a random forest will probably get you most of the way there. Unusual professions could mess with the algorithm, so consider grouping by industry or averaging with a model that omits the profession data.
> Is it useful to apply PCA to your data before SVM classification?
Probably, but it could be data dependent. Semi-supervised learning often improves machine learning models, and it'll lower the dimensionality of your inputs, which will make training / hyperparameter search far more efficient.
> How do you compare a neural network that has one layer, one input and output to a logistic regression model?
Not entirely sure I understand the question, but a NN is basically just nested logistic regression, depending on the activation function.
> From a long sorted list and a short 4 element sorted list, which algorithm will you use to search the long sorted list for 4 elements.
To be honest, I'd use binary search and call it a day. I realise this isn't the answer you're looking for.
> How will inspect missing data and when are they important for your analysis?
You might try to impute the missing data from similar datapoints. Maybe use something like K nearest neighbours on the non-missing components to deduce the missing values. Got to be careful doing this though, since it could massively bias your analysis: consider using a special encoding for "missing data" too.
> Estimate the probability of a disease in a particular city given that the probability of the disease on a national level is low.
This is a tough one, since there are so many ways to answer it. I think I'd start by writing down a list of factors that might allow a high prevalence of the disease locally despite a low prevalence nationally. Weather? Local wildlife? Proximity to major transport hubs? Then I might suggest a simple model like naive Bayes.
- screye 9y agoI will try. > How do you treat colinearity? Use an LASSO as a feature selector or regularizer. > How will you deal with unbalanced data where the ratio of negative and positive is huge? User F1 score instead of accuracy as a performance metric. Try using cascade classifier. > How will you decide whether a customer will buy a product today or not given the income of the customer, location where the customer lives, profession and gender? Define a machine learning algorithm for this. More or less, the same as what you said. > Is it useful to apply PCA to your data before SVM classification? No, since kernel-SVM optimization is dependent on data (similarity) and not features. Also, we will be projecting the data into a basis expanded space anyways, so the dimensional reduction would be redundant. > How do you compare a neural network that has one layer, one input and output to a logistic regression model? An MLP-NN is the same as a logistic regressor, if all connections as 1-1 (no basis expansion), no activation function in the data-1st layer connection and Sigmoid as activation function in the 1st layer-output connection. > From a long sorted list and a short 4 element sorted list, which algorithm will you use to search the long sorted list for 4 elements. I am dreadfully bad at core CS questions...throw some AI questions at me. XD > How will inspect missing data and when are they important for your analysis? You might try to impute the missing data from similar datapoints. Maybe use something like K nearest neighbours on the non-missing components to deduce the missing values. Got to be careful doing this though, since it could massively bias your analysis: consider using a special encoding for "missing data" too. Love your solutions. I might also try using cascade classifiers. > Estimate the probability of a disease in a particular city given that the probability of the disease on a national level is low. tough question. Would probably involve me asking a lot of questions about what data I have to play with. Very interview specific.
- SubiculumCode 9y agoI am not a data scientist, just a researcher in cog neuro. With multicollinearity, I'd first want to know whether these variables are meant to measure the same latent construct. If so, creating a latent factor in a SEM seems the way to go. Lassos and ridge regression I've heard of, but I know very little, except thatse methods can find use when using fmri voxel timeseries...
- 9y ago