Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Plot of non-parametric vs parametric 'prob' outcomes

$
0
0

@Hemant_Rupani wrote:

I am not able to plot for the aforesaid question on binary outcome.

Let

data=data.frame(feature1=c(rep(1,10),rep(2,10),rep(3,10)),feature2=c(rep(letters[1:2],15)),Outcome=sample(0:1,30,replace = T))

ggplot(data,aes(feature1,Outcome))+geom_point()+geom_smooth(method ='glm',method.args=list(family='binomial'))+facet_wrap(~feature2)

here I get only points at 1s and 0s, But I want points at probabilities by non-parametric model.(i.e (Outcome==1)/(all Outcomes(0s and 1s) for a particular 'feature1' segregated by 'feature2')

I know I can form a column for required probabilities from NonParametric model, but it will be very tedious to do for all combination of 'facet_wrap' and 'aes'

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles