Comments (4)
using such a formula is not supported by the regression methods in scikit-learn — am I missing something @mortonjt ?
Instead, all feature data are used to build the model. Only a single metadata category can be predicted at once. Multilabel prediction is not supported (in a useful way) by scikit-learn.
from q2-sample-classifier.
That's pretty easy to do -- we can enable it by using patsy. This has not been traditionally supported in scikit-learn, but it is supported in statsmodels, and is a standard when analyzing datasets in R.
The multilabel prediction is actually supported in scikit-learn (I know! I was surprised too).
See the input types for lasso regression and random forests regression
This could be a huge improvement in the usability over what is currently offered in scikit-learn, and also seriously open the doors for building complex models.
from q2-sample-classifier.
sorry, I meant multioutput prediction. scikit-learn does support basic multioutput but this is merely training multiple independent regressors, and does not predict the relationship among targets (i.e., metadata categories). There is a little more discussion of this in #15 .
I like the suggestion to use patsy for building regression formulae, but I don't think this is feasible here. The intended features (independent variables) are a feature table, which would most likely consist of many many features, NOT metadata. Metadata categories are the targets (dependent variables). Building a formula with hundreds of features would be arduous. I am familiar with the use of such formulae in R and patsy but when metadata are used as the independent variables and features/observed data are used as dependent variables. This is the reverse of what q2-sample-classifier
is meant to perform. @mortonjt could you please provide a little more clarification on how you would image these formulae being used?
from q2-sample-classifier.
Sorry -- let me try to clarify.
I totally agree, you don't want to use regression formulas for the features (i.e. OTUs). That will get disgusting very quickly. But you can also use the regression formulas to model the interactions between the outputs.
Here is an example. Say that we wanted to use lasso regression. We can use something as follows
res = lasso()
res.fit('age * sex + disease', Y=metadata, X=otu_table)
where age
, sex
and disease
are metadata variables. The formula will allow you create a new modified output matrix, that will explicitly test for the interaction effect due to age. It will also allow you to test for multiple categories simultaneously. In this particular case it will test for how well that the following can be predicted
age
sex
age
*sex
interactiondisease
from q2-sample-classifier.
Related Issues (20)
- add `heatmap` to the `*-samples` pipelines
- BUG: heatmap dimensions are distorted HOT 13
- BUG: ROC plots fail with binary data in v.2019.7
- clean up unit tests HOT 4
- ROC Curves bubbles up a confusing sklearn error message HOT 1
- BUG: metatable should not remove metadata columns with all unique values
- DEP: pandas 0.25.x updates
- confusion-matrix should attempt to match dtype of predicted and true values
- BUG: Confusion matrices with many proportion bars
- ENH: `summarize` should provide link to download raw data from RFE plots
- Possible bug: 'LinearSVC' object has no attribute 'predict_proba'
- Ridge Regressor Precision Errors
- `split_table`: add support for multi-category stratification and other stratification options
- add optimize_feature_selection option to classify-samples-ncv
- ENH: Allow model training on complete dataset
- ENH : add support for GPU accelerated classifiers HOT 1
- ENH: `regress_samples*` should output target metadata (`true_targets`)
- Support for SHAP HOT 3
- test failure with sklearn 1.2.1 HOT 3
- ENH: classify-* and regress-* actions should accept FeatureTable[RelativeFrequency]
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 q2-sample-classifier.