Package com.guokr.simbase.score

Examples of com.guokr.simbase.score.CosineSquareSimilarity


        @Override
        public Recommendation read(Kryo kryo, Input input, Class<Recommendation> type) {
            String scoringName = kryo.readObject(input, String.class);
            SimScore scoring;
            if (scoringName.equals("cosinesq")) {
                scoring = new CosineSquareSimilarity();
            } else if (scoringName.equals("jensenshannon")) {
                scoring = new JensenShannonDivergence();
            } else {
                scoring = new CosineSquareSimilarity();
            }

            int limits = kryo.readObject(input, int.class);
            int sortersSize = kryo.readObject(input, int.class);
View Full Code Here


    private TIntObjectMap<TIntSet>       reverseIndexer = new TIntObjectHashMap<TIntSet>();
    private List<RecommendationListener> listeners      = new ArrayList<RecommendationListener>();

    public Recommendation(VectorSet source, VectorSet target) {
        this(source, target, new CosineSquareSimilarity(), 20);
    }
View Full Code Here

    }

    public void rmk(String vkeySource, String vkeyTarget, String funcscore) {
        SimScore scoring = null;
        if (funcscore.equals("cosinesq")) {
            scoring = new CosineSquareSimilarity();
        }
        if (funcscore.equals("jensenshannon")) {
            scoring = new JensenShannonDivergence();
        }
View Full Code Here

TOP

Related Classes of com.guokr.simbase.score.CosineSquareSimilarity

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.