protected void loadFromString(String s) {
		String fields[] = s.split(":");
		if (fields.length != 2) {
			throw new IllegalArgumentException("Invalid base model string");			
		}
		
		String subs[] = fields[0].split("/");
		if (subs.length != p + 2) {
			throw new IllegalArgumentException("Invalid base model string");
		}
		patternHist = new float[p + 2];
		for (int i = 0; i < p + 2; i++) {
			try {
				patternHist[i] = Float.parseFloat(subs[i]);
			} catch (NumberFormatException e) {
				throw new IllegalArgumentException("Invalid base model string");
			}
		}
		
		if (b > 0) {
			subs = fields[1].split("/");
			if (subs.length != b) {
				throw new IllegalArgumentException("Invalid base model string");
			}
			varHist = new float[b];
			for (int i = 0; i < b; i++) {
				try {
					varHist[i] = Float.parseFloat(subs[i]);
				} catch (NumberFormatException e) {
					throw new IllegalArgumentException("Invalid base model string");	
				}
			}
		}
	}