Comments (8)
You have to specify your dependent variable name with --depvarname
. In the example it was the iris dataset, where Species
is the dependent variable.
from ranger.
Currently ranger is doing supervised learning, meaning you have to know the truth for your classification task. This truth will be your dependent variable for the training. I guess in your case this would be the true letters.
from ranger.
Please name the columns in your dataset in a header line. In addition, please code your outcome as numeric values.
Generally I would suggest to use the R version. These are all problems specific to the pure C++ version, which is not very optimised for usability. ;)
from ranger.
A dataset could look like this:
y x1 x2 x3
1 1.1 4.5 6.3
1 2.0 5.2 9.1
2 0.9 3.8 5.4
2 1.4 4.1 7.2
...
If y
is your outcome and x1, x2, x3 are your predictors, you use --depvarname y
.
This is probably not the right place for this question. I'm closing here, please post on Stack Overflow or the like.
from ranger.
Thanks for your reply. I still have some questions. For example , letter-recognization work, the train dataset is just numerical values,how can i make sure the dependent variable ? Or where is the "dependent variable" defined or used in the codes? I will very appreciate for your reply!
from ranger.
thans for your reply. my test work is supervised learing,which is letter-recognization.And train dataset's format is such as:
T,2,8,3,5,1,8,13,0,6,6,10,8,0,8,0,8
I,5,12,3,7,2,10,5,5,4,13,3,9,2,8,4,10
D,4,11,6,8,6,10,6,2,6,10,3,7,3,7,3,9
.......
the first column is label from A to Z,and others are characteristic。
How do I identify the --depvarname?
And I find the define of variable_name in the code <Data.cpp>
size_t Data::getVariableID(std::string variable_name) {
std::vectorstd::string::iterator it = std::find(variable_names.begin(), variable_names.end(), variable_name);
if (it == variable_names.end()) {
throw std::runtime_error("Variable " + variable_name + " not found.");
}
return (std::distance(variable_names.begin(), it));
}
so variable_name is vector?
I will very appreciate for your reply!
from ranger.
Hi,I am sorry to trouble you again,but i still have some questions.
First,I have read your codes, and find that train dataset label is on the first line in the dataset,and in the same column,it is characteristic under the first row.Are there any wrong ideas? For examplr:(I have replaced "A"with 1,"B" with 2,and so on)
A,B,C,F,G,............
1,3,5,6,9,............
3,5,8,3,4,............
.,.,.,.,.,............
.,.,.,.,.,............
Secondly,I still do not understand how to use --depvarname.In my work ,I have A~Z ,26 classes,then how to set this parameter.
I will very appreciate for your reply!
from ranger.
Thank you very much!
from ranger.
Related Issues (20)
- Decision Tree Build HOT 2
- Random forest prediction intervals using the out-of-bag predictions errors. HOT 2
- Is there a way to fit an isolation forest using ranger? HOT 1
- Node-wise impurity decrease HOT 2
- Extract "dependent.variable.name" from a ranger object HOT 6
- No Tree Plotting Function Provided by Package HOT 2
- Add C++14 specification (`std::make_unique` is only avaiable from C++14 onwards) HOT 2
- classProbs are not in line with the predicted label HOT 4
- Trees summary statistics: height, splits HOT 2
- Matrices without colnames. HOT 2
- A check on inbag size would be nice
- Feature Request: inclusion of the trivial random forest model HOT 2
- compilation failed for package 'ranger' HOT 2
- Clarify Gini index calculation HOT 2
- What is the difference between case.weights, class.weights and sample.fraction? HOT 1
- Identifying out-of-bag observations for each tree HOT 4
- parallel execution of importance_pvalues HOT 1
- Simple fix for installation issue found? HOT 1
- consistent errors with ranger on MacBook Pro Sonoma 14.1.1 HOT 1
- Create a list of forks, extensions etc.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ranger.