discretization

“Target (y) not found or it is not numeric” -Package smbinning - R

一个人想着一个人 提交于 2019-12-25 16:09:44
问题 I am trying to use smbinning package in R software to find optimal binnings to a certain variable. Running the command result=smbinning(df=bop,y="FLAG_TARGET",x="VL_TOTL_REND",p=0.05) returns the following error message: "Target (y) not found or it is not numeric" What is happening here? FLAG_TARGET is numeric and I have already tried to change data format to integer but it does not work. Is there a solution to this issue? 回答1: It is because bop is not a data frame, you have to convert bop

“Target (y) not found or it is not numeric” -Package smbinning - R

核能气质少年 提交于 2019-12-25 16:09:23
问题 I am trying to use smbinning package in R software to find optimal binnings to a certain variable. Running the command result=smbinning(df=bop,y="FLAG_TARGET",x="VL_TOTL_REND",p=0.05) returns the following error message: "Target (y) not found or it is not numeric" What is happening here? FLAG_TARGET is numeric and I have already tried to change data format to integer but it does not work. Is there a solution to this issue? 回答1: It is because bop is not a data frame, you have to convert bop

How to find the index position on ZedGraph

允我心安 提交于 2019-12-12 12:08:50
问题 Is there any ways around to find the index position of a curve, based on the current xPosition, let's say I have a curve Item - MyCurve, which has 20k points and when the mouse moves I could get the mouse location & then I could get the x & y positions by simply using the following function. double xPos=0, yPos=0; this.zedGraphControl1.GraphPane.ReverseTransform(MouseLoc, out xPos, out yPos); but I want to find the data points from the curve item, any suggestions...? Thanks in advance....:)

Make color palette of discretized values for a continuous variable (lattice levelplot)

我与影子孤独终老i 提交于 2019-12-11 07:29:18
问题 Following up on this question, I want to make a levelplot heat map and color each cell according to the variable p.value in my data frame. I would like to have the cells colored in such way that there are only 3 colors (discretized color palette for continuous variable): white for p.values >0.05 red for p.values <0.05 and >0.01 dark red for p.values <0.01 So far this is my MWE. set.seed(150) pv.df <- data.frame(compound=rep(LETTERS[1:8], each=3), comparison=rep(c("a/b","b/c","a/c"), 8), p

discretization in R with arules package

血红的双手。 提交于 2019-12-06 02:38:18
问题 I am using arules package to discretize my continuous variables in data frame. I am using this particular line discretize(data1,categories = 3) but its giving me an error Error in cut.default(x,k2) : k2 must be numeric I am just trying to convert my continuous variables from "data1" data frame to 3 bins discrete variables. Any help would be appreciated...thanks in advance 回答1: Check this code: library(arules) data1 <- sample(1:30,100,replace = T) res <- discretize(data1,categories = 3) It

How to do discretization of continuous attributes in sklearn?

旧巷老猫 提交于 2019-11-29 19:51:50
问题 My data consists of a mix of continuous and categorical features. Below is a small snippet of how my data looks like in the csv format (Consider it as data collected by a super store chain that operates stores in different cities) city,avg_income_in_city,population,square_feet_of_store_area, store_type ,avg_revenue NY ,54504 , 3506908 ,3006 ,INDOOR , 8000091 CH ,44504 , 2505901 ,4098 ,INDOOR , 4000091 HS ,50134 , 3206911 ,1800 ,KIOSK , 7004567 NY ,54504 , 3506908 ,1000 ,KIOSK , 2000091 Her

R calculate the average of one column corresponding to each bin of another column [duplicate]

江枫思渺然 提交于 2019-11-27 22:49:21
问题 This question already has an answer here: R aggregate data in one column based on 2 other columns 1 answer I have these data that has two columns. As you can see in the graph, the data has too much noise. So, I want to discretize column "r" with size 5, and assign each row to its corresponding bin, then calculate the average of f for each bin. > dr r f 1 65.06919 21.796 2 62.36986 22.836 3 59.81639 22.980 4 57.42822 22.061 5 55.22681 21.012 6 53.23533 21.274 7 51.47815 21.594 8 49.98000 22