类 LBR.Indexes
java.lang.Object
weka.classifiers.lazy.LBR.Indexes
- 所有已实现的接口:
Serializable
,RevisionHandler
- 封闭类:
- LBR
Class for handling instances and the associated attributes.
Enables a set of indexes to a given dataset to be created and used with an algorithm. This reduces the memory overheads and time required when manipulating and referencing Instances and their Attributes.
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明boolean[]
the array attribute indexesint
the Class Index for the data setboolean[]
the array instance indexesint
the number of attributes "in use" or set to a the original value (true or false)int
the number of instances "in use" or set to a the original value (true or false)int
the number of sequential attributes "in use" or set to a the original value (true or false)int
the number of sequential instances "in use" or set to a the original value (true or false)int[]
an array of attribute indexes that are set to either true or falseint[]
the array of instance indexes that are set to a either true or false -
构造器概要
构造器构造器说明Indexes
(int numInstances, int numAtts, boolean value, int classIndex) constructorIndexes
(LBR.Indexes FromIndexes) constructor -
方法概要
修饰符和类型方法说明boolean
getAttIndex
(int index) Returns the boolean value at the specified index in the Attribute Indexes arrayboolean
getInstanceIndex
(int index) Returns the boolean value at the specified index in the Instance Index arrayint
Returns the number of attributes in the datasetint
Returns the number of attributes "in use"int
Returns the number of instances in the datasetint
Returns the number of instances "in use"Returns the revision string.int
getSequentialAttIndex
(int index) Returns the boolean value at the specified index in the Sequential Attribute Indexes arrayint
getSequentialInstanceIndex
(int index) Returns the boolean value at the specified index in the Sequential Instance Indexes arrayint
Returns the number of attributes in the Sequential arrayint
Returns the number of instances in the Sequential arrayboolean
Returns whether or not the Sequential Attribute Index requires rebuilding due to a changeboolean
Returns whether or not the Sequential Instance Index requires rebuilding due to a changevoid
resetAttIndex
(boolean value) Resets the boolean value in AttIndexes arrayvoid
resetAttIndexTo
(LBR.Indexes FromIndexes) Resets the boolean value in AttIndexes array based on another set of Indexesvoid
resetDatasetBasedOn
(LBR.Indexes FromIndexes) Resets the boolean values in Attribute and Instance array to reflect an empty dataset withthe same attributes set as in the incoming Indexes Objectvoid
resetInstanceIndex
(boolean value) Resets the boolean value in the Instance Indexes array to a specified valuevoid
setAttIndex
(int index, boolean value) Changes the boolean value at the specified index in the AttIndexes arrayvoid
setAtts
(int[] Attributes, boolean value) Changes the boolean value at the specified index in the InstIndexes arrayvoid
setInstanceIndex
(int index, boolean value) Changes the boolean value at the specified index in the InstIndexes arrayvoid
setInsts
(int[] Instances, boolean value) Changes the boolean value at the specified index in the InstIndexes arrayvoid
setSequentialAttIndex
(boolean value) A Sequential Attribute index is all those Attributes that are set to the specified value placed in a sequential array.void
setSequentialDataset
(boolean value) Sets both the Instance and Attribute indexes to a specified valuevoid
setSequentialInstanceIndex
(boolean value) A Sequential Instance index is all those Instances that are set to the specified value placed in a sequential array.
-
字段详细资料
-
m_InstIndexes
public boolean[] m_InstIndexesthe array instance indexes -
m_AttIndexes
public boolean[] m_AttIndexesthe array attribute indexes -
m_SequentialInstIndexes
public int[] m_SequentialInstIndexesthe array of instance indexes that are set to a either true or false -
m_SequentialAttIndexes
public int[] m_SequentialAttIndexesan array of attribute indexes that are set to either true or false -
m_NumInstsSet
public int m_NumInstsSetthe number of instances "in use" or set to a the original value (true or false) -
m_NumAttsSet
public int m_NumAttsSetthe number of attributes "in use" or set to a the original value (true or false) -
m_NumSeqInstsSet
public int m_NumSeqInstsSetthe number of sequential instances "in use" or set to a the original value (true or false) -
m_NumSeqAttsSet
public int m_NumSeqAttsSetthe number of sequential attributes "in use" or set to a the original value (true or false) -
m_ClassIndex
public int m_ClassIndexthe Class Index for the data set
-
-
构造器详细资料
-
Indexes
public Indexes(int numInstances, int numAtts, boolean value, int classIndex) constructor- 参数:
numInstances
- the number of instances in datasetnumAtts
- the number of attributes in datasetvalue
- either true or falseclassIndex
- Set to -1 if you want class attribute switched on or the value of the instances class index will be switched of and the class attibute will not be considered.
-
Indexes
constructor- 参数:
FromIndexes
- the object you want to copy
-
-
方法详细资料
-
setInstanceIndex
public void setInstanceIndex(int index, boolean value) Changes the boolean value at the specified index in the InstIndexes array- 参数:
index
- the index of the instancevalue
- the value to set at the specified index
-
setAtts
public void setAtts(int[] Attributes, boolean value) Changes the boolean value at the specified index in the InstIndexes array- 参数:
Attributes
- array of attributesvalue
- the value to set at the specified index
-
setInsts
public void setInsts(int[] Instances, boolean value) Changes the boolean value at the specified index in the InstIndexes array- 参数:
Instances
- array of instancesvalue
- the value to set at the specified index
-
setAttIndex
public void setAttIndex(int index, boolean value) Changes the boolean value at the specified index in the AttIndexes array- 参数:
index
- the index of the instancevalue
- the value to set at the specified index
-
getInstanceIndex
public boolean getInstanceIndex(int index) Returns the boolean value at the specified index in the Instance Index array- 参数:
index
- the index of the instance- 返回:
- the boolean value at the specified index
-
getSequentialInstanceIndex
public int getSequentialInstanceIndex(int index) Returns the boolean value at the specified index in the Sequential Instance Indexes array- 参数:
index
- the index of the instance- 返回:
- the requested value
-
resetInstanceIndex
public void resetInstanceIndex(boolean value) Resets the boolean value in the Instance Indexes array to a specified value- 参数:
value
- the value to set all indexes
-
resetDatasetBasedOn
Resets the boolean values in Attribute and Instance array to reflect an empty dataset withthe same attributes set as in the incoming Indexes Object- 参数:
FromIndexes
- the Indexes to be copied
-
resetAttIndex
public void resetAttIndex(boolean value) Resets the boolean value in AttIndexes array- 参数:
value
- the value to set the attributes to
-
resetAttIndexTo
Resets the boolean value in AttIndexes array based on another set of Indexes- 参数:
FromIndexes
- the Indexes to be copied
-
getAttIndex
public boolean getAttIndex(int index) Returns the boolean value at the specified index in the Attribute Indexes array- 参数:
index
- the index of the Instance- 返回:
- the boolean value
-
getSequentialAttIndex
public int getSequentialAttIndex(int index) Returns the boolean value at the specified index in the Sequential Attribute Indexes array- 参数:
index
- the index of the Attribute- 返回:
- the requested value
-
getNumInstancesSet
public int getNumInstancesSet()Returns the number of instances "in use"- 返回:
- the number of instances "in use"
-
getNumInstances
public int getNumInstances()Returns the number of instances in the dataset- 返回:
- the number of instances in the dataset
-
getSequentialNumInstances
public int getSequentialNumInstances()Returns the number of instances in the Sequential array- 返回:
- the number of instances in the sequential array
-
getNumAttributes
public int getNumAttributes()Returns the number of attributes in the dataset- 返回:
- the number of attributes
-
getNumAttributesSet
public int getNumAttributesSet()Returns the number of attributes "in use"- 返回:
- the number of attributes "in use"
-
getSequentialNumAttributes
public int getSequentialNumAttributes()Returns the number of attributes in the Sequential array- 返回:
- the number of attributes in the sequentual array
-
isSequentialInstanceIndexValid
public boolean isSequentialInstanceIndexValid()Returns whether or not the Sequential Instance Index requires rebuilding due to a change- 返回:
- true if the sequential instance index needs rebuilding
-
isSequentialAttIndexValid
public boolean isSequentialAttIndexValid()Returns whether or not the Sequential Attribute Index requires rebuilding due to a change- 返回:
- true if the sequential attribute index needs rebuilding
-
setSequentialDataset
public void setSequentialDataset(boolean value) Sets both the Instance and Attribute indexes to a specified value- 参数:
value
- the value for the Instance and Attribute indices
-
setSequentialInstanceIndex
public void setSequentialInstanceIndex(boolean value) A Sequential Instance index is all those Instances that are set to the specified value placed in a sequential array. Each value in the sequential array contains the Instance index within the Indexes.- 参数:
value
- the sequential instance index
-
setSequentialAttIndex
public void setSequentialAttIndex(boolean value) A Sequential Attribute index is all those Attributes that are set to the specified value placed in a sequential array. Each value in the sequential array contains the Attribute index within the Indexes- 参数:
value
- the sequential attribute index
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-