GithubHelp home page GithubHelp logo

Train Error about postgresml HOT 2 CLOSED

HJH0924 avatar HJH0924 commented on May 29, 2024
Train Error

from postgresml.

Comments (2)

montanalow avatar montanalow commented on May 29, 2024

This is fixed by #1289. Using a dataset with 5 rows, and a 20% default split only leaves 1 row for testing, which is not enough to compute statistics against.

from postgresml.

HJH0924 avatar HJH0924 commented on May 29, 2024

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.

from postgresml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.