weka.core.Instances.stableSort()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中weka.core.Instances.stableSort()方法的一些代码示例,展示了Instances.stableSort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.stableSort()方法的具体详情如下:
包路径:weka.core.Instances
类名称:Instances
方法名:stableSort

Instances.stableSort介绍

[英]Sorts the instances based on an attribute, using a stable sort. For numeric attributes, instances are sorted in ascending order. For nominal attributes, instances are sorted based on the attribute label ordering specified in the header. Instances with missing values for the attribute are placed at the end of the dataset.
[中]使用稳定排序,基于属性对实例进行排序。对于数值属性,实例按升序排序。对于标称属性,实例将根据标题中指定的属性标签顺序进行排序。属性缺少值的实例放置在数据集的末尾。

代码示例

代码示例来源:origin: Waikato/weka-trunk

/**
 * Sorts the instances based on an attribute, using a stable sort. For numeric attributes,
 * instances are sorted into ascending order. For nominal attributes,
 * instances are sorted based on the attribute label ordering specified in the
 * header. Instances with missing values for the attribute are placed at the
 * end of the dataset.
 * 
 * @param att the attribute
 */
public void stableSort(Attribute att) {
 stableSort(att.index());
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Sorts the instances based on an attribute, using a stable sort. For numeric attributes,
 * instances are sorted into ascending order. For nominal attributes,
 * instances are sorted based on the attribute label ordering specified in the
 * header. Instances with missing values for the attribute are placed at the
 * end of the dataset.
 * 
 * @param att the attribute
 */
public void stableSort(Attribute att) {
 stableSort(att.index());
}

代码示例来源:origin: net.sf.meka/meka

/**
 * sorts the instances via the given attribute
 *
 * @param columnIndex the index of the column
 */
public void sortInstances(int columnIndex) {
  if ((columnIndex > 0) && (columnIndex < getColumnCount())) {
    addUndoPoint();
    m_Data.stableSort(columnIndex - 1);
    notifyListener(new TableModelEvent(this));
  }
}

代码示例来源:origin: Waikato/meka

/**
 * sorts the instances via the given attribute
 *
 * @param columnIndex the index of the column
 */
public void sortInstances(int columnIndex) {
  if ((columnIndex > 0) && (columnIndex < getColumnCount())) {
    addUndoPoint();
    m_Data.stableSort(columnIndex - 1);
    notifyListener(new TableModelEvent(this));
  }
}

代码示例来源:origin: net.sf.meka/meka

if ((columnIndex > 0) && (columnIndex < getColumnCount())) {
  addUndoPoint();
  m_Data.stableSort(columnIndex - 1);
  if (!ascending) {
    Instances reversedData = new Instances(m_Data, m_Data.numInstances());

代码示例来源:origin: Waikato/meka

if ((columnIndex > 0) && (columnIndex < getColumnCount())) {
  addUndoPoint();
  m_Data.stableSort(columnIndex - 1);
  if (!ascending) {
    Instances reversedData = new Instances(m_Data, m_Data.numInstances());

相关文章

Instances类方法