LISp-Miner Control Language Reference, version: 27.15.02 of 14 Dec 2017

Class Attribute

LISp-Miner data-mining Attribute of an unspecified type
inherits from LMWrapName
namespace: lm.prepro

Constructor

Attribute()
Creates a new object of this class

Parameters

  • luaTable - to store named parameters

Obligatory named parameters

  • name : string - unique name for the new of Attributes
  • pAttributeGroup : AttributeGroup - parent group of attributes
  • pDataColumn : DataColumn - database table column this attribute is based upon

Properties List

CategoryCount  Number of defined categories
CategoryCountAll  Number of defined categories, including X-Category
DataColumn  the DataColumn, database column this attribute is build upon
DataTable  the DataTable, database table this attribute is based on
ID  Unique identifier (primary key) of the object
ItemShift  Positive or negative shift relative to data row from which it reads values to construct bit-strings for this attribute
Name  Unique name of this object. Cannot be empty.
Note  Text comment to this object (up to 255 characters)
ParentAttributeGroup  AttributeGroup, group of attributes this attribute belongs to
ShortName  A shorter variant of attribute name
ShowNameFlag  If the name of attribute should be included into literal string in interpretation

Methods List

autoCreateBinary () Automatic creation of categories as two intervals on the left and right of a threshold value
autoCreateEnumeration () Automatic creation of categories as an enumeration of all values in the underlying database column. Values already present in the X-category are ignored.
autoCreateIntervalEquidistant () Automatic creation of categories as intervals of the same length
autoCreateIntervalEquifrequency () Automatic creation of categories as intervals with hopefully the same frequency
calcCategoryFrequencies () Pre-calculates frequencies for all categories. Frequencies are otherwise calculated ad-hod in a function requesting frequency of a category as its input.
canDel () Returns true if the object could be deleted (is not used)
canDelCategoryAll () Returns true if all Category'ies of this attribute could be deleted (no one is used)
clone () Creates a clone (an exact copy) of this attribute
findCategory () Tries to look-up a Category with a unique property given as parameter. Just one parameter has to be specified. Returns nil if Category with this property doesn't exists.
getActionTypeCode () Returns code of if values in underlying database column could change (ie. not eg. the birth date), see ActionType codes
getActionTypeKey () Returns unique string key of if values in underlying database column could change (ie. not eg. the birth date)
getActionTypeName () Returns string representation of if values in underlying database column could change (ie. not eg. the birth date)
getCategoryCount () Returns the value of CategoryCount property
getCategoryCountAll () Returns the value of CategoryCountAll property
getDataColumn () Returns the DataColumn this attribute is build upon, the value of DataColumn property
getDataCharacterTypeCode () Returns code of if values in underlying database column are of type nominal, ordinal or cardinal, see DataCharacterType codes
getDataCharacterTypeKey () Returns unique string key of if values in underlying database column are of type nominal, ordinal or cardinal
getDataCharacterTypeName () Returns string representation of if values in underlying database column are of type nominal, ordinal or cardinal
getDataTable () Returns the DataTable this attribute is based on, the value of DataTable property
getID () Returns unique identifier (primary key) of the object
getItemShift () Returns the value of ItemShift property
getLiteralName () Returns name abbreviation used in intepretation of results
getName () Returns the value of Name property, name of this object
getNote () Returns the value of Note property
getParentAttributeGroup () Returns the parent AttributeGroup this attribute belongs to, the value of ParentAttributeGroup property
getShortName () Returns the value of ShortName property
getValueSubTypeCode () Returns code of data-type of values in database column, see ValueSubType codes
getValueSubTypeKey () Returns unique string key of data-type of values in database column
getValueSubTypeName () Returns string representation of data-type of values in database column
getXCategory () Returns optional Category representing missing or invalid values
hasBitStringsReady () Returns true when the bit-strings for all categories are prepared
hasXCategory () Returns true when this attribute has X-Category defined
isShowNameFlag () Returns the value of ShowNameFlag property
onAdd () Store the newly created object into metabase
onDel () Delete the object from metabase (fails if canDel returns false)
onUpdate () Save changes made to the object into metabase
prepareCategoryArray () Returns array of Category'ies (categories in this attribute)
resetHasBitStringsReady () resets the hasBitStringsReady flag
setActionTypeCode () Sets code of if values in underlying database column could change (ie. not eg. the birth date), see ActionType codes
setDataCharacterTypeCode () Sets code of if values in underlying database column are of type nominal, ordinal or cardinal, see DataCharacterType codes
setItemShift () Sets the value of ItemShift property
setName () Sets the value of Name property, name of this object (must be unique)
setNote () Sets the value of Note property
setParentAttributeGroup () Sets the parent AttributeGroup this attribute belongs to, the value of ParentAttributeGroup property
setShortName () Sets the value of ShortName property
setShowNameFlag () Sets the value of ShowNameFlag property
setXCategory () Sets optional Category representing missing or invalid values

Properties

CategoryCount  (read-only) : integer
Number of defined categories
CategoryCountAll  (read-only) : integer
Number of defined categories, including X-Category
DataColumn  (read-only) : DataColumn
the DataColumn, database column this attribute is build upon
DataTable  (read-only) : DataTable
the DataTable, database table this attribute is based on
ID  (read-only) : integer
Unique identifier (primary key) of the object
Intherited from: LMWrap
ItemShift : integer
Positive or negative shift relative to data row from which it reads values to construct bit-strings for this attribute
Name : string
Unique name of this object. Cannot be empty.
Intherited from: LMWrapName
Note : string
Text comment to this object (up to 255 characters)
Intherited from: LMWrapName
ParentAttributeGroup  (read-only) : -
AttributeGroup, group of attributes this attribute belongs to
ShortName : string
A shorter variant of attribute name
ShowNameFlag : boolean
If the name of attribute should be included into literal string in interpretation

Methods

autoCreateBinary()
Automatic creation of categories as two intervals on the left and right of a threshold value

Parameters

  • luaTable - to store named parameters

Obligatory named parameters

  • valueThrehold : same type as its attribute - threshold value to create intervals around it
  • nFirstIntervalRightBracketTypeCode : integer - BracketType code to identify the right closing bracket of the first interval (the left closing bracket of the second interval will be set to opposite)

Optional named parameters

  • bMnemonicNames : boolean - if true, mnemonic names as 'low', 'higher' are used as intervals descriptions
  • categoryNames : string - list of user-specified category names, separated by semicolon ';'
autoCreateEnumeration()
Automatic creation of categories as an enumeration of all values in the underlying database column. Values already present in the X-category are ignored.

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • nCount : integer - an upper limit for number of categories to be created, only categories for up to the nCount most frequent values are created
  • nFrequencyMin : integer - values with frequency below this value are ignored and no category is created for them
  • nFrequencyMax : integer - values with frequency above this value are ignored and no category is created for them
  • bCreateCategoryOthers : boolean - if true a category named 'Others' will be create to include the rest values for which no special category was created
  • categoryNames : string - list of user-specified category names, separated by semicolon ';'
autoCreateIntervalEquidistant()
Automatic creation of categories as intervals of the same length

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • dFrom : float - starting value for intervals
  • dTo : float - ending value for intervals
  • dLength : float - length of intervals
  • nCount : integer - number of intervals (to compute length automatically if no parameter dLength is specified)
  • bCloseLeft : boolean - sharp closing of intervals on the left
  • bMnemonicNames : boolean - if true, mnemonic names as 'ed_1', 'ed_2' are used as intervals descriptions
  • categoryNames : string - list of user-specified category names, separated by semicolon ';'
autoCreateIntervalEquifrequency()
Automatic creation of categories as intervals with hopefully the same frequency

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • dFrom : float - starting value for intervals
  • dTo : float - ending value for intervals
  • nCount : integer - number of intervals to create
  • bMnemonicNames : boolean - if true, mnemonic names as 'low', 'higher' are used as intervals descriptions
  • categoryNames : string - list of user-specified category names, separated by semicolon ';'
calcCategoryFrequencies()
Pre-calculates frequencies for all categories. Frequencies are otherwise calculated ad-hod in a function requesting frequency of a category as its input.

Returns

  • boolean - true, if successfull
canDel() : boolean
Returns true if the object could be deleted (is not used)
Intherited from: LMWrap

Returns

  • boolean
canDelCategoryAll() : boolean
Returns true if all Category'ies of this attribute could be deleted (no one is used)

Returns

  • boolean
clone() : Attribute
Creates a clone (an exact copy) of this attribute

Returns

