Skip to content

Cant get the reported result for random forest  #17

@aliosia

Description

@aliosia

Thanks for sharing the code and dataset,
I couldn't find the random forest code in the repo, and I tried to train it myself but I couldn't get the accuracy reported in the paper:

RF/Frequential 51.12 / 3.83

RF/Temporal 60.87 / 3.51

My code is like:

participants = np.load('../data/PhyDAA/Dataset/participant.npy')  
labels = np.load('../data/PhyDAA/Dataset/Label.npy')  
freqfeature = np.load('../data/PhyDAA/Dataset/Array/freq_band.npy')  
tempfeature = np.load('../data/PhyDAA/Dataset/Array/hjorth.npy')  
feature = freqfeature.reshape(freqfeature.shape[0], -1)  
feature = tempfeature.reshape(tempfeature.shape[0], -1)  
logo = LeaveOneGroupOut()  
rf = RandomForestClassifier()  
accs = cross_val_score(rf, feature, labels, groups=participants, cv=logo)  
print(accs.mean(), accs.std())  

I get 49% and 53% instead of 51% and 60%. Do you have any idea? maybe setting wrong the RF parameters :?
Also the deviations are much more than the reported ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions