Code Monkey home page Code Monkey logo

Comments (3)

martyna-mindsdb avatar martyna-mindsdb commented on May 25, 2024

@pedrofluxa
Can you have a look please ^^

from mindsdb.

ZaKull avatar ZaKull commented on May 25, 2024

your data unit is same in all rows...

from mindsdb.

pedrofluxa avatar pedrofluxa commented on May 25, 2024

Hi @niyascode007

The reason you are seeing this error is that every row in your table has unit=90, as @ZaKull correctly pointed out.

This makes type_infer suggest to dataprep_ml that this column should be dropped, which in turns causes the time-series pipeline to fail and throw that rather obscure error message.

I modified the file you uploaded to provide you with a working example. Note the following

  • Timestamps are now separated by a second
  • Timestamps don't have time-zone information (it triggers nasty warnings from pandas) As a personal advice, try to always save your timestamps in UTC.
  • Column unit now variates. I would like you to try setting most values to 90 and just a few to different ones to see if it works. My gut feeling is that it won't.

Here is the SQL statements for you to try them out (after uploading the file and name it "data")

--- The following code creates a Generative AI table based on a Time-series model provided by Lightwood.
--- The model requires as input the last 4 measurements and predicts the next two.
---
--- Instructions
--- > Upload "sensor_data_fixed.csv" to MindsDB and name it "data" using the GUI.
--- > Copy and paste this script, execute.


SHOW TABLES FROM files;

--- These files can be queried as tables,
--- You just uploaded sensor_data_non_constant_unit

SELECT * FROM files.data LIMIT 10;

DROP MODEL mindsdb.model66;

CREATE MODEL mindsdb.model66
FROM files
(SELECT * from data) 
PREDICT unit
ORDER BY timestamp
WINDOW 4
HORIZON 2;

DESCRIBE mindsdb.model66;

SELECT m.timestamp as date, m.unit as forecast
  FROM mindsdb.model66 as m 
    JOIN files.data as t
    WHERE t.timestamp > '2023-12-10';

sensor_data_fixed.csv

Good luck!

from mindsdb.

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.