node-red-contrib-machine-learning
node-red-contrib-machine-learning copied to clipboard
Problem create model if more data and more decimal data
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.
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
Same problem for me. Seems like the CSV file is not parsed correctly if using to many rows. Have you solved the Problem?