# Tag Info

-1

You could also inform the model of the imbalance itself (either a True/False or a "class weight") depending on which modelling method you are using.

-1

The purpose of a model will always be to minimize loss. not increase accuracy. so parameters of any model using any optimizer like adam optimizer(a common optimizer), will try to gain momentum towards parameter values where the loss is least, in other words "minimum deviation". models can overfit when: data is small Train to Test ratio imbalance model has ...

18

If you properly isolate your test set such that it doesn't affect training, you should only look at the test set accuracy. Here are some of my remarks: Having your model being really good on the train set is not a bad thing in itself. On the contrary, if the test accuracy is identical, you want to pick the model with the better train accuracy. You want to ...

0

It's an imbalanced classes problem, however, it's not a very imbalanced dataset. It's common question/task in interviews. You may get high accuracy because minor class has less weight in the model. This topic has been discussed several time here and here.

1

Decision Tree does assign the label based on majority given the attribute test condition and its value. Regarding the class label assignment- In case DT has a longer depth, there might not be enough instance left for a certain branch/test condition/node . then this might not be the reliable estimation of the class label statistically. This is also called ...

1

1. Data Preparation By default, train_test_split will assume your train:test split to be 75:25 if you don't declare otherwise for either the test_size or train_size parameters. See here. For your decision tree, you don't declare this and so you test on 25% of the data, whereas you explicitly state in your data preparation for the random forest algorithm ...

3

Yes. With y being a 1d array of integers (as after LabelEncoder), sklearn treats it as a multiclass classification problem. With y being a 2d binary array (as after LabelBinarizer), sklearn treats it as a multilabel problem. Presumably, the multilabel model is predicting no labels for some of the rows. (With your actual data not being multilabel, the sum ...

0

After trying to recreate the issue with random numbers (and failing initially), I figured out that the problem comes from the fact that the x_train data that I'm using contains columns that have a very small, near-zero values. To recreate, the first section is only run once: scale = 0.0001 # making this larger eliminates the issue x_train = np.random....

1

I believe it will be difficult to answer this question w/o knowing the underlying data. Let's suppose, N1 is from men's football and N2 is from women's football history then both should be treated as separate data entity or should be mixed to create train/test set if we have a compelling need. What I will suggest - Check the Mean, Max, Min, ...

0

Word embedding techniques can be adapted to obtain a representation of each document as a single vector, i.e. "Doc2Vec". A naive approach to Doc2Vec is to simply sum the word embedding vectors in each document, and divide each element in this vector by its length. For a better approach to Doc2Vec, see Mikolov et al's paper: Distributed Representations of ...

1

I understood it wrong ,here is the paper which discuss using multiple data set for the same classifier- http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.141.3142&rep=rep1&type=pdf They conclude- " We theoretically and empirically analyzed three families of statistical tests that can be used for comparing two or more classifiers over ...

2

Welcome! You haven't given us enough information to be able to diagnose this issue completely, but you should check your grid search code to see how each cross-validated model is being trained and note which parameters are different from those used with the 92% model. If it has something to do with the unbalanced data, it's because you're not stratifying ...

2

With decision trees you cannot directly get the positive or negative effects of each variable as you would with say a linear regression through the coefficients. Its just not the way decision trees work. As you point out, the training process involves finding optimal features and splits at each node by looking at the gini index or the mutual information with ...

0

You could try to predict difference $dy = Y_{t+1} - Y_{t}$, not the $Y_{t+1}$ itself. Intuitively, the weather today is good starting prediction for the weather tomorrow. Secondly, with time series, the seasoning is quite important. You usually would like to use models like ARIMA that takes this into account. Lastly, it could be just don't enough data to ...

Top 50 recent answers are included