20

There are a couple of nuances here. Complexity question very important - ocams razor CV - is this trully the case 84%/83% (test it for train+test with CV) Given this, personal opinion: Second one. Better to catch general patterns. You already know that first model failed on that because of the train and test difference. 1% says nothing.


13

It depends mostly on the problem context. If predictive performance is all you care about, and you believe the test set to be representative of future unseen data, then the first model is better. (This might be the case for, say, health predictions.) There are a number of things that would change this decision. Interpretability / explainability. This is ...


11

As a rule of thumb, removing outliers without a good reason to remove outliers rarely does anyone any good. Without a deep and vested understanding of what the possible ranges exist within each feature, then removing outliers becomes tricky. Often times, I see students/new hires plot box-plots or check mean and standard deviation to determine an outlier ...


7

ML algorithms all learn a set of numbers associated with whatever model you're training. For a neural network, it's the weights on the network links. For regression, it's the coefficients. And so on. These numbers you can store and use later (most ML libraries have utilities for doing this). You use the coefficients to make predictions on data on which you ...


7

Why not, because the risks outweigh the benefits. It might work in images, where loss of pixels / voxels could be somewhat "reconstructed" by other layers, also pixel/voxel loss is somewhat common in image processing. But if you use it on other problems like NLP or tabular data, dropping columns of data randomly won't improve performance and you will risk ...


7

The first has an accuracy of 100% on training set and 84% on test set. Clearly over-fitted. Maybe not. It's true that 100% training accuracy is usually a strong indicator of overfitting, but it's also true that an overfit model should perform worse on the test set than a model that isn't overfit. So if you're seeing these numbers, something unusual is going ...


7

This is an implementation detail, and I wouldn't necessarily rely on this behavior, but presently in sklearn, it will choose the "first" class. The predict method calls for the probability prediction, then takes the argmax, which in case of ties takes the first one: https://github.com/scikit-learn/scikit-learn/blob/fd237278e/sklearn/tree/_classes....


6

Good question and welcome to Datascience Imagine you have the tree as follows. Machine Learning Models | ---------------------------------------------------- | | Supervised Unsupervised |...


6

Tophat makes some great points. Another thing to consider is that you removed close to 20 percent of your data by removing the "outliers" which leads me to believe that they really aren't outliers, rather, just extreme values. Certainly, there may be an outlier on one dimension that you should look at, but with such a rich data set, an extreme value in one ...


6

The reason is kernel shap sends data as numpy array which has no column names. so we need to fix it as follows: def model_predict(data_asarray): data_asframe = pd.DataFrame(data_asarray, columns=feature_names) return estimator.predict(data_asframe) Then, shap_kernel_explainer = shap.KernelExplainer(model_predict, x_train, link='logit') ...


5

I am not aware of a specific definition. Wikipedia does not mention such a term either. I would prefer "components", "individual/constituent models", or something like that. If you definitely want to find a "correct" term, one way to discover it (if it exists) is to look into an ensemble learning early paper. To arrive at one, a good way is to search for a ...


5

There may be a few reason this is happening. First of all, check your code. 100% accuracy seems unlikely in any setting. How many testing data points do you have? How many training data points did you train your model on? You may have made a coding mistake and compared two same list. Did you use different test set for testing? The high accuracy may be due ...


5

I'm not very sure what you mean by "60% accuracy using AUC". Accuracy and AUC are two different metrics... I'm going to answer as if you're referring to classification accuracy, since that's in your title and the first sentence of your post. First of all, don't use accuracy to evaluate performance on imbalanced data! Your dataset has an imbalance ratio of ...


5

Before I answer your question, let me tell you this, You can go on and train a model from scratch, but you will definitely end up using one of the object detection architectures, be it Mask R-CNN, Faster R-CNN, Yolo or SSD. Your problem is a simplified version of what these architectures are trying to solve. These are generic object detectors that some of ...


5

The number of parameters is 60,344,232, according to: https://resources.wolframcloud.com/NeuralNetRepository/resources/ResNet-152-Trained-on-ImageNet-Competition-Data Although, from https://arxiv.org/pdf/1512.03385.pdf (page 6), it looks like an ensemble was used for ILSVRC 2015: "We combine six models of different depth to form an ensemble (only with two ...


