party

'Object not found' error when loading party package in R

寵の児 提交于 2019-12-18 09:00:09
问题 I'm trying to load the party package in R. I have all the relevant dependencies installed, but when I type library(party) , I get the error: Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : object 'vI' not found Error: package or namespace load failed for ‘party’ I've never seen an error like this when loading a package before, and I'm really at a loss. Any help would be greatly appreciated. 回答1: Sys.getenv("vI_HOME") if(Sys.getenv("vI_HOME")!="") Sys.setenv(vI

ctree() - How to get the list of splitting conditions for each terminal node?

旧城冷巷雨未停 提交于 2019-12-17 18:33:39
问题 I have an output from ctree() ( party package) that looks like the following. How do I get the list of splitting conditions for each terminal node, like like sns <= 0, dta <= 1; sns <= 0, dta > 1 and so on? 1) sns <= 0; criterion = 1, statistic = 14655.021 2) dta <= 1; criterion = 1, statistic = 3286.389 3)* weights = 153682 2) dta > 1 4)* weights = 289415 1) sns > 0 5) dta <= 2; criterion = 1, statistic = 1882.439 6)* weights = 245457 5) dta > 2 7) dta <= 6; criterion = 1, statistic = 1170

How to implement the output of decision tree built using the ctree (party package)?

一世执手 提交于 2019-12-13 14:08:27
问题 I have built a decision tree using the ctree function via party package. it has 1700 nodes. Firstly, is there a way in ctree to give the maxdepth argument? I tried control_ctree option but, it threw some error message saying couldnt find ctree function. Also, how can I consume the output of this tree?. How can it be implemented for other platforms like SAS or SQL. I also have another doubt as to what does the value "* weights = 4349 " at the end of the node signify. How will I know, that

Setting third party cookie by using 1x1 <img> tag - Javascript doesn't drop cookie

烂漫一生 提交于 2019-12-13 13:22:58
问题 I've been trying to set a third party cookie using the following method: SiteA <img src="http://www.siteB.co.uk/cookie.php" /> SiteB <script> document.cookie = "name=thirdpartytest; expires=07/07/2013; path=/;domain=SiteB.co.uk"; </script> When I visit SiteB/cookie.php directly the cookie drops as expected. But accessing SiteA does not drop any cookie. When I use the same methodology but use PHP to drop the cookie, it works great. Is there a reason why Javascript won't drop the cookie in this

R C5.0 get rule and probability for every leaf

十年热恋 提交于 2019-12-13 02:11:42
问题 I think during my research to solve this question I came pretty close. I am looking for something like this for the C5.0 package. The method provided in the SO answer works with a party object. However the C5.0 package does not support as.party . On my further research I found this comment that the maintainer of the C5.0 package already programmed the function, but did not export it. I thought great this should work, but unfortunately the suggested function C50:::as.party.C5.0(mod1) throws

How to install 3rd party prerequisites on c# msi

不羁岁月 提交于 2019-12-12 22:02:10
问题 I have created a .msi in visual studio 2008 containing my project and it requires prerequisite third party software to run including WinZip. I have had a look round and from what I've seen, there's a prerequisite window where you can select programs like .NET framework. I have also had a look at writing a bootstrapper to check whether the third party prerequisites have been installed on the machine but I've hit a brick wall. Any other suggestions or some advice on how to do this would be very

Can't get partykit package's mob function to do univariate MLE fit

喜欢而已 提交于 2019-12-12 03:26:55
问题 I can't get the partykit package's mob function to do univariate MLE fit. # Trying to convert vignette example here https://cran.r-project.org/web/packages/partykit/vignettes/mob.pdf on page 7 to do univariate MLE gamma fits. data("PimaIndiansDiabetes", package = "mlbench") library("partykit") library("fitdistrplus") # Generating some fake data to replace the example data. op <- options(digits = 3) set.seed(123) x <- rgamma(nrow(PimaIndiansDiabetes), shape = 5, rate = 0.1) PimaIndiansDiabetes

R foreach parallel processing with unexported functions (with C50 example)

邮差的信 提交于 2019-12-12 00:36:05
问题 I am trying to extract rules from a C50 model while parallel processing. This answer helped me to extract the rules from the model object. However as I need the models to be processed in parallel, I am using foreach. This seems to have a problem with the not exported function, as it does not see the data object. Here is some reproducible code: library(foreach) library(doMC) registerDoMC(2) j = c(1,2) result = foreach(i = j) %dopar% { library(C50) d = iris model <- C5.0(Species ~ ., data = d)

Error installing PARTY package in R

我的未来我决定 提交于 2019-12-11 11:37:42
问题 Newbie R user here. I wanted to install the party package in RStudio (Ver 0.98.507), but whether I install it directly from the CRAN repository or whether I save the file first and then load it in R, I get the following error message: > install.packages("party") Installing package into ‘C:/Users/Linda/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/party_1.0-15.zip' Content type 'application/zip' length 731049 bytes (713 Kb)

Override function in R package

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:16:35
问题 So, I'm trying to make a modification in ctree (part of the partykit) package. Specifically, I want to delete an object in the global environment and run gc() to help conserve memory (R runs super slow when it gets to the point of using Windows page file). I made it as far as using fixInNamespace: fixInNamespace(ctree,"partykit") I noticed that my change was not working, so I even went to the extent of doing this as the replacement code: function(formula, data, weights, subset, na.action = na