Gini Index calculation for near duplicate rows My data set has near duplicate rows because there are multiple rows for each employee depending on how long they have stayed in the organization. Therefore, employee Ann has 3 rows, Bob has 2 rows etc.  Most features in the data set do not change over time. I am dropping the EmpID and time and running a classification on the other features.
Since some features don't change over time, they are repeated. Some repeated thrice, some twice depending on how many years the employee has been in the organization in the 3 year data taken for the study.
Will this adversely impact Gini Index calculation (or entropy) since some are repeated more number of times ? By doing this am I giving more weight to an employee who has stayed longer when I shouldn't be ?
For example, Ann has Feature4 repeated thrice while Diane has only once. Should I consider rolling up so, that I have one row per employee ?
I am trying Random Forest for classification. I believe Gini is used for node selection / split. Hence my question.
EmpID   time  Feature1  Feature2    Feature3  Feature4  Feature5 Feature6 Target   
Ann     1     Commence  Female      20        Ref-Yes   3.6      Good        0  
Ann     2     Not       Female      21        Ref-Yes   4.0      Good        0
Ann     3     Not       Female      22        Ref-Yes   3.2      Good        0
Bob     2     Commence  Male        19        Ref-No    2.6      Avg         0
Bob     3     Not       Male        20        Ref-No    2.7      Avg         1
Cathy   2     Commence  Female      24        Ref-No    1.6      Good        1
Diane   3     Commence  Female      37        Ref-Yes   6.6      Very Good   1

 A: I will use the notation used here: https://stats.stackexchange.com/a/44404/2719
Let's consider this toy dataset:
EmpID   Feature2    Feature4  Target   
Ann     Female      Ref-Yes   0  
Ann     Female      Ref-Yes   0
Bob     Male        Ref-No    0
Cathy   Female      Ref-No    1

You can compute the $\Delta$ for Gini impurity for each feature:
$$
\Delta(Feature2,Target) = 1 - (3/4)^2 - (1/4)^2 - 3/4\Big( 1 - (2/3)^2 - (1/3)^2\Big) - 1/4 \cdot 0 \approx 0.041
$$
$$
\Delta(Feature4,Target) = 1 - (3/4)^2 - (1/4)^2 - 1/2 \cdot 0 - 1/2 \Big( 1 - (1/2)^2 - (1/2)^2\Big) \approx 0.125
$$
According to this, $Feature4$ seems to be better than $Feature2$. Thus a decision tree induction algorithm (including Cart and Random Forest) would choose to split the node based on $Feature4$
If you remove the duplicated Ann this will be the dataset and the $\Delta$:
EmpID   Feature2    Feature4  Target     
Ann     Female      Ref-Yes   0
Bob     Male        Ref-No    0
Cathy   Female      Ref-No    1

$$
\Delta(Feature2,Target) = 1 - (2/3)^2 - (1/3)^2 - 2/3\Big( 1 - (1/2)^2 - (1/2)^2\Big) - 1/3 \cdot 0 \approx 0.11
$$
$$
\Delta(Feature4,Target) = 1 - (2/3)^2 - (1/3)^2 - 1/3 \cdot 0 - 2/3\Big( 1 - (1/2)^2 - (1/2)^2\Big) \approx 0.11
$$
The $\Delta$ are the same which implies that the prediction power of the two feature is the same.
In general, if you leave such duplicates it would mess up the $\Delta$ calculations.
