added fischer discriminant and explicit range specification for weights