[R] MDS plot in Random Forest

Ismail SEZEN sezenismail at gmail.com
Fri May 26 09:54:00 CEST 2017


> On 25 May 2017, at 20:35, Elahe chalabi via R-help <r-help at r-project.org> wrote:
> 
> Thanks for your reply Bert. But the question on how to plot MDS on predicted data I guess belong to here!

Actually, You have 2 questions in conflict.

1- how can I plot MDS on predicted data?
2- Is MDS plot a way to find out if the classification are easy to be separated?

In first, You know what MDS is and asking only how to plot. In second, you ask how to interpret it. So, I suspect, too (as Bert did) that you actually want to learn how to interpret a MDS plot.

For the first question, I think you are looking for MDSplot function already comes with randomForest package. (type ?MDSplot in R)
For the second one, see the links below. If they are not enough, then ask your question again in stats.stackexchange.com <http://stats.stackexchange.com/>.

a) http://www.statmethods.net/advstats/mds.html <http://www.statmethods.net/advstats/mds.html>
b) https://stats.stackexchange.com/questions/40737/randomforest-mds-plot-interpretation <https://stats.stackexchange.com/questions/40737/randomforest-mds-plot-interpretation>
c) http://r.789695.n4.nabble.com/interpretation-of-MDS-plot-in-random-forest-td4681459.html <http://r.789695.n4.nabble.com/interpretation-of-MDS-plot-in-random-forest-td4681459.html>


> 
> 
> 
> 
> On Thursday, May 25, 2017 9:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> 
> 
> 
> Elahe:
> 
> 
> On Thu, May 25, 2017 at 8:15 AM, Elahe chalabi via R-help
> <r-help at r-project.org> wrote:
>> Hi all,
>> I have applied Random Forest on my data and divided data into test and rain set to see the prediction results and it seems good cause the accuracy is 82%. Now my question is how can I plot MDS on predicted data? here is my code:
>> 
>> 
>> 
>>  spl=sample.split(df$PatientType,SplitRatio = 0.7)
>>  Train=subset(df,spl==TRUE)
>>  Test=subset(df,spl==FALSE)
>>  SecondTree=randomForest(PatientType~ cookie + curtains + get + mother + overflowing + sink +thats + window + stool + heres + drying + chair + okay +outside +  standing + tipping + windows + blowing + breeze +counter + finger + onto + open + reaching + didnt + spilled +action + quiet + summer + mouth + puddle + good +     wind +whos + sort,data = Train,nodesize=25,ntree=200,proximity=TRUE)
>>  PredictForest=predict(SecondTree,newdata =Test)
> 
> 
>> Is MDS plot a way to find out if the classification are easy to be separated?
> 
> This seems to be largely a statistics question and, if so, is OT here
> (this list is about R programming) I suggest you post this on
> stats.stackexchange.com instead.
> 
> Cheers,
> Bert
> 
> 
> 
>> 
>> thanks for any help.
>> Elahe
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


	[[alternative HTML version deleted]]



More information about the R-help mailing list