RODM_create_ai_model(RODM)
RODM_create_ai_model()所属R语言包:RODM
Create an Attribute Importance (AI) model
创建一个属性的重要性(AI)模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function creates an Oracle Data Mining Attribute Importance (AI) model.
这个函数创建一个Oracle数据挖掘属性的重要性(AI)模型。
用法----------Usage----------
RODM_create_ai_model(database,
data_table_name,
case_id_column_name = NULL,
target_column_name,
model_name = "AI_MODEL",
auto_data_prep = TRUE,
retrieve_outputs_to_R = TRUE,
leave_model_in_dbms = TRUE,
sql.log.file = NULL)
参数----------Arguments----------
参数:database
Database ODBC channel identifier returned from a call to RODM_open_dbms_connection
数据库的ODBC通道标识符返回调用RODM_open_dbms_connection
参数:data_table_name
Database table/view containing the training dataset.
数据库表/视图包含训练数据集。
参数:case_id_column_name
Row unique case identifier in data_table_name.
行独特的标识符的data_table_name。
参数:target_column_name
Target column name in data_table_name.
目标列名data_table_name。
参数:model_name
ODM Model name.
ODM产品型号名称。
参数:auto_data_prep
Setting that specifies whether or not ODM should perform automatic data preparation.
设置指定是否ODM应该执行自动数据准备。
参数:retrieve_outputs_to_R
Flag controlling if the output results are moved to the R environment.
船籍控制,如果输出的结果被移动到R环境。
参数:leave_model_in_dbms
Flag controlling if the model is dropped or left in RDBMS.
如果该模型被丢弃或留在RDBMS标志控制。
参数:sql.log.file
File where to append the log of all the SQL calls made by this function.
文件中追加的log所有的SQL调用此功能。
Details
详细信息----------Details----------
Attribute Importance (AI) uses a Minimum Description Length (MDL) based algorithm that ranks the relative importance of attributes in their ability to contribute to the prediction of a specified target attribute. This algorithm can provide insight into the attributes relevance to a specified target attribute and can help reduce the number of attributes for model building to increase performance and model accuracy.
属性的重要性(AI)采用了最小描述长度(MDL)的算法,居属性的相对重要性在指定的目标属性的预测作出贡献的能力。该算法能够洞察到指定的目标属性相关的属性,可以帮助减少属性的数量模型建设,以提高性能和模型的准确性。
For more details on the algotithm implementation, parameters settings and characteristics of the ODM function itself consult the following Oracle documents: ODM Concepts, ODM Application Developer's Guide, and Oracle PL/SQL Packages: Data Mining, listed in the references below.
欲了解更多详细信息,上的algotithm的实施,参数设置和ODM功能本身的特点,参考以下Oracle文件:ODM的概念,ODM应用程序开发指南,Oracle的PL / SQL程序包:数据挖掘,下面的参考文献中列出。
值----------Value----------
If retrieve_outputs_to_R is TRUE, returns a list with the following elements: <table summary="R valueblock"> <tr valign="top"><td>model.model_settings</td> <td> Table of settings used to build the model.</td></tr> <tr valign="top"><td>model.model_attributes</td> <td> Table of attributes used to build the model.</td></tr> <tr valign="top"><td>ai.importance</td> <td> Table of features along with their importance.</td></tr> </table>
如果retrieve_outputs_to_R是TRUE,返回一个列表,包含下列元素:<table summary="R valueblock"> <tr valign="top"> <TD> model.model_settings</ TD> <TD>表,用来设置建立模型。</ TD> </ TR> <tr valign="top"> <TD> model.model_attributes</ TD> <TD>表用于建立模型的属性。</ TD> </ TR> <tr valign="top"> <TD> ai.importance </ TD> <TD>表的功能,以及其重要性。</ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Pablo Tamayo <a href="mailto:pablo.tamayo@oracle.com">pablo.tamayo@oracle.com</a>
Ari Mozes <a href="mailto:ari.mozes@oracle.com">ari.mozes@oracle.com</a>
参考文献----------References----------
Oracle Data Mining Concepts 11g Release 1 (11.1) http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28129/toc.htm
Oracle Data Mining Application Developer's Guide 11g Release 1 (11.1) http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28131/toc.htm
Oracle Data Mining Administrator's Guide 11g Release 1 (11.1) http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28130/toc.htm
Oracle Database PL/SQL Packages and Types Reference 11g Release 1 (11.1) http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_datmin.htm#ARPLS192
参见----------See Also----------
RODM_drop_model
RODM_drop_model
实例----------Examples----------
# Determine attribute importance for survival in the sinking of the Titanic [确定属性的重要性在泰坦尼克号沉没的生存]
# based on pasenger's sex, age, class, etc.[根据pasenger的性别,年龄,阶级,等等。]
## Not run: [#不运行:]
DB <- RODM_open_dbms_connection(dsn="orcl11g", uid="rodm", pwd="rodm")
data(titanic3, package="PASWR")
db_titanic <- titanic3[,c("pclass", "survived", "sex", "age", "fare", "embarked")]
db_titanic[,"survived"] <- ifelse(db_titanic[,"survived"] == 1, "Yes", "No")
RODM_create_dbms_table(DB, "db_titanic") # Push the table to the database[按下表的数据库]
# Create the Oracle Data Mining Attribute Importance model[创建Oracle数据挖掘属性的重要性模型]
ai <- RODM_create_ai_model(
database = DB, # Database ODBC connection[数据库的ODBC连接]
data_table_name = "db_titanic", # Database table containing the input dataset[数据库表中输入数据集]
target_column_name = "survived", # Target column name in data_table_name[目标列名data_table_name]
model_name = "TITANIC_AI_MODEL") # Oracle Data Mining model name to create[Oracle数据挖掘模型的名称来创建]
attribute.importance <- ai$ai.importance
ai.vals <- as.vector(attribute.importance[,3])
names(ai.vals) <- as.vector(attribute.importance[,1])
#windows(height=8, width=12)[窗口(高度= 8,宽度= 12)]
barplot(ai.vals, main="Relative survival importance of Titanic dataset attributes",
ylab = "Relative Importance", xlab = "Attribute", cex.names=0.7)
ai # look at the model details[在模型的详细信息]
RODM_drop_model(DB, "TITANIC_AI_MODEL") # Drop the model[掉落的模型]
RODM_drop_dbms_table(DB, "db_titanic") # Drop the database table[删除数据库中的表]
RODM_close_dbms_connection(DB)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|