blob: 5a6d1e92daba0963d83da6499b393b1a5d908571 [file] [log] [blame]
/* ----------------------------------------------------------------------- *//**
*
* 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.
*
*//* ----------------------------------------------------------------------- */
---------------------------------------------------------------------------
-- Build training dataset:
---------------------------------------------------------------------------
DROP TABLE IF EXISTS abalone;
CREATE TABLE abalone (
id serial,
sex character varying,
length double precision,
diameter double precision,
height double precision,
"Class" integer
);
COPY abalone (sex, length, diameter, height, "Class") FROM stdin WITH DELIMITER '|' NULL as '@';
M|0.455|0.365|0.095|0
F|0.53|0.42|0.135|0
M|0.5|0.400|0.13|1
F|0.565|0.44|0.155|2
I|0.355|0.280|0.085|2
\.
select encode_categorical_variables('abalone', 'abalone_out6',
'sex, "Class"', '',
'id', '3', 'class=1',
true, 'svec', true
);