To be fair: i thought it would not be going through the syntax-check at first (it's really a strange construction as stated).Įdit: To be fair #2: it's really that bad in that linked video too. I have to admit: that's something which should be found immediately and i can't understand why someone would invest time to create a post for SO, but not invest time to check the syntax of a simple array-creation. When an element of usermedians is None, the median will be computed by matplotlib as normal. So there is one bracket of each orientation to add (if that's not clear to you: read sklearn's docs on the data-format: 2d-array of shape (n_samples, n_features) consider also reading some introduction to numpy where the word shape comes from -> internally everything is numpy-based): X =, ,, , # before 154 Is creating something far far away from being usable: print(X) If that's really your code, the problem starts right at the beginning: X =, ,, 154, 54, 37], No answer in the whole youtube comment section to this.Īppreciate if answer can be found here, could not find any answer. The valueerror: setting an array element with a sequence fromiter happens due to different array dimensions and shapes inside the syntax. dtype attribute of an array (or sparse matrix). Run with Python 3.6 using sklearn, numpy+mkl and scipy on Sublime. NumPy arrays assume a homogeneous data type throughout, available in the. ![]() Should display gender predicted from body measurements: "182,78,43" fit() and finish the data using PCA or scaler. and next If my data was ok, what i must do before, to make it possible to do some. must I need change the data format or type or something if yes, tell me must be like that, and how to be like that if possible. ValueError: setting an array element with a sequence. ValueError: setting an array element with a sequence. Logistic regression is an estimator for functions of form: Rd -> 0,1 But your data clearly is not a subset of Rd, as each sample in a has different length (number of dimensions), thus it cannot be applied. X = check_array(X, dtype=DTYPE, accept_sparse="csc")įile "C:\Python\lib\site-packages\sklearn\utils\validation.py", line 402,Īrray = np.array(array, dtype=dtype, order=order, copy=copy) ![]() Result: Traceback (most recent call last):įile "C:\Python\code\test.py", line 14, in įile "C:\Python\lib\site-packages\sklearn\tree\tree.py", line 790, in fitįile "C:\Python\lib\site-packages\sklearn\tree\tree.py", line 116, in fit
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |