Issue create model machine learning

I created data as a csv file to use for create dataset and modeling, but I have a problem when modeling by when using too many csv moles eg using 1000row data Modeling gives error, but if I use 300 rows of data, modeling is no problem.

Very difficult to read that screenshot... perhaps post the flow and actual copy/pasted test of error, etc. if you wish others to take more than a passing glance.

sorry for img

  1. what is the full name of the node getting the error - something like node-red-contribute-?????. It looks like it is node-red-contrib-machine-learning.
  2. the debug information you provided isn’t complete. Can you look at the node-red log and get it from there or you could edit the settings.js file and increase the number of characters that will be displayed in the debug panel
  3. I would go to the GitHub page for the node and check if there are any known issues.

My gut guess is that something is running out of memory but until we see the complete error message no one will actually know.

If it is node-red-contrib-machine-learning the node hasn’t been updated in three years and the author doesn’t seemed to have responded to any of the existing issues since June 5th, 2018 so I wouldn’t hope for a solution. You might want to look for another node.

Yes module node-red-contrib machine learning2

Error on raspberry pi


there seem to be some missing underscores in that node name and does it have a '2' at the end?

node-red-contrib-machine-learning-v2

Did you install the prerequisites?

ํYes i check it all work

Ok, so now you have told me the correct name of the node and that you have done the prerequirements but you still have not provided the entire error message. As I said/asked two days ago:

Without the complete error message it will be difficult for anyone to help you, including the author of the node. So please provide a copy of the complete eror message AND make it a copy/paste NOT a screen capture.

1 Like

Sorry about that

Traceback (most recent call last): File "/home/pi/.node-red/node_modules/node-red-contrib-machine-learning-v2/nodes/trainers/decision-tree-classifier/../trainer.py", line 20, in df = pandas.read_json(data, orient='values') File "/home/pi/.local/lib/python3.7/site-packages/pandas/util/_decorators.py", line 199, in wrapper

return func(*args, **kwargs)  File "/home/pi/.local/lib/python3.7/site-packages/pandas/util/_decorators.py", line 296, in wrapper    return func(*args, **kwargs)  File "/home/pi/.local/lib/python3.7/site-packages/pandas/io/json/_json.py", line 618, in read_json

result = json_reader.read()  File "/home/pi/.local/lib/python3.7/site-packages/pandas/io/json/_json.py", line 755, in read

obj = self._get_object_parser(self.data)  File "/home/pi/.local/lib/python3.7/site-packages/pandas/io/json/_json.py", line 777, in _get_object_parser

obj = FrameParser(json, **kwargs).parse()  File "/home/pi/.local/lib/python3.7/site-packages/pandas/io/json/_json.py", line 886, in parse

self._parse_no_numpy()  File "/home/pi/.local/lib/python3.7/site-packages/pandas/io/json/_json.py", line 1138, in _parse_no_numpy

loads(json, precise_float=self.precise_float), dtype=None  File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 529, in __init__

raise ValueError("DataFrame constructor not properly called!")ValueError: DataFrame constructor not properly called!During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/home/pi/.node-red/node_modules/node-red-contrib-machine-learning-v2/nodes/trainers/decision-tree-classifier/../trainer.py", line 23, in <module>

df = pandas.read_csv(json.loads(data)['file'], header=None)TypeError: string indices must be integers
loads(json, precise_float=self.precise_float), dtype=None  File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 529, in __init__    raise ValueError("DataFrame constructor not properly called!")ValueError: DataFrame constructor not properly called!During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/home/pi/.node-red/node_modules/node-red-contrib-machine-learning-v2/nodes/trainers/decision-tree-classifier/../trainer.py", line 23, in <module>    df = pandas.read_csv(json.loads(data)['file'], header=None)TypeError: string indices must be integers

I suggest you open an issue on the nodes GitHub page. Maybe the author can give you some help.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.