Posts

r - How to extract average ROC curve predictions using ROCR? -

Image
the rocr library in r offer ability plot average roc curve (right rocr reference manual ): library(rocr) library(rocr) data(rocr.xval) # plot roc curves several cross-validation runs (dotted # in grey), overlaid vertical average curve , boxplots # showing vertical spread around average. data(rocr.xval) pred <- prediction(rocr.xval$predictions, rocr.xval$labels) perf <- performance(pred,"tpr","fpr") plot(perf,col="grey82",lty=3) plot(perf,lwd=3,avg="vertical",spread.estimate="boxplot",add=true) lovely. unfortunately, there's seemingly no ability obtain average roc curve object/dataframe/etc. further statistical testing (say, proc ). did research (albeit perhaps after fact), , found post: global variables in r i looked through rocr's code reveals following lines passing result plot: performance_plots.r , (starting @ line 451) ## compute average curve perf.avg <- perf.sampled perf.avg@x.values <-...

ios - master detail app crashes instantly when using push segue -

first of all, if is, somehow, dup post, feel free point me correct 1 because have not found after hours of searching. i using masterdetail viewcontroller in app, first week or of development, had no additional viewvontrollers or segues other default. wrote main code, , master , detail viewcontroller working perfectly. added vc push segue detail view, app crashes instantly. error : ***terminating app due uncaught exception 'nsinvalidargumentexception', reason '-[uinavigationcontroller setplayer:]: unrecognized selector sent instance ...' , bunch of hex. in appdelegate.m, if comment out line: rightviewcontroller.delegate = rightviewcontroller then app start , push segue work, now, obviously, if select cell in masterview, crash giving error: ***terminating app due uncaught exception 'nsinvalidargumentexception', reason '-[uinavigationcontroller selectedplayer:]: unrecognized selector sent instance ...' , bunch of hex. here of code think ...

c++ - CGAL Qt linker error -

i have problem compile project cgal , qt in visualstudio 2013. try demo app of polyhedron in cgal demos , after try move scene own qt project. errors like: error lnk2001: unresolved external symbol "public: static struct qmetaobject const cgal::three::viewer_interface::staticmetaobject" (?staticmetaobject@viewer_interface@three@cgal@@2uqmetaobject@@b) ...\scene_polyhedron_item.obj error lnk2001: unresolved external symbol "public: static class qcolor const cgal::three::scene_item::defaultcolor" (?defaultcolor@scene_item@three@cgal@@2vqcolor@@b) ...\scene_polyhedron_item.obj qt: 5.5 cgal: 4.8.beta-1 visualstudio: 2013 x64 linker input : c:\qt\5.5\msvc2013_64\lib\qt5core.lib c:\qt\5.5\msvc2013_64\lib\qt5gui.lib c:\qt\5.5\msvc2013_64\lib\qt5opengl.lib c:\qt\5.5\msvc2013_64\lib\qt5openglextensions.lib c:\qt\5.5\msvc2013_64\lib\qt5widgets.lib c:\qt\5.5\msvc2013_64\lib\qt5svg.lib c:\qt\5.5\msvc2013_64\lib\qt5xml.lib cgal_qt5-vc120-m...

objective c - Why does address of self change when execution is in method didMoveToView? -

i have mac osx objective c project has me confused. xcode version 7.3, deployment target 10.11. project, built using ib, nothing more display animated sine wave, , sprite. i'd control speed of wave, , simplicity slow, medium, , fast, selected using radio matrix. there 4 source code files: //appdelegate.h #import <cocoa/cocoa.h> @interface appdelegate : nsobject <nsapplicationdelegate> @property (weak) iboutlet nsmatrix *radioref; @end //appdelegate.m #import "appdelegate.h" #import "sinewave.h" @interface appdelegate () @property (weak) iboutlet nswindow *window; @property (weak) iboutlet skview *skview; @end @implementation appdelegate - (void)applicationdidfinishlaunching:(nsnotification *)anotification { // insert code here initialize application [self.radioref selectcellwithtag:1]; skscene *scene; cgsize size = cgsizemake(360, 216); scene = [sinewave scenewithsize:size]; scene.scalemode = skscene...

ios - Disabling Custom Keyboards for Specific Text Fields -

i trying disable user using own keyboards in 1 of text fields. when doing research, found out needed following code disable custom keyboards: func application(application: uiapplication, shouldallowextensionpointidentifier extensionpointidentifier: string) -> bool { if extensionpointidentifier == uiapplicationkeyboardextensionpointidentifier { return false } return true } however, not disable keyboards of text fields. how can apply text field only? thanks!

java - Setting text to multiple TextFields with Asynctasks crashes app -

what want achieve following: in view, have 4 textviews should show amount of items in connected databases. done using simple php script. the problem have correct values database, when try set values textviews, app crashes. i have tried if using many asynctasks problem, when decide comment out line inside settextfortextview() function, works charm , expected values printed log. being said, dont think using multiple asynctasks @ same time problem here, have no idea is. something might worth mentioning when comment out following bit this, app doesn't crash... shoesamount = (textview) findviewbyid(r.id.menutvshoesamount); databasetask taska = new databasetask(shoesamount); taska.execute("getamount", "shoes"); // tshirtsamounts = (textview) findviewbyid(r.id.menutvtshirtsamount); // databasetask taskb = new databasetask(tshirtsamounts); // taskb.execute("getamount", "tshirts"); // // ...

java - How can I stop scanning a file once array is full? -

i working on java project has method reads file, converts file elements objects, , adds them array. maximum of thirty objects can added array. file assigned has 100 objects in it. whenever try read file, error: java.lang.arrayindexoutofboundsexception: 30 i know error means, don't know how stop scanning file once array limit has been reached. this i've tried far, doesn't seem work: string skip; if(count == max){ skip = scanfile.nextline(); } it better close scanner once have input max: final int max = 30; int count = 0; while(count <= max){ string line = scanner.nextline(); //process line , add array myarray[count++] = //whatever } //close scanner scanner.close(); also remember arrays 0 based index.