Random ferns classifier