private void setLinear() throws Exception {
      //then set default behaviour for node.
      //set linear regression combined with attribute filter
      
      //find the attributes used for splitting.
      boolean[] attributeList = new boolean[m_training.numAttributes()];
      for (int noa = 0; noa < m_training.numAttributes(); noa++) {
	attributeList[noa] = false;
      }
      
      TreeClass temp = this;
      attributeList[m_training.classIndex()] = true;
      while (temp != null) {
	attributeList[temp.m_attrib1] = true;
	attributeList[temp.m_attrib2] = true;
	temp = temp.m_parent;
      }
      int classind = 0;
      
      
      //find the new class index
      for (int noa = 0; noa < m_training.classIndex(); noa++) {
	if (attributeList[noa]) {
	  classind++;
	}
      }
      //count how many attribs were used
      int count = 0;
      for (int noa = 0; noa < m_training.numAttributes(); noa++) {
	if (attributeList[noa]) {
	  count++;
	}
      }
      
      //fill an int array with the numbers of those attribs
      int[] attributeList2 = new int[count];
      count = 0;
      for (int noa = 0; noa < m_training.numAttributes(); noa++) {
	if (attributeList[noa]) {
	  attributeList2[count] = noa;
	  count++;
	}
      }
      
      m_filter = new Remove();
      ((Remove)m_filter).setInvertSelection(true);
      ((Remove)m_filter).setAttributeIndicesArray(attributeList2);
      m_filter.setInputFormat(m_training);
      
      Instances temp2 = Filter.useFilter(m_training, m_filter);
      temp2.setClassIndex(classind);
      m_classObject = new LinearRegression();
      m_classObject.buildClassifier(temp2);
    }