forum.alglib.net

ALGLIB forum
It is currently Thu Mar 28, 2024 1:36 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Format of decision forest using catagorical data
PostPosted: Wed Apr 22, 2015 12:08 am 
Offline

Joined: Tue Apr 21, 2015 11:58 pm
Posts: 1
Hi, I am new to Alglib and I am trying to use the decision forest class with both predictors and response variables are categorical, i.e strings in C#, I was just wondering how should I form the input dataset. I know that the function requires " double[,] xy" as the training data, and I looked at the general principal but I am still a little confused.

My data set is like the following, where the first column is the response:
[["up", "down", ....] , ["High","Medium" ,"Low",...], ..., ["a", "b", "c"]]

should I encode it like this:

xy=[[1,0,...], [0,,1,2,...],..., [0,1,2]]

could anyone help me with this , thank you so much!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group