Commit cab28086 authored by lafabregue's avatar lafabregue

integration of multicubetools project

parent 3749b1ec
......@@ -22,7 +22,7 @@ import jcl.learning.LearningMethod;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.Progressable;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -21,9 +21,9 @@ import jcl.learning.methods.monostrategy.evidence.AgglomerateEvidence;
import jcl.learning.methods.monostrategy.evidence.LearningResultEvidence;
import jcl.learning.methods.monostrategy.kmeans.LearningResultKmeans;
import jcl.utils.Matrix;
import jcl.utils.MemoryFlush;
import jcl.weights.ClassificationWeights;
import jcl.weights.Weights;
import multiCube.tools.util.MemoryFlush;
/**
* <p>
......
......@@ -12,9 +12,9 @@ import jcl.data.DataObject;
import jcl.data.SimpleData;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.kmeans.LearningResultKmeans;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import jcl.weights.LocalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -6,8 +6,8 @@ import java.util.List;
import jcl.data.DataObject;
import jcl.data.mask.Mask;
import jcl.utils.MemoryFlush;
import jcl.utils.Progressable;
import multiCube.tools.util.MemoryFlush;
/**
* <p>
......
......@@ -13,7 +13,7 @@ import jcl.jcld.RmiServer;
import jcl.jcld.database.SSHParameters;
import jcl.utils.Progressable;
import jcl.utils.Viewer;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,8 +9,8 @@ import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.utils.Progressable;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -29,8 +29,8 @@ import jcl.learning.methods.monostrategy.ahc.ParametersAHC;
import jcl.learning.methods.monostrategy.kmeans.LearningResultKmeans;
import jcl.utils.Progressable;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,7 +9,7 @@ import jcl.data.DataObject;
import jcl.learning.LearningMethod;
import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -9,7 +9,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* résultats de classification obtenus par l'algorithme AHC
......
......@@ -8,8 +8,8 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -6,7 +6,7 @@ import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Alexandre BLANSCHE
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,7 +9,7 @@ import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -11,7 +11,7 @@ import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.learning.methods.monostrategy.kmeans.ParametersKmeans;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author MARTAJ Mounir
......
......@@ -10,7 +10,7 @@ import jcl.data.attribute.AttributeNumerical;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT
......
......@@ -10,8 +10,8 @@ import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric HAUTEVILLE
......
......@@ -25,12 +25,12 @@ import jcl.data.mask.MultiIDIntArrayMask;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.utils.io.JCLModelExchange;
import jcl.weights.ClassificationWeights;
import jcl.weights.GlobalWeights;
import jcl.weights.LocalWeights;
import jcl.weights.Weights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......@@ -764,6 +764,9 @@ public class LearningResultKmeans extends LearningResult {
* @param newSeeds les nouveaux noyaux
*/
public void replaceSeeds(int k, Vector<KmeansSeed> newSeeds) {
for (KmeansSeed s : newSeeds) {
((LightHardSeed) s).setData(this.seeds.get(k).getData());
}
this.seeds.remove(k);
this.seeds.addAll(newSeeds);
((ParametersKmeans) this.params).nbClusters = this.seeds.size();
......
......@@ -6,7 +6,7 @@ import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class ConstraintKmeans extends LearningMethod {
......
......@@ -10,7 +10,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.kmeans.HardSeed;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class ResultConstraintKmeans extends LearningResult {
......
......@@ -6,7 +6,7 @@ import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class LocalKmeans extends LearningMethod {
......
......@@ -11,7 +11,7 @@ import jcl.data.DataObject;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.kmeans.HardSeed;
import jcl.learning.methods.monostrategy.kmeans.KmeansSeed;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class ResultLocalKmeans extends LearningResult {
......
......@@ -6,7 +6,7 @@ import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class HiddenKmeans extends LearningMethod {
......
......@@ -10,7 +10,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.kmeans.HardSeed;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
public class ResultHiddenKmeans extends LearningResult {
......
......@@ -10,7 +10,7 @@ import jcl.data.DataObject;
import jcl.learning.LearningResult;
import jcl.learning.methods.monostrategy.kmeans.HardSeed;
import jcl.learning.methods.monostrategy.kmeans.KmeansSeed;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT / Pierre GANCARSKI
......
......@@ -7,7 +7,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT / Pierre GANCARSKI
......
......@@ -9,7 +9,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* Classe de resultat d'un apprentissage par K-medoids
......
......@@ -8,7 +8,7 @@ import jcl.data.attribute.AttributeNumerical;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,8 +9,8 @@ import jcl.data.DataObject;
import jcl.data.attribute.AttributeNumerical;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.LocalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -4,7 +4,7 @@ import jcl.Classification;
import jcl.clustering.ClusteringResult;
import jcl.data.Data;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.learning.methods.ClassifierUtils;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -8,7 +8,7 @@ import jcl.data.Data;
import jcl.data.DataObject;
import jcl.evaluation.clustering.ClusteringEvaluation;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* @author Cedric WEMMERT
......
......@@ -32,9 +32,9 @@ import jcl.learning.methods.multistrategy.evosamarah.myversion.ExClassification;
import jcl.learning.methods.multistrategy.evosamarah.myversion.Logger;
import jcl.learning.methods.multistrategy.evosamarah.myversion.SamarahAgent;
import jcl.learning.methods.multistrategy.evosamarah.myversion.SetOfSamarahAgents;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import jcl.weights.GlobalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -32,9 +32,9 @@ import jcl.learning.methods.multistrategy.evosamarah.myversion.ExClassification;
import jcl.learning.methods.multistrategy.evosamarah.myversion.Logger;
import jcl.learning.methods.multistrategy.evosamarah.myversion.SamarahAgent;
import jcl.learning.methods.multistrategy.evosamarah.myversion.SetOfSamarahAgents;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import jcl.weights.GlobalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -9,7 +9,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* classe modélisant une classification hybride avec l'algorithme SAMARAH
......
......@@ -9,7 +9,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* classe modélisant une classification hybride avec l'algorithme SAMARAH
......
......@@ -27,7 +27,7 @@ import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.utils.GealMonitor;
import jcl.utils.GealMonitorRMI;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -6,8 +6,8 @@ import jcl.data.Data;
import jcl.evaluation.QualityIndex;
import jcl.learning.LearningParameters;
import jcl.learning.LearningResult;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.ClassificationWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -26,9 +26,9 @@ import jcl.learning.methods.ClassifierUtils;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.learning.methods.monostrategy.kmeans.*;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.utils.io.JCLModelExchange;
import jcl.weights.GlobalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -11,7 +11,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningParameters;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,7 +9,7 @@ import java.util.Vector;
import jcl.clustering.constraints.CannotLinkConstraint;
import jcl.clustering.constraints.Constraint;
import jcl.clustering.constraints.MustLinkConstraint;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......@@ -105,7 +105,7 @@ public class SamarahConflict {
//<<< test - start
FileWriter fw = null;
try {
fw = new FileWriter("log_samarah.log", true);
fw = new FileWriter("log_samarah"+eval.hybridClassification.getName()+".log", true);
} catch (IOException e) {
e.printStackTrace();
}
......
......@@ -23,8 +23,8 @@ import jcl.learning.methods.monostrategy.kmeans.KmeansSeed;
import jcl.learning.methods.monostrategy.kmeans.LearningResultKmeans;
import jcl.learning.methods.monostrategy.kmeans.ParametersKmeans;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.GlobalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -9,7 +9,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningParameters;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -2,7 +2,7 @@ package jcl.learning.methods.multistrategy.samarah2;
import java.util.Vector;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -11,7 +11,7 @@ import jcl.learning.LearningResult;
import jcl.learning.methods.multistrategy.samarah3.refinement.SetOfSamarahAgents;
import jcl.learning.methods.multistrategy.samarah3.refinement.VotingMethod;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* classe modélisant une classification hybride avec l'algorithme SAMARAH
......
......@@ -13,7 +13,7 @@ import jcl.learning.methods.multistrategy.samarah4.SamarahInfo;
import jcl.learning.methods.multistrategy.samarah4.SamarahMethod;
import jcl.learning.methods.multistrategy.samarah4.agents.LearningAgentSAM4_forImage;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
*
......
......@@ -23,8 +23,8 @@ import jcl.learning.methods.monostrategy.kmeans.KmeansSeed;
import jcl.learning.methods.monostrategy.kmeans.LearningResultKmeans;
import jcl.learning.methods.monostrategy.kmeans.ParametersKmeans;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.GlobalWeights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -10,7 +10,7 @@ import jcl.data.Data;
import jcl.learning.LearningMethod;
import jcl.learning.LearningParameters;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
......@@ -2,7 +2,7 @@ package jcl.learning.methods.multistrategy.xsamarah;
import java.util.Vector;
import jcl.utils.exceptions.MethodNotImplementedException;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
/**
* <p>
......
package jcl.utils;
import jcl.utils.exceptions.MethodNotImplementedException;
/**
*
* @author Baptiste LAFABREGUE
*
*/
public interface MemoryFlush {
/**
* <p>
* Fonction qui permet de demander la liberation de memoire pour les objets utilises.
*
* Attention cette fonction repose sur la simple instanciation a null des membres de la class
* consommant de la memoire. La liberation de memoire se faisant via le GC. Il peut d'ailleurs
* etre judicieux de suggere un GC via la fonction System.gc(); si cette fonction est
* appelee sur de nombreux objets ou des objets potentiellemnts volumineux.
* Il est donc imperatif d'eviter de creer de reference sur ces elements, ou au contraire
* de les referencer ailleurs si ils doivent etre reutilises
* <p>
*
* @throws MethodNotImplementedException
* si la methode n'implante pas cet operateur
*/
void flushMemory() throws MethodNotImplementedException;
}
package jcl.utils.exceptions;
/**
* <p>
* Classe decrivant les exceptions pour les methodes d'apprentissage
* n'implantant pas les operateurs de split, merge et reclass.
* </p>
*
* @author Cedric WEMMERT
*
*/
public class MethodNotImplementedException extends Exception {
public MethodNotImplementedException() {
super();
}
public MethodNotImplementedException(String s) {
super(s);
}
/** */
private static final long serialVersionUID = 6965245284498658739L;
}
......@@ -22,8 +22,8 @@ import jcl.learning.methods.ClassifierUtils;
import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.learning.methods.multistrategy.samarah.HybridClassification;
import jcl.utils.exceptions.JCLFormatException;
import jcl.utils.exceptions.MethodNotImplementedException;
import jcl.weights.Weights;
import multiCube.tools.util.exceptions.MethodNotImplementedException;
import weka.core.Attribute;
import weka.core.DenseInstance;
import weka.core.Instance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment