本文整理汇总了Java中tech.tablesaw.api.Table.splitOn方法的典型用法代码示例。如果您正苦于以下问题:Java Table.splitOn方法的具体用法?Java Table.splitOn怎么用?Java Table.splitOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tech.tablesaw.api.Table
的用法示例。
在下文中一共展示了Table.splitOn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: create
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public static PlotCanvas create(String plotTitle, Table table, String summaryColumnName, String
groupingColumnName) {
ViewGroup groups = table.splitOn(table.column(groupingColumnName));
int columnNumber = table.columnIndex(summaryColumnName);
double[][] dataArray = DoubleArrays.to2dArray(groups, columnNumber);
String[] grounpNames = groupNames(groups);
PlotCanvas canvas = BoxPlot.plot(dataArray, grounpNames);
canvas.setTitle(plotTitle);
canvas.setAxisLabel(0, groupingColumnName);
canvas.setAxisLabel(1, summaryColumnName);
return canvas;
}
示例4: testTo2dArray
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
@Test
public void testTo2dArray() throws Exception {
Table table = Table.read().csv("../data/tornadoes_1950-2014.csv");
ViewGroup viewGroup = table.splitOn(table.shortColumn("Scale"));
int columnNuumber = table.columnIndex("Injuries");
DoubleArrays.to2dArray(viewGroup, columnNuumber);
}