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 ...
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 ...
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 ...
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 ...
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.
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.
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.
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.
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 ...
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 ...