Added a boolean switch to select importance or frequency style weights.