本文整理汇总了Java中tech.tablesaw.api.Table.sortAscendingOn方法的典型用法代码示例。如果您正苦于以下问题:Java Table.sortAscendingOn方法的具体用法?Java Table.sortAscendingOn怎么用?Java Table.sortAscendingOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tech.tablesaw.api.Table
的用法示例。
在下文中一共展示了Table.sortAscendingOn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AssociationRuleMining
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public AssociationRuleMining(ShortColumn sets, ShortColumn items, double support) {
Table temp = Table.create("temp");
temp.addColumn(sets.copy());
temp.addColumn(items.copy());
temp.sortAscendingOn(sets.name(), items.name());
ViewGroup baskets = temp.splitOn(temp.column(0));
int[][] itemsets = new int[baskets.size()][];
int basketIndex = 0;
for (TemporaryView basket : baskets) {
ShortRBTreeSet set = new ShortRBTreeSet(basket.shortColumn(1).data());
int itemIndex = 0;
itemsets[basketIndex] = new int[set.size()];
for (short item : set) {
itemsets[basketIndex][itemIndex] = item;
itemIndex++;
}
basketIndex++;
}
this.model = new ARM(itemsets, support);
}
示例2: FrequentItemset
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public FrequentItemset(ShortColumn sets, ShortColumn items, double support) {
Table temp = Table.create("temp");
temp.addColumn(sets.copy());
temp.addColumn(items.copy());
temp.sortAscendingOn(sets.name(), items.name());
ViewGroup baskets = temp.splitOn(temp.column(0));
this.setCount = baskets.size();
int[][] itemsets = new int[setCount][];
int basketIndex = 0;
for (TemporaryView basket : baskets) {
ShortRBTreeSet set = new ShortRBTreeSet(basket.shortColumn(1).data());
int itemIndex = 0;
itemsets[basketIndex] = new int[set.size()];
for (short item : set) {
itemsets[basketIndex][itemIndex] = item;
itemIndex++;
}
basketIndex++;
}
this.model = new FPGrowth(itemsets, support);
}
示例3: clustered
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public Table clustered(Column labels) {
Table table = Table.create("Clusters");
CategoryColumn labelColumn = new CategoryColumn("Label");
IntColumn clusterColumn = new IntColumn("Cluster");
table.addColumn(labelColumn);
table.addColumn(clusterColumn);
int[] clusters = kMeans.getClusterLabel();
for (int i = 0; i < clusters.length; i++) {
labelColumn.appendCell(labels.getString(i));
clusterColumn.append(clusters[i]);
}
table = table.sortAscendingOn("Cluster", "Label");
return table;
}