基于OData的WCF服务或Silverlight应用程序的常规WCF服务(OData based WCF service or regular WCF service for Silverlight application)
我刚刚开始评估是否应该使用受OData影响的wcf数据服务或标准WCF服务应用程序作为Silverlight应用程序的主要数据源。 我希望你的想法在哪种情况/情况下更好的方式。 什么是电线更轻,更容易维护等。
到目前为止我收集的是:
- 我知道VS2010中没有Wcf数据服务模板,我需要首先创建一个asp.net web项目,然后添加一个wcf数据服务,这将影响我构建项目的方式。
- WCF数据服务通过服务公开实际的表名。 我还不知道我可以为它们添加别名的方法,我不确定让世界知道我的桌面结构是一个好主意
- 在标准的wcf服务中,我需要针对服务端的EF或Domain服务类编写linq查询,而在数据服务中,我可以将该处理逻辑移动到客户端。
- 乍一看,检查由wcf数据服务公开的类似乎比EF公开的类更容易阅读和理解
请添加你的想法..
谢谢你的时间。
I have just started evaluating whether or not I should be using OData influenced wcf data services or a standard WCF service application as the primary data source for Silverlight applications. I would like your thoughts on which is a better way under what situation/circumstance. What is lighter over the wire, easier to maintain, etc.
What I have gathered so far is:
- There are no Wcf data service templates in VS2010 that I know of, and I will need to create a asp.net web project first and then add a wcf data service, so its going to affect how I structure my projects.
- WCF Data services expose actual table names over the service. I don't know yet of a way I can alias them and I'm not sure its a good idea to let the world know my table structure
- In a standard wcf service I will need to write linq queries against the EF or Domain service classes on the service side, while in a data service I can move that processing logic to the client.
- At first glance examining the classes exposed by the wcf data services seem easier to read and understand than those exposed by the EF
Do add your thoughts on this..
Thanks for your time.
原文:https://stackoverflow.com/questions/4173472
最满意答案
通过设计(DBSCAN中的字母N),该算法还识别不属于任何簇的对象,称为噪声 。
如果您错误地将“噪音”视为一个群集,它们当然会显得完全不相关。
有些样本通常不适合任何群集,因此这是一个功能,而不是限制。 您可以将每个点分配到与最近的聚簇点相同的群集,但这不会提高群集质量。
By design (the letter N in DBSCAN) the algorithm also recognizes objects that do not belong into any cluster, referred to as noise.
If you incorrectly treat "noise" as one cluster, they will of course appear entirely unrelated.
Some samples often just don't fit any cluster, so this is a feature, not a limitation. You could assign each point to the same cluster as the nearest clustered point, but that does not increase the cluster quality.
相关问答
更多-
python无监督学习dbscan scikit应用示例(python unsupervised learning dbscan scikit application example)[2023-11-15]
聚类不是预测 “预测”集群标签几乎没有用处,因为它只是由集群算法“随机”分配。 更糟的是:大多数算法不能包含新数据。 你真的应该使用集群来探索你的数据,并了解那里有什么,不知道什么。 不要依赖聚类“好”。 有时,人们将数据集量化为k个中心,然后仅使用这个“压缩”的数据集进行分类/预测(通常仅基于最近的邻居),人们已经取得了成功。 我也看到了围绕每个集群训练一个集合进行预测的想法,并选择使用最近邻居应用回归器(即,如果数据很好地适合集群,则使用集群回归模型)。 但我不记得任何重大的成功案例...... Clu ... -
我从mathworks Support获得了一个解决方案。 它读取方式,也许python环境没有完全设置。 我被要求在Anaconda Prompt启动matlab,该Anaconda Prompt具有完整的安排环境。 从那里运行matlab产生了想要的结果,从而能够使用例如sklearn。 进一步比较来自那里的差异表明,Python中的一些更多的目录必须被添加到系统搜索路径中。 此外,我了解到,运行py.importlib.import_module(
)将显示该python模块及其 ... -
导入sklearn时出错(Error in importing sklearn)[2023-07-31]
更新python-decorator。 看起来像依赖性错误。 Update python-decorator. Looks like dependency bug. -
当然,只需使用predict方法。 继续引用问题的例子 X_new = vectorizer.transform([sentence]) y_new = model.predict(X_new) Sure, just use the predict method. Continuing the example from the referenced question X_new = vectorizer.transform([sentence]) y_new = model.predict(X_new)
-
来自scikit-learn的DBSCAN算法的输入矩阵和参数(Input matrix and parameters for the DBSCAN algorithm from scikit-learn)[2023-11-18]
有关如何根据k距离图选择epsilon的建议,请参阅DBSCAN文章。 由于您的数据稀疏,因此使用例如余弦距离而非欧几里德距离可能更合适。 您还应该使用稀疏格式。 据我所知, numpy.zeros将创建一个密集矩阵: sparse_matrix = numpy.zeros(...) 因此它具有误导性,因为它是一个密集的矩阵,大多数都是0。 See the DBSCAN article for a suggestion how to choose epsilon based on the k-dista ... -
DBSCAN和边界点(DBSCAN and border points)[2023-01-23]
在这种情况下,对于两个集群,点的数量通常为1。 更好的平局将是距离,但即使这样也可能有联系。 这是一个微不足道的修改,可以在后期处理中轻松实现:对于每个边界点,找到最近的核心点并使用该标签。 但是,它有关系吗? 聚类不是完美的。 我们在这里谈论的是一种罕见的情况,即“最佳”(对于基于两个硬阈值的“最佳”临时定义) 通常与最终结果相差0.000 。 如果我没有弄错,DBSCAN的作者建议您也可以将这些点分配给两个群集 。 这应该是最符合定义的解决方案(边界点可从两个群集中获得)。 但它使一切变得更加复杂。 因 ... -
我找不到文档,但是它是按群集排序的。 所以: kmeans.cluster_centers_[0] = centroid of cluster 0 I couldn't find the documentation but yes it is ordered by cluster. So: kmeans.cluster_centers_[0] = centroid of cluster 0
-
通过设计(DBSCAN中的字母N),该算法还识别不属于任何簇的对象,称为噪声 。 如果您错误地将“噪音”视为一个群集,它们当然会显得完全不相关。 有些样本通常不适合任何群集,因此这是一个功能,而不是限制。 您可以将每个点分配到与最近的聚簇点相同的群集,但这不会提高群集质量。 By design (the letter N in DBSCAN) the algorithm also recognizes objects that do not belong into any cluster, referred ...
-
为什么DBSCAN群集会在Movie镜头数据集上返回单个群集?(Why DBSCAN clustering returns single cluster on Movie lens data set?)[2023-06-24]
您需要选择适当的参数。 由于epsilon太小,一切都变成了噪音。 sklearn 不应该具有此参数的默认值,需要为每个数据集选择不同的值。 您还需要预处理数据。 用无意义的kmeans获得“集群”是微不足道的...... 不要只是调用随机函数。 你需要了解自己在做什么,或者只是在浪费你的时间。 As pointed by @faraway and @Anony-Mousse the solution is more of Mathematical on Dataset than Programming. ... -
DBSCAN具有自定义指标(DBSCAN with custom metric)[2023-10-25]
“要素数组”只是数据集中数据点的要素数组。 metric是您正在寻找的参数。 它可以是字符串(内置度量的名称)或可调用的 。 您的similarity函数是可调用的。 这在文档中没有很好地描述,但是度量必须这样做,将两个功能作为参数,并返回一个数字。 def similarity(x, y): return ... reduced_dataset = sklearn.cluster.DBSCAN(metric: similarity).fit(dataset) A "feature array" ...