Skip to content

open a new issue since the Train Error #1296 problem has been closed. #1303

Closed
@HJH0924

Description

@HJH0924

#1296 (comment)
Where is this 20% you mentioned set? Upon inspecting the source code for "train" in api.rs, I discovered a parameter called "test_size" with a default value of 0.25. Is that what you are referring to?

Alas, my endeavors to replicate the steps proved futile as the outcome remained unchanged even after diligently executing the insertion of ten data entries in the third step.
3、Insert data into the pgml.commits_build table:
INSERT INTO pgml.commits_build VALUES
('{4,5,6}', false),
('{5,6,7}', true),
('{6,7,8}', false),
('{7,8,9}', true),
('{8,9,10}', false),
('{9,10,11}', true),
('{10,11,12}', false),
('{11,12,13}', true),
('{12,13,14}', false),
('{13,14,15}', true);

The complete replication steps are as follows:
1、sudo docker run --rm -it -v postgresml_data:/var/lib/postgresql -p 5434:5432 -p 8000:8000 ghcr.io/postgresml/postgresml:2.8.1 sudo -u postgresml psql -d postgresml
2、drop extension pgml;
3、create extension pgml;
4、DROP TABLE IF EXISTS pgml.commits_build CASCADE;
CREATE TABLE pgml.commits_build (
vector Integer[],
result bool
);
5、INSERT INTO pgml.commits_build VALUES
('{4,5,6}', false),
('{5,6,7}', true),
('{6,7,8}', false),
('{7,8,9}', true),
('{8,9,10}', false),
('{9,10,11}', true),
('{10,11,12}', false),
('{11,12,13}', true),
('{12,13,14}', false),
('{13,14,15}', true);
6、select * from pgml.commits_build;
7、SELECT * FROM pgml.train(
'commits:category:build',
'classification',
'pgml.commits_build',
'result'
);
8、SELECT * FROM pgml.train('commits:category:build', algorithm => 'svm');

Another peculiar point to note is that if the issue is due to insufficient data for training, as you suggested earlier, then the "train" command should have thrown an error when executed for the first time. Instead of allowing the execution to proceed without errors, and threw an error upon executing the "train" command for the next time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions