New answers tagged

0

Suppose I take a part of the data as validation data, which contains whole blocks. If I split the remaining rows randomly in training and test data, the accuracy of the learned Random Forest is very high on training and test data but very low on the validation data. This is due to the fact that the Random Forest learns in this case to identify the individual ...


0

You can try XGBoost or LightGBM, they often perform better than Random Forest Try do not remove missing values, complex ensemble models such as RF and GBM treats it well, may be you lost some useful information doing so, especially if you have large percent of your data missing in some features Try do not remove outliers, sometimes it's better to have it in ...


0

Since you seem to have the same number of rows per sample, perhaps the underlying process is such that it makes sense to treat the data as 2D or unpack into 12 features, as @Arnaud describes. (This seems to depend on the four rows being ordered according to some implicit rule?) More generally though, this is called "multiple instance learning." Probably ...


2

What about doing a concatenation of your rows (i.e. Attr1 -> Attr12) , such that you now have 3*4 features (because 4 rows of 3 features) as an input to a multiclass classification model? For instance, first sample would be described by : X = [1.1, 1.4, 2.5, 2.3, 2.5, 2.7, 1.1, 1.6, 1.9, 1.5, 1.6, 1.7] y = "A" Otherwise, there is no issue in giving 2D or ...


0

The second table is simply saying rows 1 - 4 are 4 different examples of class A, rows 5 - 8 are 4 separate example of class B and the rest are 4 examples of class C. Just modify the table so the target label column has 12 rows the first for having the value A, the next 4 having the value B and the final 4 having the value C. Good luck!


1

Now with the new version 0.22.1, you can! It does pruning based on minimal cost-complexity pruning: the subtree with the largest cost complexity that is smaller than ccp_alpha will be chosen. https://scikit-learn.org/stable/auto_examples/tree/plot_cost_complexity_pruning.html


0

A common approach for this is LDA (Latent Dirichlet Allocation), which not only gives you the groups, but also a way to identify the topics of the groups by giving you the most common or distinctive words for each topic.


0

you can develop simple predictive model like Linear regression to predict price of house given other features value, also analyse the features weight/coefficient and optimize your linear regression model.


0

One thing that wasn't mentioned in other comments regarding the first model is optimistic predictions biased toward the training set. This could be helpful or destructive, depends on the context. With that being said, without any additional information - In a production environment, robustness and consistency (Alongside with latency and throughput) are ...


1

I did something similar a while ago. We wanted to classify several types of pdf. We first extracted the text of the documents. We created NLP features with the text Then added pdf metadata: size of the file, number of pages, name of the document... We then built a classification model with a few samples and did Active Learning I guess that you could also ...


Top 50 recent answers are included