# Issue create model machine learning

**URL:** <https://discourse.nodered.org/t/issue-create-model-machine-learning/48388>\
**Category:** General\
**Created:** [14 July 2021 07:23 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388 "2021-07-14T07:23:10Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [14 July 2021 07:23 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/1 "2021-07-14T07:23:10Z")

</div>

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.

 ![ai](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/226593a7e5c901e4a1cf50ceeea87f19fa59287d.png)

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [14 July 2021 09:57 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/2 "2021-07-14T09:57:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [14 July 2021 11:55 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/3 "2021-07-14T11:55:34Z")

</div>

![ai2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/3012c80367a4f1158af9b6ccd99fbbafa4bc3578.png)

sorry for img

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2021 17:35 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/4 "2021-07-14T17:35:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [15 July 2021 03:22 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/5 "2021-07-15T03:22:45Z")

</div>

> [@pelarnut01](#):
>
> 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.

Yes module node-red-contrib machine learning2

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [15 July 2021 03:23 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/6 "2021-07-15T03:23:32Z")

</div>

Error on raspberry pi

 ![ai error2.PNG](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c836de9e68f96b2570b2dd13555e88e8a31de227.jpeg)  
 ![ai error3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe55e78e0b41b1e1160b28442123a8361883bef1.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 July 2021 13:11 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/7 "2021-07-15T13:11:44Z")

</div>

> [@pelarnut01](#):
>
> Yes module node-red-contrib machine learning2

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

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [16 July 2021 01:54 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/8 "2021-07-16T01:54:40Z")

</div>

> [@pelarnut01](#):
>
> node-red-contrib machine learning2

# node-red-contrib-machine-learning-v2

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 July 2021 06:14 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/9 "2021-07-16T06:14:25Z")

</div>

Did you install the prerequisites?

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [16 July 2021 10:51 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/10 "2021-07-16T10:51:48Z")

</div>

ํYes i check it all work

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 July 2021 13:22 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/11 "2021-07-16T13:22:12Z")

</div>

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:

> [@zenofmud](#):
>
> - 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

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.

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [17 July 2021 01:21 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/12 "2021-07-17T01:21:10Z")

</div>

> [@zenofmud](#):
>
> 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:

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

```

---

<div class="post-metadata">

**Author:** ![pelarnut01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pelarnut01/32/31693_2.png) [@pelarnut01](https://discourse.nodered.org/u/pelarnut01)\
**Post date:** [17 July 2021 01:23 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/13 "2021-07-17T01:23:34Z")

</div>

```
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
```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 July 2021 01:27 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/14 "2021-07-17T01:27:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 September 2021 01:28 UTC](https://discourse.nodered.org/t/issue-create-model-machine-learning/48388/15 "2021-09-15T01:28:05Z")

</div>

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