[mlpack-git] [mlpack/mlpack] Wrong number of mapping while Loading (#658)
stereomatchingkiss
notifications at github.com
Mon May 30 10:40:26 EDT 2016
@keonkim I think the behavior is correct, let us use non-tranpose case to discuss the behavior
codes :
```
try{
arma::mat data;
data::DatasetInfo info;
bool const fatal = true;
bool const transpose = false;
data::Load("simple00.csv", data, info, fatal, transpose);
std::cout << data << endl;
std::cout<<"dimensions == "<<info.Dimensionality()<<std::endl;
Log::Info << "dataset info: " << endl;
for (size_t i = 0; i < data.n_rows; ++i)
{
std::cout << info.NumMappings(i) << " mappings in dimension "
<< i << "." << endl;
}
}catch(std::exception const &ex){
std::cerr<<ex.what()<<std::endl;
}
```
Before we transpose, mlpack treat every columns as an example, every row as a dimension
every dimension represent one type of feature(height, weight, color, etc).
After we know how mlpack treat the data, everything are simple
input data
a, b, c
b, 102, 1002
c, 103, 1003
d, 104, 1004
What would you expect?Since every row represent to a feature, we know that a,b,c at row 0 should map to different numeric value.Because Every row represent to different features, we know that a,b,c,d at column 0 should map to one numeric value. What are the output?
output :
0.000000e+00 1.0000e+00 2.0000e+00
0.000000e+00 1.0200e+02 1.0020e+03
0.000000e+00 1.0300e+02 1.0030e+03
0.000000e+00 1.0400e+02 1.0040e+03
As expected, right?
3 mappings in dimension 0.
1 mappings in dimension 1.
1 mappings in dimension 2.
1 mappings in dimension 3.
So, why it looks like that?
a, b, c
b, 102, 1002
c, 103, 1003
d, 104, 1004
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/658#issuecomment-222506395
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160530/b45e3e0b/attachment.html>
More information about the mlpack-git
mailing list