插科车没有输出进度

时间:2016-01-19 06:51:30

标签: r r-caret

我希望在<div class="Body"> <table> <tr> <td>Name</td><td><asp:TextBox runat="server" ID="txtName" /></td> </tr> <tr> <td>Salary</td><td><asp:TextBox runat="server" ID="txtSalary" /></td> </tr> <tr> <td> <asp:Label runat="server" ID="lblID"></asp:Label> </td> <td> <asp:Button Text="Save" runat="server" ID="btnSave" OnClick="btnSave_Click" /> <asp:Button Text="Search" runat="server" ID="btnSearch" OnClick="btnSearch_Click" /> </td> </tr> </table> <asp:GridView runat="server" ID="gvResult"> </asp:GridView> <div class="CountDiv"> <span>Total Elements:</span><asp:Label runat="server" ID="lblTotal"></asp:Label> </div> </div> 中看到培训的进展。我已经设置了以下

caret

我打电话给上面的例如fitControl <- trainControl( method = "repeatedcv", number = t.folds, repeats = t.repeats, seeds = seeds, returnData = FALSE, verboseIter = TRUE ) caret.trainmodel <- function(method, workers=2, ...) { # prepare parallel processing cl <- makeCluster(workers) registerDoParallel(cl) # start training set.seed(825) cat(paste("\n",method, "Training start \n")) pt <- proc.time() trained.model <- train(count.bins ~ ., data = training, method = method, trControl = fitControl, verbose = TRUE, ... ) cat(paste("Done", proc.time()-pt, "\n")) # release worker stopCluster(cl) return(trained.model) } 并希望看到进展,例如它现在正在折叠/重复。但是,尽管控件中caret.trainmodel("rpart")verboseIter=TRUE调用中verbose=TRUE,屏幕上仍未显示任何内容。还有什么我需要设定的吗?

1 个答案:

答案 0 :(得分:2)

除了上面的评论之外,请尝试在outfile函数中指定参数makeCluster

    makeCluster(workers,outfile = "")

有关详细信息,请参阅?makeCluster