| /* ----------------------------------------------------------------------- *//** |
| * |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| *//* ----------------------------------------------------------------------- */ |
| |
| CREATE TABLE abalone_train_small ( |
| sex TEXT, |
| id SERIAL NOT NULL, |
| length DOUBLE PRECISION, |
| diameter DOUBLE PRECISION, |
| rings INTEGER); |
| |
| INSERT INTO abalone_train_small(id,sex,length,diameter,rings) VALUES |
| (1040,'F',0.66,0.475,6), |
| (177,'I',0.315,0.21,5), |
| (3359,'M',0.285,0.215,5); |
| |
| -- verify gaussian kernel with grouping |
| -- verify partial string support in kernel specification |
| SELECT svm_regression( |
| 'abalone_train_small', |
| 'svr_mdl_m', |
| 'rings', |
| 'ARRAY[1,diameter]', |
| 'gau', |
| 'n_components=3', |
| 'sex', |
| 'max_iter=1, init_stepsize=1, decay_factor=0.9, tolerance=1e-16, epsilon = 0.05', |
| false); |
| SELECT svm_predict('svr_mdl_m','abalone_train_small', 'id', 'svm_test_mdl_m'); |