public void update ( Instance instance ) throws Exception { // better to change // to addInstance if ( m_Instances == null ) throw new Exception ( "No instances supplied yet. Have to call " + "setInstances(instances) with a set of Instances " + "first." ) ; addInstanceInfo ( instance ) ; addInstanceToTree ( instance , m_Root ) ; }
Adds one instance to the KDTree . This updates the KDTree structure to take into account the newly added training instance .