4

The explanation is simple, assume you have the following values: True Positives (TP) = 1 True Negatives (TN) = 998 False Positives (FP) = 1 False Negatives (FN) = 1 Accuracy = (TP + TN) / (TP + TN + FP + FN) = 999/1001 = 0.998 Precision = TP / (TP + FP) = 1/2 = 0.5 Recall = TP / (TP + FN) = 1/2 = 0.5 In summary you have an unbalanced dataset i.e. the ...


4

The default hyper-parameters of the DecisionTreeClassifier allows it to overfit your training data. The default min_samples_leaf is 1. The default max_depth is None. This combination allows your DecisionTreeClassifier to grow until there is a single data point at each leaf. Since you are having $100\%$ accuracy, I would assume you have duplicates in your ...


4

It is not uncommon to use dropout on the inputs. In the original paper the authors usually use dropout with a retention rate of 50% for hidden units and 80% for (real-valued) inputs. For inputs that represent categorical values (e.g. one-hot encoded) a simple dropout procedure might not be appropriate. They also argue that dropout applied to the inputs of ...


4

I think you should consider time series modeling instead of observation based classification models. In the letter, you are propagating error in each prediction year. I would use ARIMA, LSTMs, maybe semi-supervised models and motif discovery techniques.


4

I suggest to try a log transformation. This has two potential benefits: The range of x values becomes smaller Your transformed data might be closer to resemble a normal distribution (only relevant for some models, e.g. not for trees) Here are two toy examples to illustrate: Toy example 1 s = np.random.lognormal(3, 1, 1000) plt.hist(s, 100) plt.show() ...


3

It depends on the ensemble model technique. If you are going to use a bagging approach then the term individual models or alternative models is the appropriate. But in the case of boosting methods the appropriate term is weak learner (classifier). Boosting algorithms is a family of machine learning algorithms that convert weak learners to strong ones. A weak ...


3

I have heard people calling them "weak learners" many times, but this is only when they are not very acurate themselves.


3

1) Supervised learning is most of the time the process of learning a mapping, e.g relation, of input features x (sample) to an output y (often labels). Unsupervised learning doesn’t not use labels /output y to learn a relation between the samples and possible labels (ex: clustering). 2) Classification and regression are two types of supervised learning (...


3

Looks like a special case for incremental learning / life-long learning. There are many papers in this line of work: https://arxiv.org/abs/1611.07725 https://openreview.net/forum?id=BkloRs0qK7 Most try to preserve the model parameters in a way that reduces the loss of previous knowledge ("catastrophic forgetting"), but some also try to find (or keep) some ...


3

I've been in that situation before, there's this article on medium where the guy uses keras,tf for predicting credit card fraud detection using autoencoders which have Dense layers, but you can try the same with LSTM, can't say for sure whether it will work, but if in case it doesn't work, please try Conv1d because nowadays convolutional networks are more ...


3

Welcome to Data Science SE! As a short answer has been given, I'll give a longer overview of the problem, starting with a analogous human approach. But first, a formal definition of machine learning from Mitchell: "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at ...


3

Adding to what @Super_John said, if adding continents as a Feature, then you can also probably have at-least 2 more features as well, The Latitude The Longitude Also add another temporary column to indicate the Source (like $1$ to $1st$ df, $2$ to $2nd$ df etc), So that we can add Colors to the k-means So now we can have a k-means Cluster to see whether ...


3

Although generally in training a machine learning model, the more data you have the better for training generalised models, that may not be the case here. Given that the two datasets were collected in completely different environments, they may have completely different distributions. In this case, training a model on the combined dataset may even reduce ...


3

I've read that paper so many times before in so many ways. What I can say on the matter is that the paper does not describe explicitly what the framework particularly does. It just gives an hint of their intuitive idea of bundling of the features in an efficient way. But specificly, it does not say that it does a 'reversion of one-hot-encoding' in particular ...


3

In this article https://arxiv.org/abs/1711.09784 the authors the fits decision tree to a neural network in order to understand what is the neural network does. Is it what you are looking for?


Only top voted, non community-wiki answers of a minimum length are eligible