Refine search
/** * Creates a deep copy of the given estimator using serialization. * * @param model the estimator to copy * @return a deep copy of the estimator * @exception Exception if an error occurs */ public static Estimator makeCopy(Estimator model) throws Exception { return (Estimator) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given estimator using serialization. * * @param model the estimator to copy * @return a deep copy of the estimator * @exception Exception if an error occurs */ public static Estimator makeCopy(Estimator model) throws Exception { return (Estimator) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given filter using serialization. * * @param model the filter to copy * @return a deep copy of the filter * @throws Exception if an error occurs */ public static Filter makeCopy(Filter model) throws Exception { return (Filter) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given classifier using serialization. * * @param model the classifier to copy * @return a deep copy of the classifier * @exception Exception if an error occurs */ public static Classifier makeCopy(Classifier model) throws Exception { return (Classifier) new SerializedObject(model).getObject(); }
/** * Returns a copy of the object. * * @param obj the object to copy * @return the copy * @throws Exception if copying fails */ protected Serializable copy(Serializable obj) throws Exception { return (Serializable) new SerializedObject(obj).getObject(); }
/** * Creates a deep copy of the given filter using serialization. * * @param model the filter to copy * @return a deep copy of the filter * @throws Exception if an error occurs */ public static Filter makeCopy(Filter model) throws Exception { return (Filter) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given associator using serialization. * * @param model the associator to copy * @return a deep copy of the associator * @exception Exception if an error occurs */ public static Associator makeCopy(Associator model) throws Exception { return (Associator) new SerializedObject(model).getObject(); }
public Measure makeCopy() throws Exception { return (Measure) new SerializedObject(this).getObject(); } }
/** * Creates a deep copy of the given clusterer using serialization. * * @param model the clusterer to copy * @return a deep copy of the clusterer * @exception Exception if an error occurs */ public static Clusterer makeCopy(Clusterer model) throws Exception { return (Clusterer) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given clusterer using serialization. * * @param model the clusterer to copy * @return a deep copy of the clusterer * @exception Exception if an error occurs */ public static Clusterer makeCopy(Clusterer model) throws Exception { return (Clusterer) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given associator using serialization. * * @param model the associator to copy * @return a deep copy of the associator * @exception Exception if an error occurs */ public static Associator makeCopy(Associator model) throws Exception { return (Associator) new SerializedObject(model).getObject(); }
/** * Creates a deep copy of the given classifier using serialization. * * @param model the classifier to copy * @return a deep copy of the classifier * @exception Exception if an error occurs */ public static Classifier makeCopy(Classifier model) throws Exception { return (Classifier) new SerializedObject(model).getObject(); }
private weka.core.converters.Saver makeCopy() throws Exception { return (weka.core.converters.Saver) new SerializedObject(m_SaverTemplate) .getObject(); }
private weka.core.converters.Saver makeCopy() throws Exception { return (weka.core.converters.Saver) new SerializedObject(m_SaverTemplate) .getObject(); }
@Override public void undo() { try { SerializedObject so = new SerializedObject(m_CPT); m_Distributions[m_nTargetNode] = (Estimator[]) so.getObject(); } catch (Exception e) { e.printStackTrace(); } } // undo
public MultiLabelLearner makeCopy() throws Exception { return (MultiLabelLearner) new SerializedObject(this).getObject(); }
SetDistributionAction(int nTargetNode, double[][] P) { try { m_nTargetNode = nTargetNode; SerializedObject so = new SerializedObject(m_Distributions[nTargetNode]); m_CPT = (Estimator[]) so.getObject(); ; m_P = P; } catch (Exception e) { e.printStackTrace(); } } // c'tor
SetDistributionAction(int nTargetNode, double[][] P) { try { m_nTargetNode = nTargetNode; SerializedObject so = new SerializedObject(m_Distributions[nTargetNode]); m_CPT = (Estimator[]) so.getObject(); ; m_P = P; } catch (Exception e) { e.printStackTrace(); } } // c'tor
@Override public void undo() { try { SerializedObject so = new SerializedObject(m_CPT); m_Distributions[m_nTargetNode] = (Estimator[]) so.getObject(); } catch (Exception e) { e.printStackTrace(); } } // undo
/** * Creates a copy of the object. * * @param obj the object to copy */ protected Object copy(Object obj) { SerializedObject so; Object result; try { so = new SerializedObject(obj); result = so.getObject(); } catch (Exception e) { result = null; e.printStackTrace(); } return result; }