Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can I supply (trainsvm) my dataset if it was in text form?

1 visualización (últimos 30 días)
Muneera Abdulsalam
Muneera Abdulsalam el 2 de En. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I am using trainsvm to train my dataset, I have the group names, and related text in different forms (doc, pdf).
1. How can I supply this text for svm to train it? In what form (extension) Matlab will accept the input? 2. Is there another function I should use before training to select features? If so, What choices does Matlab provide?

Respuestas (1)

mizuki
mizuki el 3 de En. de 2017
Assuming that you use SVMTRAIN function.
1. Your variable should be either string array (which is released in R2016b) or cell array if your target vector contains text.
2. Preprocessing depends on your data, so do not care about it at first. There are so many, but PCA (principal component analysis) would be the easy one to use for preprocessing data.
If you have MATLAB whose version is R2015a or later, use classificationLearner app & its MATLAB code generation feature.
  • classification learner
  3 comentarios
Muneera Abdulsalam
Muneera Abdulsalam el 3 de En. de 2017
My question is that, I am having my data in a form of text, how can I tokenize, select features, and give this information back to the function? Is it done manually? or is there certain tools? will Classification Learner tokenize and select features for me?
Walter Roberson
Walter Roberson el 3 de En. de 2017
You need to write the tokenization code, which is not easy to get right for English text, especially when you consider quoted material and the multiple uses of "." and ","

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by