本文整理汇总了Java中org.apache.mahout.cf.taste.common.Refreshable类的典型用法代码示例。如果您正苦于以下问题:Java Refreshable类的具体用法?Java Refreshable怎么用?Java Refreshable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Refreshable类属于org.apache.mahout.cf.taste.common包,在下文中一共展示了Refreshable类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
@Override
public void refresh(Collection<Refreshable> collection) {
userCache.clear();
itemCache.clear();
userIDsFromItemCache.clear();
itemIDsFromUserCache.clear();
userCountCache.set(null);
itemCountCache.set(null);
}
开发者ID:balarj,项目名称:rmend-be,代码行数:10,代码来源:GoogleDatastoreDataModel.java
示例2: getSimularity
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
/**
* Get the similarity instance that is used to check which users and items
* are similar. There are several implementations for this, these are specified
* by the this.alg value of the RecommendEntityServlet instance.
* NOTE: Since there are two interfaces: ItemSimilarity and UserSimilarity the
* returned type is of the interface Refreshable since both interfaces inherit
* that type as well. Cast it to the right type.
* @param model The database model to use for the similarity calculations
* @return The UserSimilarity or ItemSimilarity instance.
* @throws TasteException If an exception is thrown by Mahout it is forwarded upwards.
*/
private Refreshable getSimularity(DataModel model) throws TasteException {
if(this.alg.equalsIgnoreCase(A_EUCLIDEAN)){
return new EuclideanDistanceSimilarity(model);
} else if(this.alg.equalsIgnoreCase(A_PEARSON)){
return new PearsonCorrelationSimilarity(model);
} else if(this.alg.equalsIgnoreCase(A_TANIMOTO)){
return new TanimotoCoefficientSimilarity(model);
} else if(this.alg.equalsIgnoreCase(A_LOGLIKELIHOOD) || this.alg == null){ // == null is the default case
return new LogLikelihoodSimilarity(model);
} else {
throw new TasteException("Unknown algorithm type: " + this.alg);
}
}
开发者ID:webdsl,项目名称:webdsl,代码行数:25,代码来源:RecommendEntityServlet.java
示例3: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
@Override
public void refresh(Collection<Refreshable> alreadyRefreshed)
{
// TODO Auto-generated method stub
// probably do nothing -
}
开发者ID:beeldengeluid,项目名称:zieook,代码行数:8,代码来源:ZieOokRecommener.java
示例4: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
@Deprecated
@Override
public void refresh(Collection<Refreshable> alreadyRefreshed) {
if (alreadyRefreshed != null) {
log.warn("Ignoring argument {}", alreadyRefreshed);
}
refresh();
}
开发者ID:myrrix,项目名称:myrrix-recommender,代码行数:9,代码来源:ServerRecommender.java
示例5: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
@Override
public void refresh(Collection<Refreshable> alreadyRefreshed) {
easyrecDataModelDelegate.refresh(alreadyRefreshed);
intializeDelegate();
}
开发者ID:major2015,项目名称:easyrec_major,代码行数:6,代码来源:EasyrecInMemoryDataModel.java
示例6: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void refresh(final Collection<Refreshable> clctn) {
wrapper.refresh(clctn);
}
开发者ID:recommenders,项目名称:rival,代码行数:8,代码来源:DataModelWrapper.java
示例7: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
/**
* @deprecated call {@link #refresh()}
*/
@Deprecated
@Override
void refresh(Collection<Refreshable> refreshables);
开发者ID:myrrix,项目名称:myrrix-recommender,代码行数:7,代码来源:MyrrixRecommender.java
示例8: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
/**
* <p>
* Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that any
* should always leave itself in a consistent, operational state, and that the refresh
* atomically updates internal state from old to new.
* </p>
*
* @param alreadyRefreshed s that are known to have already been
* refreshed as a result of an initial call to a method on some
* object. This ensure that objects in a refresh dependency graph aren't refreshed twice
* needlessly.
*/
public void refresh(Collection<Refreshable> alreadyRefreshed) {
cutoffDate = new Date();
}
开发者ID:major2015,项目名称:easyrec_major,代码行数:16,代码来源:EasyrecDataModel.java
示例9: refresh
import org.apache.mahout.cf.taste.common.Refreshable; //导入依赖的package包/类
/**
* Refresh the recommender.
*
* @param clctn the data.
*/
@Override
public void refresh(final Collection<Refreshable> clctn) {
}
开发者ID:recommenders,项目名称:rival,代码行数:9,代码来源:PopularityBasedRecommender.java
注:本文中的org.apache.mahout.cf.taste.common.Refreshable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论