findCategory() : Category
Tries to look-up a Category with a unique property given as parameter. Just one parameter has to be specified. Returns nil if Category with this property doesn't exists.

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • nID : integer - an ID of the category to look-up
  • name : string - a name of the category to look-up

Returns

getActionTypeCode() : integer
Returns code of if values in underlying database column could change (ie. not eg. the birth date), see ActionType codes

Returns

  • integer
getActionTypeKey() : string
Returns unique string key of if values in underlying database column could change (ie. not eg. the birth date)

Returns

  • string
getActionTypeName() : string
Returns string representation of if values in underlying database column could change (ie. not eg. the birth date)

Returns

  • string
getCategoryCount() : integer
Returns the value of CategoryCount property

Returns

  • integer
getCategoryCountAll() : integer
Returns the value of CategoryCountAll property

Returns

  • integer
getDataColumn() : DataColumn
Returns the DataColumn this attribute is build upon, the value of DataColumn property

Returns

getDataCharacterTypeCode() : integer
Returns code of if values in underlying database column are of type nominal, ordinal or cardinal, see DataCharacterType codes

Returns

  • integer
getDataCharacterTypeKey() : string
Returns unique string key of if values in underlying database column are of type nominal, ordinal or cardinal

Returns

  • string
getDataCharacterTypeName() : string
Returns string representation of if values in underlying database column are of type nominal, ordinal or cardinal

Returns

  • string
getDataTable() : DataTable
Returns the DataTable this attribute is based on, the value of DataTable property

Returns

getID() : integer
Returns unique identifier (primary key) of the object
Intherited from: LMWrap

Returns

  • integer
getItemShift() : integer
Returns the value of ItemShift property

Returns

  • integer
getLiteralName() : string
Returns name abbreviation used in intepretation of results

Returns

  • string
getName() : string
Returns the value of Name property, name of this object
Intherited from: LMWrapName

Returns

  • string
getNote() : string
Returns the value of Note property
Intherited from: LMWrapName

Returns

  • string
getParentAttributeGroup() : AttributeGroup
Returns the parent AttributeGroup this attribute belongs to, the value of ParentAttributeGroup property

Returns

getShortName() : string
Returns the value of ShortName property

Returns

  • string
getValueSubTypeCode() : integer
Returns code of data-type of values in database column, see ValueSubType codes

Returns

  • integer
getValueSubTypeKey() : string
Returns unique string key of data-type of values in database column

Returns

  • string
getValueSubTypeName() : string
Returns string representation of data-type of values in database column

Returns

  • string
getXCategory() : Category
Returns optional Category representing missing or invalid values

Returns

hasBitStringsReady() : boolean
Returns true when the bit-strings for all categories are prepared

Returns

  • boolean
hasXCategory() : boolean
Returns true when this attribute has X-Category defined

Returns

  • boolean
isShowNameFlag() : boolean
Returns the value of ShowNameFlag property

Returns

  • boolean
onAdd()
Store the newly created object into metabase
Intherited from: LMWrap
onDel()
Delete the object from metabase (fails if canDel returns false)
Intherited from: LMWrap
onUpdate()
Save changes made to the object into metabase
Intherited from: LMWrap
prepareCategoryArray() : luaTable
Returns array of Category'ies (categories in this attribute)

Returns

  • luaTable
resetHasBitStringsReady()
resets the hasBitStringsReady flag
setActionTypeCode( integer )
Sets code of if values in underlying database column could change (ie. not eg. the birth date), see ActionType codes

Parameters

  • integer
setDataCharacterTypeCode( integer )
Sets code of if values in underlying database column are of type nominal, ordinal or cardinal, see DataCharacterType codes

Parameters

  • integer
setItemShift( integer )
Sets the value of ItemShift property

Parameters

  • integer
setName( string )
Sets the value of Name property, name of this object (must be unique)
Intherited from: LMWrapName

Parameters

  • string - cannot be empty
setNote( string )
Sets the value of Note property
Intherited from: LMWrapName

Parameters

  • string
setParentAttributeGroup( AttributeGroup )
Sets the parent AttributeGroup this attribute belongs to, the value of ParentAttributeGroup property

Parameters

setShortName( string )
Sets the value of ShortName property

Parameters

  • string - cannot be empty
setShowNameFlag( boolean )
Sets the value of ShowNameFlag property

Parameters

  • boolean
setXCategory( Category )
Sets optional Category representing missing or invalid values

Parameters