如何解决在未知数据集上应用 MLP?
我正在使用 Iris MLP 中的示例进行简单的机器学习。
这个例子比较简单,因为它是训练和测试模型。但是,该示例并未展示如何将经过训练的 MLP 模型应用于未知数据集以预测该未知数据集的类别(在本例中为花朵类型)。
我已经搜索了几个小时,但找不到任何有用的网站说明如何将经过训练的 MLP 应用于未知数据集。我确实假设 uses
ComObj,Variants;
var
V: Variant;
Square: Double; // Could also be of type string
begin
try
// Get a running Excel instance,if there is one
V := GetActiveOleObject('Excel.Application');
except
on EOleSysError do // Probably Excel was not running
begin
// Create a new Excel instance
V := CreateOleObject('Excel.Application');
V.Visible := True; // Optional
end;
end;
//
// Do some work with Excel - a few examples
//
// If no workbook is open,then create one
if VarIsClear(V.ActiveWorkbook) then
begin
V.Workbooks.Add;
end;
V.ActiveSheet.Cells[4,1].Value := 7; // Put a value into cell A4
V.ActiveSheet.Cells[5,1].Formula := '=A4 * A4'; // Put a formula into A5
V.Calculate; // normally not needed,but in case the user has chosen manual calculation
Square := V.ActiveSheet.Cells[5,1].Value; // Read the value of A5
end;
将更改为 iris <- splitForTrainingAndTest(irisValues,irisTargets,ratio=0.15)
并输入到新的 iris <- splitForTrainingAndTest(unkNownirisValues,ratio=0.15)
中,但这没有多大意义。
有什么想法吗?
解决方法
CRAN 参考手册的第 32 页, https://cran.r-project.org/web/packages/RSNNS/RSNNS.pdf 这些示例显示了 rsnns 对象(即经过训练的模型)的预测通用方法。
这是您要找的吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。