Package weka.core

Examples of weka.core.SerializedObject


   * @param source the object to copy
   * @return a copy of the source object
   * @exception Exception if the copy fails
   */
  public static Object makeCopy(Object source) throws Exception {
    SerializedObject so = new SerializedObject(source);
    Object result = so.getObject();
    return result;
  }
View Full Code Here


   * @param source the object to copy
   * @return a copy of the source object
   * @exception Exception if the copy fails
   */
  public static Object makeCopy(Object source) throws Exception {
    SerializedObject so = new SerializedObject(source);
    Object result = so.getObject();
    return result;
  }
View Full Code Here

   * The environment variables.
   */
  protected transient Environment m_env;
 
  private weka.core.converters.Saver makeCopy() throws Exception {
    return (weka.core.converters.Saver)new SerializedObject(m_SaverTemplate).getObject();
  }
View Full Code Here

    grph = ((Drawable)clusterer).graph();
        } catch (Exception ex) {
        }
      }
      // copy full model for output
      SerializedObject so = new SerializedObject(clusterer);
      fullClusterer = (Clusterer) so.getObject();
     
      ClusterEvaluation eval = new ClusterEvaluation();
      eval.setClusterer(clusterer);
      switch (testMode) {
        case 3: case 5: // Test on training
View Full Code Here

      grph = ((Drawable)classifier).graph();
    } catch (Exception ex) {
    }
        }
        // copy full model for output
        SerializedObject so = new SerializedObject(classifier);
        fullClassifier = (Classifier) so.getObject();
      }
     
      switch (testMode) {
        case 3: // Test on training
        m_Log.statusMessage("Evaluating on training data...");
View Full Code Here

      Vector metaDetails = new Vector();
      metaDetails.add(displayName);
      metaDetails.add(serialized);
      metaDetails.add(scaledIcon);
      SerializedObject so = new SerializedObject(metaDetails);
      Vector copy = (Vector)so.getObject();

      JTreeLeafDetails metaLeaf = new JTreeLeafDetails(displayName, copy, scaledIcon);


      DefaultMutableTreeNode newUserComp = new DefaultMutableTreeNode(metaLeaf);
View Full Code Here

    m_beanLayout.removeAll();
    BeanInstance.init();
    BeanConnection.init();


    SerializedObject so = new SerializedObject(v);
    Vector copy = (Vector)so.getObject();

    Vector beans = (Vector)copy.elementAt(0);
    Vector connections = (Vector)copy.elementAt(1);

    // reset environment variables
View Full Code Here

      BeanConnection.getConnections(m_mainKFPerspective.getCurrentTabIndex());
    detachFromLayout(beans);
    v.add(beans);
    v.add(connections);

    SerializedObject so = new SerializedObject(v);
    Vector copy = (Vector)so.getObject();

    //    tempWrite(beans, connections);

    integrateFlow(beans, connections, true, false);
    return copy;
View Full Code Here

      m_nParent = nParent;
      m_nParents = new int[getNrOfParents(nChild)];
      for (int iParent = 0; iParent < m_nParents.length; iParent++) {
        m_nParents[iParent] = getParent(nChild, iParent);
      }
      SerializedObject so = new SerializedObject(m_Distributions[nChild]);
      m_CPT = (Estimator[]) so.getObject();
      } catch (Exception e) {
        e.printStackTrace();
      }
    } // c'tor
View Full Code Here

      }
    } // c'tor

    public void undo() {
      try {
        SerializedObject so = new SerializedObject(m_CPT);
        m_Distributions[m_nChild] = (Estimator[]) so.getObject();
        ParentSet parentSet = new ParentSet();
        for (int iParent = 0; iParent < m_nParents.length; iParent++) {
          parentSet.addParent(m_nParents[iParent], m_Instances);
        }
        m_ParentSets[m_nChild] = parentSet;
View Full Code Here

TOP

Related Classes of weka.core.SerializedObject

Copyright © 2015 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.