Package edu.ucla.sspace.matrix

Examples of edu.ucla.sspace.matrix.AffinityMatrixCreator


            t.printStackTrace();
        }
    }
   
    protected SemanticSpace getSpace() {
        AffinityMatrixCreator creator = ReflectionUtil.getObjectInstance(
                argOptions.getStringOption('e'));
        if (argOptions.hasOption("edgeTypeParam"))
            creator.setParams(argOptions.getIntOption("edgeTypeParam"));

        SimilarityFunction edgeSim = new CosineSimilarity();
        SimilarityFunction kernelSim = ReflectionUtil.getObjectInstance(
                argOptions.getStringOption("edgeWeighting"));
        if (argOptions.hasOption("edgeWeighting"))
            kernelSim.setParams(argOptions.getIntOption("edgeWeightingParam"));
        creator.setFunctions(edgeSim, kernelSim);

        return new LocalityPreservingCooccurrenceSpace(creator);
    }
View Full Code Here


        this.linkCluster = new LinkClustering();
    }

    public static AffinityMatrixCreator createDefaultAffinityMatrixCreator() {
        SimilarityFunction simFunc = new CosineSimilarity();
        AffinityMatrixCreator creator =
            new NearestNeighborAffinityMatrixCreator();
        creator.setParams(10);
        creator.setFunctions(simFunc, simFunc);
        return creator;
    }
View Full Code Here

            t.printStackTrace();
        }
    }
   
    protected SemanticSpace getSpace() {
        AffinityMatrixCreator creator = ReflectionUtil.getObjectInstance(
                argOptions.getStringOption('e'));
        if (argOptions.hasOption("edgeTypeParam"))
            creator.setParams(argOptions.getIntOption("edgeTypeParam"));

        SimilarityFunction edgeSim = new CosineSimilarity();
        SimilarityFunction kernelSim = ReflectionUtil.getObjectInstance(
                argOptions.getStringOption("edgeWeighting"));
        if (argOptions.hasOption("edgeWeighting"))
            kernelSim.setParams(argOptions.getIntOption("edgeWeightingParam"));
        creator.setFunctions(edgeSim, kernelSim);

        try {
            return new LocalityPreservingSemanticAnalysis(creator);
        } catch (IOException ioe) {
            throw new IOError(ioe);
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.matrix.AffinityMatrixCreator

Copyright © 2018 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.