Skip to content

Commit

Permalink
More swig cleanup (#5064)
Browse files Browse the repository at this point in the history
* remove kernel normalizer
* cleanup library.i
* cleanup features.i
* Removed string kernels from interface
  • Loading branch information
gf712 authored Jul 3, 2020
1 parent 3899822 commit f751f94
Show file tree
Hide file tree
Showing 142 changed files with 1,123 additions and 2,217 deletions.
2 changes: 1 addition & 1 deletion data
38 changes: 19 additions & 19 deletions doc/ipython-notebooks/classification/MKL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -686,20 +686,20 @@
"labels_rem = sg.MulticlassLabels(Yrem)\n",
"\n",
"kernel = sg.create_kernel(\"CombinedKernel\")\n",
"feats_train = sg.CombinedFeatures()\n",
"feats_test = sg.CombinedFeatures()\n",
"feats_train = sg.create_features(\"CombinedFeatures\")\n",
"feats_test = sg.create_features(\"CombinedFeatures\")\n",
"\n",
"#append gaussian kernel\n",
"subkernel = sg.create_kernel(\"GaussianKernel\", log_width=np.log(15))\n",
"feats_train.append_feature_obj(feats)\n",
"feats_test.append_feature_obj(feats_rem)\n",
"feats_train.add(\"feature_array\", feats)\n",
"feats_test.add(\"feature_array\", feats_rem)\n",
"kernel.add(\"kernel_array\", subkernel)\n",
"\n",
"#append PolyKernel\n",
"feats = sg.create_features(Xtrain)\n",
"subkernel = sg.create_kernel('PolyKernel', degree=10, c=2)\n",
"feats_train.append_feature_obj(feats)\n",
"feats_test.append_feature_obj(feats_rem)\n",
"feats_train.add(\"feature_array\", feats)\n",
"feats_test.add(\"feature_array\", feats_rem)\n",
"kernel.add(\"kernel_array\", subkernel)\n",
"\n",
"kernel.init(feats_train, feats_train)\n",
Expand Down Expand Up @@ -846,26 +846,26 @@
"feats_out=sg.create_features(x_out)\n",
"\n",
"kernel=sg.create_kernel(\"CombinedKernel\")\n",
"feats_train=sg.CombinedFeatures()\n",
"feats_test=sg.CombinedFeatures()\n",
"feats_test_out=sg.CombinedFeatures()\n",
"feats_grid=sg.CombinedFeatures()\n",
"feats_train=sg.create_features(\"CombinedFeatures\")\n",
"feats_test=sg.create_features(\"CombinedFeatures\")\n",
"feats_test_out=sg.create_features(\"CombinedFeatures\")\n",
"feats_grid=sg.create_features(\"CombinedFeatures\")\n",
"\n",
"#append gaussian kernel\n",
"subkernel=sg.create_kernel(\"GaussianKernel\", log_width=np.log(8))\n",
"feats_train.append_feature_obj(feats)\n",
"feats_test.append_feature_obj(feats_t)\n",
"feats_test_out.append_feature_obj(feats_out)\n",
"feats_grid.append_feature_obj(grid)\n",
"feats_train.add(\"feature_array\", feats)\n",
"feats_test.add(\"feature_array\", feats_t)\n",
"feats_test_out.add(\"feature_array\", feats_out)\n",
"feats_grid.add(\"feature_array\", grid)\n",
"kernel.add(\"kernel_array\", subkernel)\n",
"\n",
"#append PolyKernel\n",
"feats = sg.create_features(traindata)\n",
"subkernel = sg.create_kernel('PolyKernel', degree=10, c=3)\n",
"feats_train.append_feature_obj(feats)\n",
"feats_test.append_feature_obj(feats_t)\n",
"feats_test_out.append_feature_obj(feats_out)\n",
"feats_grid.append_feature_obj(grid)\n",
"feats_train.add(\"feature_array\", feats)\n",
"feats_test.add(\"feature_array\", feats_t)\n",
"feats_test_out.add(\"feature_array\", feats_out)\n",
"feats_grid.add(\"feature_array\", grid)\n",
"kernel.add(\"kernel_array\", subkernel)\n",
"\n",
"kernel.init(feats_train, feats_train)\n",
Expand Down Expand Up @@ -985,7 +985,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions doc/ipython-notebooks/intro/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"outputs": [],
"source": [
"#Load the file\n",
"data_file=sg.LibSVMFile(os.path.join(SHOGUN_DATA_DIR, 'uci/diabetes/diabetes_scale.svm'))"
"data_file=sg.read_libsvm(os.path.join(SHOGUN_DATA_DIR, 'uci/diabetes/diabetes_scale.svm'))"
]
},
{
Expand Down Expand Up @@ -542,8 +542,8 @@
"metadata": {},
"outputs": [],
"source": [
"temp_feats = sg.create_features(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"labels=sg.create_labels(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"temp_feats = sg.create_features(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"labels=sg.create_labels(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"\n",
"#rescale to 0...1\n",
"preproc=sg.create_transformer(\"RescaleFeatures\")\n",
Expand Down
10 changes: 5 additions & 5 deletions doc/ipython-notebooks/metric/LMNN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@
"metadata": {},
"outputs": [],
"source": [
"ape_features = sg.create_features(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'multiclass/fm_ape_gut.dat')))\n",
"ape_labels = sg.create_labels(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'multiclass/label_ape_gut.dat')))"
"ape_features = sg.create_features(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'multiclass/fm_ape_gut.dat')))\n",
"ape_labels = sg.create_labels(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'multiclass/label_ape_gut.dat')))"
]
},
{
Expand Down Expand Up @@ -619,7 +619,7 @@
"outputs": [],
"source": [
"statistics = lmnn.get_statistics()\n",
"plt.plot(statistics.obj.get())\n",
"plt.plot(statistics.get(\"obj\"))\n",
"plt.grid(True)\n",
"plt.xlabel('Number of iterations')\n",
"plt.ylabel('LMNN objective')\n",
Expand Down Expand Up @@ -660,8 +660,8 @@
"metadata": {},
"outputs": [],
"source": [
"wine_features = sg.create_features(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/wine/fm_wine.dat')))\n",
"wine_labels = sg.create_labels(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/wine/label_wine.dat')))\n",
"wine_features = sg.create_features(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/wine/fm_wine.dat')))\n",
"wine_labels = sg.create_labels(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/wine/label_wine.dat')))\n",
"\n",
"assert(wine_features.get(\"num_vectors\") == wine_labels.get(\"num_labels\"))\n",
"print('%d feature vectors with %d features from %d different classes.' % (wine_features.get(\"num_vectors\"), \\\n",
Expand Down
8 changes: 4 additions & 4 deletions doc/ipython-notebooks/multiclass/Tree/DecisionTrees.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,8 @@
"metadata": {},
"outputs": [],
"source": [
"train_feats = sg.create_features(sg.CSVFile( os.path.join(SHOGUN_DATA_DIR, 'uci/wine/fm_wine.dat')))\n",
"train_labels = sg.create_labels(sg.CSVFile( os.path.join(SHOGUN_DATA_DIR, 'uci/wine/label_wine.dat')))"
"train_feats = sg.create_features(sg.read_csv( os.path.join(SHOGUN_DATA_DIR, 'uci/wine/fm_wine.dat')))\n",
"train_labels = sg.create_labels(sg.read_csv( os.path.join(SHOGUN_DATA_DIR, 'uci/wine/label_wine.dat')))"
]
},
{
Expand Down Expand Up @@ -1616,8 +1616,8 @@
"metadata": {},
"outputs": [],
"source": [
"train_feats=sg.create_features(sg.CSVFile( os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"train_labels=sg.create_labels(sg.CSVFile( os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"train_feats=sg.create_features(sg.read_csv( os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"train_labels=sg.create_labels(sg.read_csv( os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"\n",
"# print range of regression labels - this is useful for calculating relative deviation later \n",
"print('labels range : '+str(np.ptp(train_labels.get(\"labels\"))))"
Expand Down
4 changes: 2 additions & 2 deletions doc/ipython-notebooks/multiclass/Tree/TreeEnsemble.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"%matplotlib inline\n",
"\n",
"def load_file(feat_file,label_file):\n",
" feats=sg.create_features(sg.CSVFile(feat_file))\n",
" labels=sg.create_labels(sg.CSVFile(label_file))\n",
" feats=sg.create_features(sg.read_csv(feat_file))\n",
" labels=sg.create_labels(sg.read_csv(label_file))\n",
" return (feats, labels)\n",
"\n",
"trainfeat_file=os.path.join(SHOGUN_DATA_DIR, 'uci/letter/train_fm_letter.dat')\n",
Expand Down
4 changes: 2 additions & 2 deletions doc/ipython-notebooks/regression/Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@
"metadata": {},
"outputs": [],
"source": [
"feats = sg.create_features(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"train_labels = sg.create_labels(sg.CSVFile(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"feats = sg.create_features(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/fm_housing.dat')))\n",
"train_labels = sg.create_labels(sg.read_csv(os.path.join(SHOGUN_DATA_DIR, 'uci/housing/housing_label.dat')))\n",
"mat = feats.get('feature_matrix')\n",
"\n",
"crime_rate = mat[0]\n",
Expand Down
3 changes: 1 addition & 2 deletions examples/meta/generator/targets/cpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@
"create_evaluation_result": "create<EvaluationResult>($arguments)",
"create_distribution": "create<Distribution>($arguments)",
"create_combination_rule": "create<CombinationRule>($arguments)",
"create_int_string_features": "create<StringFeatures<uint16_t>>($arguments)",
"create_string_features": "details::string_features($arguments)",
"create_subset_features": "create<DenseSubsetFeatures<float64_t>>($arguments)",
"create_char_string_features": " create<StringFeatures<char>>($arguments)",
"create_gaussian_process": "create<GaussianProcess>($arguments)"
},
"Identifier": "$identifier",
Expand Down
12 changes: 7 additions & 5 deletions examples/meta/generator/targets/csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"Separator": ";\n",
"InitialSeperatorWhenArgs>0": false
},
"BoolVector": "var $name = new byte[$arguments]",
"CharVector": "var $name = new char[$arguments]",
"ByteVector": "var $name = new byte[$arguments]",
"WordVector": "var $name = new ushort[$arguments]",
Expand All @@ -21,6 +22,7 @@
"RealVector": "var $name = new double[$arguments]",
"LongRealVector": "var $name = new double[$arguments]",
"ComplexVector": "var $name = new Complex[$arguments]",
"BoolMatrix": "var $name = new byte[$arguments]",
"CharMatrix": "var $name = new char[$arguments]",
"ByteMatrix": "var $name = new byte[$arguments]",
"WordMatrix": "var $name = new ushort[$arguments]",
Expand All @@ -33,7 +35,7 @@
"ComplexMatrix": "var $name = new Complex[$arguments]"
},
"ListInit": {
"BoolVector": "var $name = new bool[] {$arguments}",
"BoolVector": "var $name = new byte[] {$arguments}",
"CharVector": "var $name = new char[] {$arguments}",
"ByteVector": "var $name = new byte[] {$arguments}",
"WordVector": "var $name = new ushort[] {$arguments}",
Expand Down Expand Up @@ -101,14 +103,14 @@
"Access": {
"Vector": "$identifier[$indices]",
"Matrix": "$identifier[$indices]",
"BoolVector": "$identifier.get_element($indices)",
"BoolMatrix": "$identifier.get_element($indices)"
"BoolVector": "$identifier[$indices] == 1 ? true : false",
"BoolMatrix": "$identifier[$indices] == 1 ? true : false"
},
"Assign": {
"Vector": "$identifier[$indices] = $expr",
"Matrix": "$identifier[$indices] = $expr",
"BoolVector": "$identifier.set_element($expr, $indices)",
"BoolMatrix": "$identifier.set_element($expr, $indices)"
"BoolVector": "$identifier[$indices] = $expr ? (byte)1 : (byte)0",
"BoolMatrix": "$identifier[$indices] = $expr ? (byte)1 : (byte)0"
},
"ZeroIndexed": true
},
Expand Down
14 changes: 8 additions & 6 deletions examples/meta/generator/targets/java.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"IncludeGlobalFunctions": false,
"DependencyListElement": "import org.shogun.$typeName;",
"DependencyListSeparator": "\n",
"ExcludeImport": ["StringCharList", "StringWordList"]
"ExcludeImport": ["StringCharList", "StringWordList", "RealVector", "RealMatrix", "BoolMatrix", "ByteMatrix", "WordMatrix", "IntMatrix", "LongIntMatrix", "ShortRealMatrix", "BoolVector", "IntVector", "ByteVector", "LongIntVector", "ShortRealVector", "WordVector"]
},
"Statement": "$statement;\n",
"Comment": "//$comment\n",
Expand All @@ -19,6 +19,7 @@
"Separator": ";\n",
"InitialSeperatorWhenArgs>0": false
},
"BoolVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"CharVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"ByteVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"WordVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
Expand All @@ -28,6 +29,7 @@
"ShortRealVector": "FloatMatrix $name = new FloatMatrix(1, $arguments)",
"RealVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"LongRealVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"BoolMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"CharMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"ByteMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"WordMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
Expand All @@ -39,7 +41,7 @@
"LongRealMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)"
},
"ListInit": {
"BoolVector": "BoolVector $name = new BoolVector({$arguments})",
"BoolVector": "DoubleMatrix $name = new DoubleMatrix(new double [][] {{$arguments}})",
"CharVector": "DoubleMatrix $name = new DoubleMatrix(new double [][] {{$arguments}})",
"ByteVector": "DoubleMatrix $name = new DoubleMatrix(new double [][] {{$arguments}})",
"WordVector": "DoubleMatrix $name = new DoubleMatrix(new double [][] {{$arguments}})",
Expand Down Expand Up @@ -107,14 +109,14 @@
"Access": {
"Vector": "$identifier.get($indices)",
"Matrix": "$identifier.get($indices)",
"BoolVector": "$identifier.get_element($indices)",
"BoolMatrix": "$identifier.get_element($indices)"
"BoolVector": "$identifier.get($indices) == 1.0 ? true : false",
"BoolMatrix": "$identifier.get($indices) == 1.0 ? true : false"
},
"Assign": {
"Vector": "$identifier.put($indices, $expr)",
"Matrix": "$identifier.put($indices, $expr)",
"BoolVector": "$identifier.set_element($expr, $indices)",
"BoolMatrix": "$identifier.set_element($expr, $indices)"
"BoolVector": "$identifier.put($indices, $expr ? 1.0 : 0.0)",
"BoolMatrix": "$identifier.put($indices, $expr ? 1.0 : 0.0)"
},
"ZeroIndexed": true
},
Expand Down
11 changes: 5 additions & 6 deletions examples/meta/generator/targets/octave.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"InitialSeperatorWhenArgs>0": false
},
"string": "$name = $arguments",
"BoolVector": "$name = false(1, $arguments)",
"ByteVector": "$name = zeros(1, $arguments, 'int8')",
"WordVector": "$name = zeros(1, $arguments, 'int16')",
"IntVector": "$name = zeros(1, $arguments, 'int32')",
Expand All @@ -20,6 +21,7 @@
"ShortRealVector": "$name = zeros(1, $arguments, 'float32')",
"RealVector": "$name = zeros(1, $arguments, 'float64')",
"LongRealVector": "$name = zeros(1, $arguments, 'float64')",
"BoolMatrix": "$name = false($arguments)",
"CharMatrix": "$name = zeros($arguments, 'char')",
"ByteMatrix": "$name = zeros($arguments, 'int8')",
"WordMatrix": "$name = zeros($arguments, 'int16')",
Expand All @@ -31,6 +33,7 @@
"LongRealMatrix": "$name = zeros($arguments, 'float64')"
},
"ListInit": {
"BoolVector": "$name = logical([$arguments])",
"ByteVector": "$name = int8([$arguments])",
"WordVector": "$name = int16([$arguments])",
"IntVector": "$name = int32([$arguments])",
Expand Down Expand Up @@ -65,15 +68,11 @@
"Element": {
"Access": {
"Vector": "$identifier($indices)",
"Matrix": "$identifier($indices)",
"BoolVector": "$identifier.get_element($indices)",
"BoolMatrix": "$identifier.get_element($indices)"
"Matrix": "$identifier($indices)"
},
"Assign": {
"Vector": "$identifier($indices) = $expr",
"Matrix": "$identifier($indices) = $expr",
"BoolVector": "$identifier.set_element($expr, $indices)",
"BoolMatrix": "$identifier.set_element($expr, $indices)"
"Matrix": "$identifier($indices) = $expr"
},
"ZeroIndexed": false
},
Expand Down
2 changes: 1 addition & 1 deletion examples/meta/src/base_api/put_get_add.sg.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ svm.put("libsvm_solver_type", "LIBSVM_C_SVC")
#![option is always returned as a string]
string option = svm.get_option("libsvm_solver_type")

CSVFile f_feats("@SHOGUN_DATA@/regression_1d_sinc_features_train.dat")
File f_feats = read_csv("@SHOGUN_DATA@/regression_1d_sinc_features_train.dat")
Features feats = create_features(f_feats)
Kernel k3 = create_kernel("PolyKernel", degree=2)
Kernel k4 = create_kernel("GaussianKernel", log_width=2.0)
Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/binary/domainadaptationsvm.sg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ File f_feats_test = read_csv("@SHOGUN_DATA@/fm_test_dna.dat")
File f_labels_train = read_csv("@SHOGUN_DATA@/label_train_dna.dat")

#![create_features]
Features feats_train = create_char_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_char_string_features(f_feats_test, enum EAlphabet.DNA)
Features feats_train = create_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_string_features(f_feats_test, enum EAlphabet.DNA)
Labels labels_train = create_labels(f_labels_train)
#![create_features]

Expand Down
6 changes: 3 additions & 3 deletions examples/meta/src/binary/gpbtsvm.sg.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CSVFile f_feats_train("@SHOGUN_DATA@/fm_train_real.dat")
CSVFile f_feats_test("@SHOGUN_DATA@/fm_test_real.dat")
CSVFile f_labels_train("@SHOGUN_DATA@/label_train_twoclass.dat")
File f_feats_train = read_csv("@SHOGUN_DATA@/fm_train_real.dat")
File f_feats_test = read_csv("@SHOGUN_DATA@/fm_test_real.dat")
File f_labels_train = read_csv("@SHOGUN_DATA@/label_train_twoclass.dat")

#![create_features]
Features feats_train = create_features(f_feats_train)
Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/binary/libsvmoneclass.sg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CSVFile traindat("../../data/fm_train_real.dat")
CSVFile testdat("../../data/fm_test_real.dat")
File traindat = read_csv("../../data/fm_train_real.dat")
File testdat = read_csv("../../data/fm_test_real.dat")

#![create_features]
Features feats_train = create_features(traindat)
Expand Down
6 changes: 3 additions & 3 deletions examples/meta/src/binary/svm_ssk.sg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ File f_feats_test = read_csv("@SHOGUN_DATA@/fm_test_dna.dat")
File f_labels_train = read_csv("@SHOGUN_DATA@/label_train_dna.dat")

#![create_features]
Features feats_train = create_char_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_char_string_features(f_feats_test, enum EAlphabet.DNA)
Features feats_train = create_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_string_features(f_feats_test, enum EAlphabet.DNA)
Labels labels_train = create_labels(f_labels_train)
#![create_features]

#![create_kernel]
Kernel svm_kernel = create_kernel("SubsequenceStringKernel", m_maxlen=5, m_lambda=0.9)
Kernel svm_kernel = create_kernel("SubsequenceStringKernel", maxlen=5, decay=0.9)
svm_kernel.init(feats_train, feats_train)
#![create_kernel]

Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/binary/svmlight.sg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ File f_feats_test = read_csv("@SHOGUN_DATA@/fm_test_dna.dat")
File f_labels_train = read_csv("@SHOGUN_DATA@/label_train_dna.dat")

#![create_features]
Features feats_train = create_char_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_char_string_features(f_feats_test, enum EAlphabet.DNA)
Features feats_train = create_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_string_features(f_feats_test, enum EAlphabet.DNA)
Labels labels_train = create_labels(f_labels_train)
#![create_features]

Expand Down
4 changes: 2 additions & 2 deletions examples/meta/src/binary/svmlight_batch_linadd.sg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ File f_feats_test = read_csv("@SHOGUN_DATA@/fm_test_dna.dat")
File f_labels_train = read_csv("@SHOGUN_DATA@/label_train_dna.dat")

#![create_features]
Features feats_train = create_char_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_char_string_features(f_feats_test, enum EAlphabet.DNA)
Features feats_train = create_string_features(f_feats_train, enum EAlphabet.DNA)
Features feats_test = create_string_features(f_feats_test, enum EAlphabet.DNA)
Labels labels_train = create_labels(f_labels_train)
#![create_features]

Expand Down
Loading

0 comments on commit f751f94

Please sign in to comment.