首页
\
问答
\
我怎样才能告诉h2o深度学习网格有AUC而不是剩余偏差(How can I tell h2o deep learning grid to have AUC instead of residual deviance)
我怎样才能告诉h2o深度学习网格有AUC而不是剩余偏差(How can I tell h2o deep learning grid to have AUC instead of residual deviance)
我想通过寻找AUC或准确度来测量模型性能。 在网格搜索中,我得到
residual deviance
结果,我怎样才能告诉h2o深度学习网格有AUC而不是剩余偏差,并将结果显示为如下所示?train <- read.table(text = "target birds wolfs snakes 0 9 7 a 0 8 4 b 1 2 8 c 1 2 3 a 1 8 3 a 0 1 2 a 0 7 1 b 0 1 5 c 1 9 7 c 1 8 7 c 0 2 7 b 1 2 3 b 1 6 3 c 0 1 1 a 0 3 9 a 1 1 1 b ",header = TRUE) trainHex <- as.h2o(train) g <- h2o.grid("deeplearning", hyper_params = list( seed = c(123456789,12345678,1234567), activation = c("Rectifier", "Tanh", "TanhWithDropout", "RectifierWithDropout", "Maxout", "MaxoutWithDropout") ), reproducible = TRUE, x = 2:4, y = 1, training_frame = trainHex, validation_frame = trainHex, epochs = 50, ) g model_ids <- g@summary_table model_ids<-as.data.frame(model_ids)
我得到的结果表:
Hyper-Parameter Search Summary: ordered by increasing residual_deviance activation seed model_ids residual_deviance 1 Maxout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_10 0.07243775676256235 2 Maxout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_16 0.10060885040861599 3 MaxoutWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_5 0.1706496158406441 4 Maxout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_4 0.17243125875659948 5 Tanh 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_1 0.18326527198894926 6 Tanh 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_7 0.18763395264761593 7 Tanh 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_13 0.18791531211136187 8 TanhWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_2 0.19808063817007837 9 TanhWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_8 0.19815190962052193 10 TanhWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_14 0.19832946889767458 11 Rectifier 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_0 0.20679125165086842 12 MaxoutWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_17 0.21971759565380736 13 RectifierWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_3 0.22337599298253263 14 MaxoutWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_11 0.22440661112729862 15 RectifierWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_15 0.2284671685474275 16 RectifierWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_9 0.23163744415703522 17 Rectifier 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_12 0.2516917276707789 18 Rectifier 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_6 0.2642221616447725
I would like to measure models performance by looking for AUC or Accuracy. In the grid search I get results with
residual deviance
,how can I tell h2o deep learning grid to have AUC instead of residual deviance and present the results as atable like the one attached below ?train <- read.table(text = "target birds wolfs snakes 0 9 7 a 0 8 4 b 1 2 8 c 1 2 3 a 1 8 3 a 0 1 2 a 0 7 1 b 0 1 5 c 1 9 7 c 1 8 7 c 0 2 7 b 1 2 3 b 1 6 3 c 0 1 1 a 0 3 9 a 1 1 1 b ",header = TRUE) trainHex <- as.h2o(train) g <- h2o.grid("deeplearning", hyper_params = list( seed = c(123456789,12345678,1234567), activation = c("Rectifier", "Tanh", "TanhWithDropout", "RectifierWithDropout", "Maxout", "MaxoutWithDropout") ), reproducible = TRUE, x = 2:4, y = 1, training_frame = trainHex, validation_frame = trainHex, epochs = 50, ) g model_ids <- g@summary_table model_ids<-as.data.frame(model_ids)
The results table that I got:
Hyper-Parameter Search Summary: ordered by increasing residual_deviance activation seed model_ids residual_deviance 1 Maxout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_10 0.07243775676256235 2 Maxout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_16 0.10060885040861599 3 MaxoutWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_5 0.1706496158406441 4 Maxout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_4 0.17243125875659948 5 Tanh 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_1 0.18326527198894926 6 Tanh 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_7 0.18763395264761593 7 Tanh 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_13 0.18791531211136187 8 TanhWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_2 0.19808063817007837 9 TanhWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_8 0.19815190962052193 10 TanhWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_14 0.19832946889767458 11 Rectifier 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_0 0.20679125165086842 12 MaxoutWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_17 0.21971759565380736 13 RectifierWithDropout 123456789 Grid_DeepLearning_train_model_R_1483217086840_112_model_3 0.22337599298253263 14 MaxoutWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_11 0.22440661112729862 15 RectifierWithDropout 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_15 0.2284671685474275 16 RectifierWithDropout 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_9 0.23163744415703522 17 Rectifier 1234567 Grid_DeepLearning_train_model_R_1483217086840_112_model_12 0.2516917276707789 18 Rectifier 12345678 Grid_DeepLearning_train_model_R_1483217086840_112_model_6 0.2642221616447725
原文:https://stackoverflow.com/questions/41439307
更新时间:2023-06-25 17:06
最满意答案
如果您发出HEAD请求而不是GET请求,您可能会得到您所追求的内容:
NSMutableURLRequest *request = [[NSURLRequest requestWithURL:url] mutableCopy]; [request setHTTPMethod:@"HEAD"]; [request autorelease];
If you make a HEAD request instead of a GET request, you'll probably get what you're after:
NSMutableURLRequest *request = [[NSURLRequest requestWithURL:url] mutableCopy]; [request setHTTPMethod:@"HEAD"]; [request autorelease];
相关问答
更多-
你如何在Xcode中创建一个简单的Objective-C命令行项目(How do you create a simple Objective-C command line project in Xcode)[2022-07-23]
“基金会”是你想要的。 Foundation框架是Apple的Objective-C“标准库”,提供所有基本类,如NSArray,NSString,NSNumber等等。 由于没有Foundation的“普通”Objective-C对于大多数应用程序并不是很有用,因此Apple可能选择在Foundation库之后命名其项目模板。 "Foundation" is the one you want. The Foundation framework is Apple's "standard library" f ... -
objective-c,命令行项目的Web服务框架(objective-c, web service framework for a command line project)[2021-09-11]
ASIHTTPRequest不应该要求UIKit。 你应该能够删除它,如果它在那里。 无论如何,您无法将UIKit导入Mac应用程序。 但ASI框架已经停止。 您可能希望查看其他选项,例如MKNetworkKit和AFNetworking 。 两者都应该在命令行应用程序中正常工作。 编辑:不要忘记像这样的大多数框架将需要一个运行循环。 在命令行应用程序中管理它的典型方法如下(来自NSRunLoop docs): BOOL shouldKeepRunning = YES; // global N ... -
是的,是的。 可可(以GUI或基础形式)期望自动释放池出现; 框架的内部(不仅仅是你自己的代码)会自由使用-autorelease消息和池,如果你在autorelease池栈中没有任何池,它会发出抱怨,并泄漏对象,如你看过。 我认为你已经关闭了垃圾收集; 我从来没有用它开发过,但在那种情况下,我可以想象你不需要这个。 更新自动释放池现在可以使用@autoreleasepool {...}块来创建,它具有相同的效果,以及一些不错的奖励,例如跳转/返回它的能力。 Yes, and yes. Cocoa (in ...
-
如果url存在Objective-c(If url exists Objective-c)[2023-07-22]
创建一个NSURLConnection来获取URL。 将NSURLRequest的HTTPMethod设置为"HEAD"而不是"GET" 。 在委托方法connection:didReceiveResponse: NSHTTPURLResponse connection:didReceiveResponse:检查NSHTTPURLResponse的statusCode NSHTTPURLResponse为200或其他成功响应。 -(void) queryResponseForURL:(NSURL *)inU ... -
结束了沙箱问题。 我必须去检查EKEAityTypeEvent的EKAuthorizationStatus以确定应用程序是否有权访问事件,如果没有,请求它。 似乎很奇怪,它最初从Xcode中请求访问,我的iMac没有问题,但从来没有在我的Macbook上做过但是,哦,好吧。 固定。 Ended up being a sandbox issue. I had to go check the EKAuthorizationStatus of EKEntityTypeEvent's to determine if ...
-
Xcode 4 - 基础命令行工具 文件>新建>新建项目 Mac OS X>应用程序>命令行工具 选择名字 类型>基础 下一个 创建 打开main.m文件 粘贴下面的代码 点击运行 #import
int main (int argc, const char * argv[]) { @autoreleasepool { int inputOne; NSLog (@"Enter number: "); ... -
Objective-C检查命令行应用程序中是否存在URL(Objective-C checking if URL exists in Command Line application)[2022-07-01]
如果您发出HEAD请求而不是GET请求,您可能会得到您所追求的内容: NSMutableURLRequest *request = [[NSURLRequest requestWithURL:url] mutableCopy]; [request setHTTPMethod:@"HEAD"]; [request autorelease]; If you make a HEAD request instead of a GET request, you'll probably get what you're ... -
要从命令行构建Xcode项目,可以使用xcodebuild 。 xcodebuild构建Xcode项目中包含的一个或多个目标,或构建Xcode工作区或Xcode项目中包含的方案。 该工具包含在Xcode命令行工具中,并有一个手册页(只在终端中执行man xcodebuild ),解释了基本用法。 To build Xcode projects from the command line you can use xcodebuild. xcodebuild builds one or more targets ...
-
NSTask和NSPipe示例与命令行objective-c通信(NSTask and NSPipe example to comunicate with the command line objective-c)[2022-01-22]
Apple提供了一些很好的示例代码,展示了如何完成大部分工作... http://developer.apple.com/mac/library/samplecode/Moriarity/ TaskWrapper.m包含所有聪明的东西,但由于你希望能够将数据发送到任务,你需要将它扩展一点,如下所示: [task setStandardInput: [NSPipe pipe]]; 要将输入发送到任务,您可以执行以下操作: [[[task standardInput] fileHandleForWriting] ... -
通过命令行编译和链接Swift / Objective-C ++应用程序(Compiling & linking a Swift/Objective-C++ app via the command line)[2021-12-11]
一个问题是最后一个命令行中缺少cpp.o 将它添加到依赖项列表应该可以解决这个问题: foo-renderer: objc.o FooRenderer/FooRenderer/*.swift cpp.o xcrun -sdk macosx swiftc -import-objc-header FooRenderer/FooRenderer/FooRenderer-Bridging-Header.h -o $@ $^ 那是因为链接器需要C ++代码中找到的符号的定义。 将-l...标志添加到cp ...