Tools or R / Python packages to perfom ML models
1
0
Entering edit mode
12 months ago
sil_bioinfo ▴ 50

Hello,

I'm not very good at programming yet, so I was wondering if there are tools like "Weka" or some R/Python packages with which I could test different machine learning models.

I would like to use this dataset: https://www.ebi.ac.uk/ena/browser/view/PRJEB31975 And I have a list of differentially expressed (DE) genes, and the sample metadata.

Thank you in advance!

Python machine-learning R transcriptomics • 1.3k views
ADD COMMENT
1
Entering edit mode

R and Python have access to most ML methods, it's just a matter of learning either of the languages and then finding which libraries are popular for your method of interest.

ADD REPLY
0
Entering edit mode

Hi, I'm more comfortable with R right now. I found the R package "mlr3", I don't know if you know of any others. I would appreciate it if you tell me. And any other software tool like "weka"? thank you in advance!

ADD REPLY
1
Entering edit mode

Just to clarify:

Many ML models are trained and executed using dedicated software libraries for machine learning and artificial intelligence, such as Tensorflow und Torch. Those are quite complex, so SDKs make their interfaces a bit easier to work with. PyTorch for example allows controlling Torch using instructions written in Python for developers already familiar with it. Keras does the same for Tensorflow - it is a Python interface to that library.

However, there are similar interfaces for R as well. Just google "Torch + R-stats" or "Tensorflow + Rstats" and you will see that Keras has been fully ported to R by now. and there is also a torch package to use Torch from R. In this sense, you can use R or Python and will be able to train using the same tool underneath. See e.g. the many examples on sites like Kaggle to understand how the models can be specified and evaluated.

There are admittedly also tools that are specific to Pyhon (scikit-learn) or R (caret).

ADD REPLY
1
Entering edit mode

Oh, I understand. Thank you so much for your help!

The truth is that there is so much information, so many packages, libraries, tutorials, etc to do ML in both R and Python, that I felt totally lost.

ADD REPLY
2
Entering edit mode
12 months ago
Michael 55k

How about TensorFlow? https://www.tensorflow.org/overview You can run the examples directly in Colab.

This short introduction uses Keras to:

- Load a prebuilt dataset.
- Build a neural network machine learning model that classifies images.
- Train this neural network.
- Evaluate the accuracy of the model.

[....]

import tensorflow as tf
print("TensorFlow version:", tf.__version__)

[....]

Conclusion
Congratulations! You have trained a machine learning model using a prebuilt dataset using the Keras API.

For more examples of using Keras, check out the tutorials. To learn more about building models with Keras, read the guides. If you want learn more about loading and preparing data, see the tutorials on image data loading or CSV data loading.
ADD COMMENT
0
Entering edit mode

I would like to train ML models without using datasets with images. Specifically, I would like to use transcriptomic data. Is it still possible to use tensorflow? If not, could you recommend to me any Python library for this? Thank you in advance!

ADD REPLY
2
Entering edit mode

If you have a lot of training data with class labels, as your dataset seems to be you could turn it into an ML classification problem. Gene expression data are also just a matrix so it should be possible. TF is used to build AlphaFold, so it is powerful enough for your case. But it might be overkill, possibly a simple linear discriminant analysis (which is also ML) in R will be enough. I recommend to work through some of the tutorials with toy data first and try to understand what is happening. https://rpubs.com/Aakansha_garg/261616

could you recommend to me any Python library for this

import tensorflow as tf # this is a python API

Scikit-learn is another option, possibly more user friendly and more suited to your case.

ADD REPLY

Login before adding your answer.

Traffic: 1810 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6