Comments (4)
Hey @lukehutch, thanks for the feedback. I'm still working on the wiki pages (they are not complete yet).
- In dense format, class (or target) attribute can appear at any position since for most use cases on dense format, we have reasonable features to handle and therefore providing an additional attribute file can help. In sparse format, usually we have many features and the input is highly sparse. Therefore I use the standard libsvm-like format. In this case, an attribute file is not provided and therefore we need to follow some convention to get the target position.
- I don't think that's the case. Can you email me a data file with attribute file so that I can test? It's actually perfectly fine if the number of attributes in attribute file is less than the number of columns in data file. The remaining columns will be read but when building models, all those columns will be ignored.
- I will make this clear in the wiki.
- This is something that I'll improve in the future. Here're the cases where attribute file is null and how it is parsed by mltk. For dense format, that means there would be no target value (NaN is assigned). This might be used in the future for unsupervised learning algorithms (similarly, if there's no target attribute specified in attribute file, there will be no target value). For sparse format, current the first one has to be the target.
Thanks again for the feedback.
from mltk.
On #2 (assuming you're referring to my third bullet point?): Here is the relevant code:
https://github.com/yinlou/mltk/blob/master/src/main/java/mltk/core/io/InstancesReader.java#L72
In the case of dense instances with the wrong number of attributes, the line is skipped by the if-statement in line 76.
from mltk.
Now I remember. In the input, number of features in the attribute file does need to match the number of columns in the data file. I wanted to enforce that so that feature description in the attribute file always matches the corresponding data file. In which scenario do you want to have a smaller attribute file?
from mltk.
The situation arose because I misunderstood the docs. I didn't know that "(class)" implied the target, because I was doing regression, not classification, and this tag was not described in the text. As I tried to portray in the original bug report, it is not clear from the examples as to how you should specify the target. In the case where you show "(class)" in the attributes file, you have the class occurring last. However, under "Sparse input format", you show the target occurring first. Because I didn't see a mention of target in the attributes, and because I didn't know "(class)" meant "target, whether regression or classification", I assumed that the target was always supposed to be in the first column. Thus my attributes file had one fewer attribute than there were columns.
I think the way to fix the documentation is to have two complete examples: One for classification, one for regression. Or at least make all the examples of attribute and datafiles refer to a single consistent example, and explain that "(class)" must be present and means the target, whether you're doing regression or classification.
from mltk.
Related Issues (14)
- Need for programmatic setup of datasets HOT 2
- Regression trees cause GC churn HOT 3
- could you provide some working data set?
- Add MLTK to Maven Central HOT 1
- Support for data already in program HOT 2
- JAR file HOT 1
- "mvn clean package" doesn't work HOT 7
- How to run GA2M with FAST? HOT 2
- is normalization step needed in feature preparation? HOT 1
- ElasticNet results inconsistent HOT 1
- Residuals not saved when building GAM HOT 4
- Typo in DoublePairComparator HOT 1
- GAM plots with nominal interaction terms HOT 2
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 mltk.