public boolean input(Instance instance) throws Exception {
    if (getInputFormat() == null) {
      throw new IllegalStateException("No input instance format defined");
    }
    if (m_NewBatch) {
      resetQueue();
      m_NewBatch = false;
    }
    Instance inst = (Instance) instance.copy();

    //compute norm of inst
    double iNorm = 0;
    for(int i=0;i<getInputFormat().numAttributes();i++){
        if (getInputFormat().classIndex() == i) continue;
        if (!getInputFormat().attribute(i).isNumeric()) continue;
        iNorm += Math.pow(Math.abs(inst.value(i)),getLNorm());
    }
    iNorm = Math.pow(iNorm,1.0/getLNorm());
    
    //normalize inst
    for(int i=0;i<getInputFormat().numAttributes();i++){
        if (getInputFormat().classIndex() == i) continue;
        if (!getInputFormat().attribute(i).isNumeric()) continue;
        inst.setValue(i,inst.value(i)/iNorm*getNorm());
    }
    
    push(inst);
    return true;
  }