71 void encodeCompositionVector(
const String & sequence, std::vector<std::pair<Int, double> > & encoded_vector,
const String & allowed_characters =
"ACDEFGHIKLMNPQRSTVWY");
82 void encodeCompositionVectors(
const std::vector<String> & sequences,
const String & allowed_characters, std::vector<std::vector<std::pair<Int, double> > > & composition_vectors);
84 svm_node * encodeLibSVMVector(
const std::vector<std::pair<Int, double> > & feature_vector);
87 void encodeLibSVMVectors(
const std::vector<std::vector<std::pair<Int, double> > > & feature_vectors, std::vector<svm_node *> & libsvm_vectors);
90 svm_problem * encodeLibSVMProblem(
const std::vector<svm_node *> & vectors,
91 std::vector<double> & labels);
94 svm_problem * encodeLibSVMProblemWithCompositionVectors(
const std::vector<String> & sequences,
95 std::vector<double> & labels,
96 const String & allowed_characters);
99 svm_problem * encodeLibSVMProblemWithCompositionAndLengthVectors(
const std::vector<String> & sequences,
100 std::vector<double> & labels,
101 const String & allowed_characters,
102 UInt maximum_sequence_length);
105 svm_problem * encodeLibSVMProblemWithCompositionLengthAndWeightVectors(
const std::vector<String> & sequences,
106 std::vector<double> & labels,
107 const String & allowed_characters);
110 bool storeLibSVMProblem(
const String & filename,
const svm_problem * problem)
const;
113 svm_problem * loadLibSVMProblem(
const String & filename);
116 void encodeOligoBorders(
String sequence,
118 const String & allowed_characters,
120 std::vector<std::pair<Int, double> > & libsvm_vector,
122 bool unpaired =
false,
123 bool length_encoding =
false);
126 svm_problem * encodeLibSVMProblemWithOligoBorderVectors(
const std::vector<String> & sequences,
127 std::vector<double> & labels,
129 const String & allowed_characters,
132 bool unpaired =
false,
133 bool length_encoding =
false);
136 void encodeProblemWithOligoBorderVectors(
const std::vector<AASequence> & sequences,
138 const String & allowed_characters,
140 std::vector<std::vector<std::pair<Int, double> > > & vectors);
148 void libSVMVectorToString(svm_node * vector,
String & output);
156 void libSVMVectorsToString(svm_problem * vector,
String & output);
166 const String & allowed_characters,
167 std::vector<std::pair<Int, double> > & values,
168 bool is_right_border =
false);
175 static void destroyProblem(svm_problem * problem);
179 static bool cmpOligos_(std::pair<Int, double> a,
180 std::pair<Int, double> b);
A more convenient string class.
Definition: String.h:57
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Serves for encoding sequences into feature vectors.
Definition: LibSVMEncoder.h:54
Representation of a peptide/protein sequence.
Definition: AASequence.h:107
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46