Weighted Fisher Discriminant Analysisin the Input and Feature Spaces