# Stratified Sampling on Random Forest

I am working on a project to detect crops from satellite images by prediction. To do so, I use Random Forest model. I discussed with some people about whether to give sample weights on each tree in the model but still couldn't get a clear understanding.

I have 14 classes consisting of water, surface, vegetation, and crops on an area of my interest. Without even knowing the real distribution of these classes, does it make sense to give sample weights? My task is actually finding these weight. Shouldn't giving them beforehand mislead the results?

I couldn't find enough resources on the web about sample weights in randomforest. If you may give me some intutions, it'd be the best.

Here is a summary of my data:

It is a raster time series data with 15 clean images throughout 6 months (15 dates)

Each image has 4 bands - red, green, blue, NIR

We can generate another band called NDVI as NDVI = (NIR - Red) / (NIR + Red)

We can also calculate GLCM measures which can give us texture information. I calculated 3 GLCM measure - mean, entropy, and contrast. Please beware that GLCM mean is different than mean. You can calculate those for each band

Date variable: 15

Band variable: 5 for each date

GLCM: 3 for each band

Total variable: 15x5x3 = 225

Region of Interest Dimension: 20086 x 19754 pixels (3x3 m resolution)

It means it is quite large data to predict. And my area is x4 of this area. I had to split it to process even on the cloud.

A quick summary of my training data (These are collected by drawing the fields and labeling them), it is only from one part of the image:

• 0. Welcome to the CV community. 1. Can you please give a few more details about what you try to achieve. 2. How big is your dataset and what is the nature of it. – usεr11852 Aug 3 '19 at 15:51
• Hi, I tried to give some intuition. My case is quite complex so I didn't want to give more details, but I could add more if it's more appropriate – Batuhan Kavlak Aug 3 '19 at 16:31