Advertisement
mayankjoin3

Untitled

Jun 16th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 91.43 KB | None | 0 0
  1. ERROR:root:Input X contains NaN.
  2. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  3. Traceback (most recent call last):
  4. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 246, in <module>
  5. dt_multi.fit(X_train_fold, y_train_fold)
  6. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  7. super().fit(
  8. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  9. X, y = self._validate_data(
  10. ^^^^^^^^^^^^^^^^^^^^
  11. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  12. X = check_array(X, input_name="X", **check_X_params)
  13. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  14. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  15. _assert_all_finite(
  16. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  17. raise ValueError(msg_err)
  18. ValueError: Input X contains NaN.
  19. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  20. 16 Jun 2024 19:22
  21.  
  22. *********
  23.  
  24. ERROR:root:Input X contains NaN.
  25. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  26. Traceback (most recent call last):
  27. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 297, in <module>
  28. lr_multi.fit(X_train_fold, y_train_fold)
  29. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 648, in fit
  30. X, y = self._validate_data(
  31. ^^^^^^^^^^^^^^^^^^^^
  32. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  33. X, y = check_X_y(X, y, **check_params)
  34. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  35. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  36. X = check_array(
  37. ^^^^^^^^^^^^
  38. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  39. _assert_all_finite(
  40. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  41. raise ValueError(msg_err)
  42. ValueError: Input X contains NaN.
  43. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  44. 16 Jun 2024 19:22
  45.  
  46. *********
  47.  
  48. ERROR:root:Input X contains NaN.
  49. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  50. Traceback (most recent call last):
  51. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 347, in <module>
  52. logreg_multi.fit(X_train_fold, y_train_fold)
  53. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_logistic.py", line 1196, in fit
  54. X, y = self._validate_data(
  55. ^^^^^^^^^^^^^^^^^^^^
  56. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  57. X, y = check_X_y(X, y, **check_params)
  58. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  59. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  60. X = check_array(
  61. ^^^^^^^^^^^^
  62. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  63. _assert_all_finite(
  64. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  65. raise ValueError(msg_err)
  66. ValueError: Input X contains NaN.
  67. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  68. 16 Jun 2024 19:22
  69.  
  70. *********
  71.  
  72. ERROR:root:Input X contains NaN.
  73. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  74. Traceback (most recent call last):
  75. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 398, in <module>
  76. knn.fit(X_train_fold, y_train_fold)
  77. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_classification.py", line 215, in fit
  78. return self._fit(X, y)
  79. ^^^^^^^^^^^^^^^
  80. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_base.py", line 454, in _fit
  81. X, y = self._validate_data(
  82. ^^^^^^^^^^^^^^^^^^^^
  83. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  84. X, y = check_X_y(X, y, **check_params)
  85. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  86. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  87. X = check_array(
  88. ^^^^^^^^^^^^
  89. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  90. _assert_all_finite(
  91. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  92. raise ValueError(msg_err)
  93. ValueError: Input X contains NaN.
  94. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  95. 16 Jun 2024 19:22
  96.  
  97. *********
  98.  
  99. ERROR:root:Input X contains NaN.
  100. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  101. Traceback (most recent call last):
  102. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 447, in <module>
  103. rf.fit(X_train_fold, y_train_fold)
  104. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_forest.py", line 345, in fit
  105. X, y = self._validate_data(
  106. ^^^^^^^^^^^^^^^^^^^^
  107. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  108. X, y = check_X_y(X, y, **check_params)
  109. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  110. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  111. X = check_array(
  112. ^^^^^^^^^^^^
  113. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  114. _assert_all_finite(
  115. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  116. raise ValueError(msg_err)
  117. ValueError: Input X contains NaN.
  118. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  119. 16 Jun 2024 19:22
  120.  
  121. *********
  122.  
  123. ERROR:root:Input X contains NaN.
  124. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  125. Traceback (most recent call last):
  126. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 495, in <module>
  127. mlp.fit(X_train_fold, y_train_fold)
  128. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 749, in fit
  129. return self._fit(X, y, incremental=False)
  130. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  131. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 437, in _fit
  132. X, y = self._validate_input(X, y, incremental, reset=first_pass)
  133. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  134. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 1089, in _validate_input
  135. X, y = self._validate_data(
  136. ^^^^^^^^^^^^^^^^^^^^
  137. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  138. X, y = check_X_y(X, y, **check_params)
  139. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  140. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  141. X = check_array(
  142. ^^^^^^^^^^^^
  143. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  144. _assert_all_finite(
  145. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  146. raise ValueError(msg_err)
  147. ValueError: Input X contains NaN.
  148. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  149. 16 Jun 2024 19:22
  150.  
  151. *********
  152.  
  153. ERROR:root:Input X contains NaN.
  154. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  155. Traceback (most recent call last):
  156. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 547, in <module>
  157. bagging_classifier.fit(X_train_fold, y_train_fold)
  158. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 337, in fit
  159. return self._fit(X, y, self.max_samples, sample_weight=sample_weight)
  160. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  161. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 472, in _fit
  162. all_results = Parallel(
  163. ^^^^^^^^^
  164. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 63, in __call__
  165. return super().__call__(iterable_with_config)
  166. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  167. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1863, in __call__
  168. return output if self.return_generator else list(output)
  169. ^^^^^^^^^^^^
  170. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1792, in _get_sequential_output
  171. res = func(*args, **kwargs)
  172. ^^^^^^^^^^^^^^^^^^^^^
  173. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 123, in __call__
  174. return self.function(*args, **kwargs)
  175. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  176. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 141, in _parallel_build_estimators
  177. estimator_fit(X_, y, sample_weight=curr_sample_weight)
  178. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  179. super().fit(
  180. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  181. X, y = self._validate_data(
  182. ^^^^^^^^^^^^^^^^^^^^
  183. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  184. X = check_array(X, input_name="X", **check_X_params)
  185. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  186. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  187. _assert_all_finite(
  188. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  189. raise ValueError(msg_err)
  190. ValueError: Input X contains NaN.
  191. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  192. 16 Jun 2024 19:22
  193.  
  194. *********
  195.  
  196. ERROR:root:Input X contains NaN.
  197. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  198. Traceback (most recent call last):
  199. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 596, in <module>
  200. classifier_j48.fit(X_train_fold, y_train_fold)
  201. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  202. super().fit(
  203. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  204. X, y = self._validate_data(
  205. ^^^^^^^^^^^^^^^^^^^^
  206. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  207. X = check_array(X, input_name="X", **check_X_params)
  208. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  209. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  210. _assert_all_finite(
  211. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  212. raise ValueError(msg_err)
  213. ValueError: Input X contains NaN.
  214. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  215. 16 Jun 2024 19:22
  216.  
  217. *********
  218.  
  219. ERROR:root:Input X contains NaN.
  220. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  221. Traceback (most recent call last):
  222. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 766, in <module>
  223. multi_gb.fit(X_train_fold, y_train_fold)
  224. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_gb.py", line 429, in fit
  225. X, y = self._validate_data(
  226. ^^^^^^^^^^^^^^^^^^^^
  227. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  228. X, y = check_X_y(X, y, **check_params)
  229. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  230. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  231. X = check_array(
  232. ^^^^^^^^^^^^
  233. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  234. _assert_all_finite(
  235. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  236. raise ValueError(msg_err)
  237. ValueError: Input X contains NaN.
  238. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  239. 16 Jun 2024 19:23
  240.  
  241. *********
  242.  
  243. ERROR:root:Input X contains NaN.
  244. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  245. Traceback (most recent call last):
  246. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 866, in <module>
  247. NB_model.fit(X_train_fold, y_train_fold)
  248. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 267, in fit
  249. return self._partial_fit(
  250. ^^^^^^^^^^^^^^^^^^
  251. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 428, in _partial_fit
  252. X, y = self._validate_data(X, y, reset=first_call)
  253. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  254. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  255. X, y = check_X_y(X, y, **check_params)
  256. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  257. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  258. X = check_array(
  259. ^^^^^^^^^^^^
  260. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  261. _assert_all_finite(
  262. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  263. raise ValueError(msg_err)
  264. ValueError: Input X contains NaN.
  265. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  266. 16 Jun 2024 19:23
  267.  
  268. *********
  269.  
  270. ERROR:root:Input X contains NaN.
  271. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  272. Traceback (most recent call last):
  273. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 923, in <module>
  274. AB_model.fit(X_train_fold, y_train_fold)
  275. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_weight_boosting.py", line 126, in fit
  276. X, y = self._validate_data(
  277. ^^^^^^^^^^^^^^^^^^^^
  278. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  279. X, y = check_X_y(X, y, **check_params)
  280. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  281. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  282. X = check_array(
  283. ^^^^^^^^^^^^
  284. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  285. _assert_all_finite(
  286. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  287. raise ValueError(msg_err)
  288. ValueError: Input X contains NaN.
  289. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  290. 16 Jun 2024 19:23
  291.  
  292. *********
  293.  
  294. ERROR:root:Input X contains NaN.
  295. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  296. Traceback (most recent call last):
  297. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 974, in <module>
  298. qda_multi.fit(X_train_fold, y_train_fold)
  299. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/discriminant_analysis.py", line 890, in fit
  300. X, y = self._validate_data(X, y)
  301. ^^^^^^^^^^^^^^^^^^^^^^^^^
  302. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  303. X, y = check_X_y(X, y, **check_params)
  304. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  305. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  306. X = check_array(
  307. ^^^^^^^^^^^^
  308. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  309. _assert_all_finite(
  310. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  311. raise ValueError(msg_err)
  312. ValueError: Input X contains NaN.
  313. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  314. 16 Jun 2024 19:23
  315.  
  316. *********
  317.  
  318. ERROR:root:Input X contains NaN.
  319. BernoulliRBM does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  320. Traceback (most recent call last):
  321. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 1417, in <module>
  322. dbn_model.fit(X_train.iloc[train_index], y_train.iloc[train_index])
  323. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/pipeline.py", line 401, in fit
  324. Xt = self._fit(X, y, **fit_params_steps)
  325. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  326. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/pipeline.py", line 359, in _fit
  327. X, fitted_transformer = fit_transform_one_cached(
  328. ^^^^^^^^^^^^^^^^^^^^^^^^^
  329. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/memory.py", line 353, in __call__
  330. return self.func(*args, **kwargs)
  331. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  332. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/pipeline.py", line 893, in _fit_transform_one
  333. res = transformer.fit_transform(X, y, **fit_params)
  334. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  335. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/_set_output.py", line 140, in wrapped
  336. data_to_wrap = f(self, X, *args, **kwargs)
  337. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  338. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 881, in fit_transform
  339. return self.fit(X, y, **fit_params).transform(X)
  340. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  341. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_rbm.py", line 402, in fit
  342. X = self._validate_data(X, accept_sparse="csr", dtype=(np.float64, np.float32))
  343. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  344. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 565, in _validate_data
  345. X = check_array(X, input_name="X", **check_params)
  346. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  347. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  348. _assert_all_finite(
  349. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  350. raise ValueError(msg_err)
  351. ValueError: Input X contains NaN.
  352. BernoulliRBM does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  353. 16 Jun 2024 19:31
  354.  
  355. *********
  356.  
  357. ERROR:root:Input X contains NaN.
  358. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  359. Traceback (most recent call last):
  360. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 246, in <module>
  361. dt_multi.fit(X_train_fold, y_train_fold)
  362. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  363. super().fit(
  364. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  365. X, y = self._validate_data(
  366. ^^^^^^^^^^^^^^^^^^^^
  367. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  368. X = check_array(X, input_name="X", **check_X_params)
  369. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  370. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  371. _assert_all_finite(
  372. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  373. raise ValueError(msg_err)
  374. ValueError: Input X contains NaN.
  375. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  376. 16 Jun 2024 19:37
  377.  
  378. *********
  379.  
  380. ERROR:root:Input X contains NaN.
  381. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  382. Traceback (most recent call last):
  383. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 297, in <module>
  384. lr_multi.fit(X_train_fold, y_train_fold)
  385. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 648, in fit
  386. X, y = self._validate_data(
  387. ^^^^^^^^^^^^^^^^^^^^
  388. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  389. X, y = check_X_y(X, y, **check_params)
  390. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  391. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  392. X = check_array(
  393. ^^^^^^^^^^^^
  394. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  395. _assert_all_finite(
  396. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  397. raise ValueError(msg_err)
  398. ValueError: Input X contains NaN.
  399. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  400. 16 Jun 2024 19:37
  401.  
  402. *********
  403.  
  404. ERROR:root:Input X contains NaN.
  405. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  406. Traceback (most recent call last):
  407. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 347, in <module>
  408. logreg_multi.fit(X_train_fold, y_train_fold)
  409. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_logistic.py", line 1196, in fit
  410. X, y = self._validate_data(
  411. ^^^^^^^^^^^^^^^^^^^^
  412. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  413. X, y = check_X_y(X, y, **check_params)
  414. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  415. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  416. X = check_array(
  417. ^^^^^^^^^^^^
  418. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  419. _assert_all_finite(
  420. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  421. raise ValueError(msg_err)
  422. ValueError: Input X contains NaN.
  423. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  424. 16 Jun 2024 19:37
  425.  
  426. *********
  427.  
  428. ERROR:root:Input X contains NaN.
  429. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  430. Traceback (most recent call last):
  431. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 398, in <module>
  432. knn.fit(X_train_fold, y_train_fold)
  433. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_classification.py", line 215, in fit
  434. return self._fit(X, y)
  435. ^^^^^^^^^^^^^^^
  436. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_base.py", line 454, in _fit
  437. X, y = self._validate_data(
  438. ^^^^^^^^^^^^^^^^^^^^
  439. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  440. X, y = check_X_y(X, y, **check_params)
  441. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  442. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  443. X = check_array(
  444. ^^^^^^^^^^^^
  445. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  446. _assert_all_finite(
  447. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  448. raise ValueError(msg_err)
  449. ValueError: Input X contains NaN.
  450. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  451. 16 Jun 2024 19:37
  452.  
  453. *********
  454.  
  455. ERROR:root:Input X contains NaN.
  456. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  457. Traceback (most recent call last):
  458. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 447, in <module>
  459. rf.fit(X_train_fold, y_train_fold)
  460. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_forest.py", line 345, in fit
  461. X, y = self._validate_data(
  462. ^^^^^^^^^^^^^^^^^^^^
  463. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  464. X, y = check_X_y(X, y, **check_params)
  465. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  466. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  467. X = check_array(
  468. ^^^^^^^^^^^^
  469. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  470. _assert_all_finite(
  471. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  472. raise ValueError(msg_err)
  473. ValueError: Input X contains NaN.
  474. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  475. 16 Jun 2024 19:37
  476.  
  477. *********
  478.  
  479. ERROR:root:Input X contains NaN.
  480. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  481. Traceback (most recent call last):
  482. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 495, in <module>
  483. mlp.fit(X_train_fold, y_train_fold)
  484. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 749, in fit
  485. return self._fit(X, y, incremental=False)
  486. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  487. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 437, in _fit
  488. X, y = self._validate_input(X, y, incremental, reset=first_pass)
  489. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  490. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 1089, in _validate_input
  491. X, y = self._validate_data(
  492. ^^^^^^^^^^^^^^^^^^^^
  493. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  494. X, y = check_X_y(X, y, **check_params)
  495. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  496. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  497. X = check_array(
  498. ^^^^^^^^^^^^
  499. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  500. _assert_all_finite(
  501. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  502. raise ValueError(msg_err)
  503. ValueError: Input X contains NaN.
  504. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  505. 16 Jun 2024 19:37
  506.  
  507. *********
  508.  
  509. ERROR:root:Input X contains NaN.
  510. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  511. Traceback (most recent call last):
  512. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 547, in <module>
  513. bagging_classifier.fit(X_train_fold, y_train_fold)
  514. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 337, in fit
  515. return self._fit(X, y, self.max_samples, sample_weight=sample_weight)
  516. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  517. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 472, in _fit
  518. all_results = Parallel(
  519. ^^^^^^^^^
  520. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 63, in __call__
  521. return super().__call__(iterable_with_config)
  522. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  523. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1863, in __call__
  524. return output if self.return_generator else list(output)
  525. ^^^^^^^^^^^^
  526. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1792, in _get_sequential_output
  527. res = func(*args, **kwargs)
  528. ^^^^^^^^^^^^^^^^^^^^^
  529. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 123, in __call__
  530. return self.function(*args, **kwargs)
  531. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  532. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 141, in _parallel_build_estimators
  533. estimator_fit(X_, y, sample_weight=curr_sample_weight)
  534. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  535. super().fit(
  536. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  537. X, y = self._validate_data(
  538. ^^^^^^^^^^^^^^^^^^^^
  539. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  540. X = check_array(X, input_name="X", **check_X_params)
  541. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  542. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  543. _assert_all_finite(
  544. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  545. raise ValueError(msg_err)
  546. ValueError: Input X contains NaN.
  547. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  548. 16 Jun 2024 19:37
  549.  
  550. *********
  551.  
  552. ERROR:root:Input X contains NaN.
  553. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  554. Traceback (most recent call last):
  555. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 596, in <module>
  556. classifier_j48.fit(X_train_fold, y_train_fold)
  557. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  558. super().fit(
  559. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  560. X, y = self._validate_data(
  561. ^^^^^^^^^^^^^^^^^^^^
  562. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  563. X = check_array(X, input_name="X", **check_X_params)
  564. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  565. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  566. _assert_all_finite(
  567. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  568. raise ValueError(msg_err)
  569. ValueError: Input X contains NaN.
  570. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  571. 16 Jun 2024 19:37
  572.  
  573. *********
  574.  
  575. ERROR:root:Input X contains NaN.
  576. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  577. Traceback (most recent call last):
  578. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 766, in <module>
  579. multi_gb.fit(X_train_fold, y_train_fold)
  580. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_gb.py", line 429, in fit
  581. X, y = self._validate_data(
  582. ^^^^^^^^^^^^^^^^^^^^
  583. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  584. X, y = check_X_y(X, y, **check_params)
  585. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  586. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  587. X = check_array(
  588. ^^^^^^^^^^^^
  589. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  590. _assert_all_finite(
  591. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  592. raise ValueError(msg_err)
  593. ValueError: Input X contains NaN.
  594. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  595. 16 Jun 2024 19:38
  596.  
  597. *********
  598.  
  599. ERROR:root:Input X contains NaN.
  600. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  601. Traceback (most recent call last):
  602. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 866, in <module>
  603. NB_model.fit(X_train_fold, y_train_fold)
  604. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 267, in fit
  605. return self._partial_fit(
  606. ^^^^^^^^^^^^^^^^^^
  607. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 428, in _partial_fit
  608. X, y = self._validate_data(X, y, reset=first_call)
  609. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  610. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  611. X, y = check_X_y(X, y, **check_params)
  612. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  613. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  614. X = check_array(
  615. ^^^^^^^^^^^^
  616. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  617. _assert_all_finite(
  618. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  619. raise ValueError(msg_err)
  620. ValueError: Input X contains NaN.
  621. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  622. 16 Jun 2024 19:38
  623.  
  624. *********
  625.  
  626. ERROR:root:Input X contains NaN.
  627. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  628. Traceback (most recent call last):
  629. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 923, in <module>
  630. AB_model.fit(X_train_fold, y_train_fold)
  631. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_weight_boosting.py", line 126, in fit
  632. X, y = self._validate_data(
  633. ^^^^^^^^^^^^^^^^^^^^
  634. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  635. X, y = check_X_y(X, y, **check_params)
  636. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  637. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  638. X = check_array(
  639. ^^^^^^^^^^^^
  640. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  641. _assert_all_finite(
  642. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  643. raise ValueError(msg_err)
  644. ValueError: Input X contains NaN.
  645. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  646. 16 Jun 2024 19:38
  647.  
  648. *********
  649.  
  650. ERROR:root:Input X contains NaN.
  651. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  652. Traceback (most recent call last):
  653. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 974, in <module>
  654. qda_multi.fit(X_train_fold, y_train_fold)
  655. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/discriminant_analysis.py", line 890, in fit
  656. X, y = self._validate_data(X, y)
  657. ^^^^^^^^^^^^^^^^^^^^^^^^^
  658. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  659. X, y = check_X_y(X, y, **check_params)
  660. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  661. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  662. X = check_array(
  663. ^^^^^^^^^^^^
  664. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  665. _assert_all_finite(
  666. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  667. raise ValueError(msg_err)
  668. ValueError: Input X contains NaN.
  669. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  670. 16 Jun 2024 19:38
  671.  
  672. *********
  673.  
  674. ERROR:root:Input X contains NaN.
  675. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  676. Traceback (most recent call last):
  677. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 246, in <module>
  678. dt_multi.fit(X_train_fold, y_train_fold)
  679. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  680. super().fit(
  681. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  682. X, y = self._validate_data(
  683. ^^^^^^^^^^^^^^^^^^^^
  684. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  685. X = check_array(X, input_name="X", **check_X_params)
  686. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  687. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  688. _assert_all_finite(
  689. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  690. raise ValueError(msg_err)
  691. ValueError: Input X contains NaN.
  692. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  693. 16 Jun 2024 19:42
  694.  
  695. *********
  696.  
  697. ERROR:root:Input X contains NaN.
  698. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  699. Traceback (most recent call last):
  700. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 297, in <module>
  701. lr_multi.fit(X_train_fold, y_train_fold)
  702. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 648, in fit
  703. X, y = self._validate_data(
  704. ^^^^^^^^^^^^^^^^^^^^
  705. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  706. X, y = check_X_y(X, y, **check_params)
  707. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  708. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  709. X = check_array(
  710. ^^^^^^^^^^^^
  711. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  712. _assert_all_finite(
  713. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  714. raise ValueError(msg_err)
  715. ValueError: Input X contains NaN.
  716. LinearRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  717. 16 Jun 2024 19:42
  718.  
  719. *********
  720.  
  721. ERROR:root:Input X contains NaN.
  722. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  723. Traceback (most recent call last):
  724. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 347, in <module>
  725. logreg_multi.fit(X_train_fold, y_train_fold)
  726. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_logistic.py", line 1196, in fit
  727. X, y = self._validate_data(
  728. ^^^^^^^^^^^^^^^^^^^^
  729. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  730. X, y = check_X_y(X, y, **check_params)
  731. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  732. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  733. X = check_array(
  734. ^^^^^^^^^^^^
  735. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  736. _assert_all_finite(
  737. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  738. raise ValueError(msg_err)
  739. ValueError: Input X contains NaN.
  740. LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  741. 16 Jun 2024 19:42
  742.  
  743. *********
  744.  
  745. ERROR:root:Input X contains NaN.
  746. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  747. Traceback (most recent call last):
  748. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 398, in <module>
  749. knn.fit(X_train_fold, y_train_fold)
  750. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_classification.py", line 215, in fit
  751. return self._fit(X, y)
  752. ^^^^^^^^^^^^^^^
  753. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neighbors/_base.py", line 454, in _fit
  754. X, y = self._validate_data(
  755. ^^^^^^^^^^^^^^^^^^^^
  756. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  757. X, y = check_X_y(X, y, **check_params)
  758. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  759. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  760. X = check_array(
  761. ^^^^^^^^^^^^
  762. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  763. _assert_all_finite(
  764. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  765. raise ValueError(msg_err)
  766. ValueError: Input X contains NaN.
  767. KNeighborsClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  768. 16 Jun 2024 19:42
  769.  
  770. *********
  771.  
  772. ERROR:root:Input X contains NaN.
  773. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  774. Traceback (most recent call last):
  775. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 447, in <module>
  776. rf.fit(X_train_fold, y_train_fold)
  777. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_forest.py", line 345, in fit
  778. X, y = self._validate_data(
  779. ^^^^^^^^^^^^^^^^^^^^
  780. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  781. X, y = check_X_y(X, y, **check_params)
  782. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  783. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  784. X = check_array(
  785. ^^^^^^^^^^^^
  786. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  787. _assert_all_finite(
  788. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  789. raise ValueError(msg_err)
  790. ValueError: Input X contains NaN.
  791. RandomForestClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  792. 16 Jun 2024 19:42
  793.  
  794. *********
  795.  
  796. ERROR:root:Input X contains NaN.
  797. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  798. Traceback (most recent call last):
  799. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 495, in <module>
  800. mlp.fit(X_train_fold, y_train_fold)
  801. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 749, in fit
  802. return self._fit(X, y, incremental=False)
  803. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  804. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 437, in _fit
  805. X, y = self._validate_input(X, y, incremental, reset=first_pass)
  806. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  807. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 1089, in _validate_input
  808. X, y = self._validate_data(
  809. ^^^^^^^^^^^^^^^^^^^^
  810. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  811. X, y = check_X_y(X, y, **check_params)
  812. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  813. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  814. X = check_array(
  815. ^^^^^^^^^^^^
  816. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  817. _assert_all_finite(
  818. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  819. raise ValueError(msg_err)
  820. ValueError: Input X contains NaN.
  821. MLPClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  822. 16 Jun 2024 19:42
  823.  
  824. *********
  825.  
  826. ERROR:root:Input X contains NaN.
  827. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  828. Traceback (most recent call last):
  829. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 547, in <module>
  830. bagging_classifier.fit(X_train_fold, y_train_fold)
  831. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 337, in fit
  832. return self._fit(X, y, self.max_samples, sample_weight=sample_weight)
  833. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  834. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 472, in _fit
  835. all_results = Parallel(
  836. ^^^^^^^^^
  837. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 63, in __call__
  838. return super().__call__(iterable_with_config)
  839. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  840. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1863, in __call__
  841. return output if self.return_generator else list(output)
  842. ^^^^^^^^^^^^
  843. File "/home/u/anaconda3/lib/python3.11/site-packages/joblib/parallel.py", line 1792, in _get_sequential_output
  844. res = func(*args, **kwargs)
  845. ^^^^^^^^^^^^^^^^^^^^^
  846. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/parallel.py", line 123, in __call__
  847. return self.function(*args, **kwargs)
  848. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  849. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_bagging.py", line 141, in _parallel_build_estimators
  850. estimator_fit(X_, y, sample_weight=curr_sample_weight)
  851. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  852. super().fit(
  853. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  854. X, y = self._validate_data(
  855. ^^^^^^^^^^^^^^^^^^^^
  856. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  857. X = check_array(X, input_name="X", **check_X_params)
  858. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  859. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  860. _assert_all_finite(
  861. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  862. raise ValueError(msg_err)
  863. ValueError: Input X contains NaN.
  864. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  865. 16 Jun 2024 19:42
  866.  
  867. *********
  868.  
  869. ERROR:root:Input X contains NaN.
  870. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  871. Traceback (most recent call last):
  872. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 596, in <module>
  873. classifier_j48.fit(X_train_fold, y_train_fold)
  874. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 889, in fit
  875. super().fit(
  876. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/tree/_classes.py", line 186, in fit
  877. X, y = self._validate_data(
  878. ^^^^^^^^^^^^^^^^^^^^
  879. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 579, in _validate_data
  880. X = check_array(X, input_name="X", **check_X_params)
  881. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  882. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  883. _assert_all_finite(
  884. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  885. raise ValueError(msg_err)
  886. ValueError: Input X contains NaN.
  887. DecisionTreeClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  888. 16 Jun 2024 19:42
  889.  
  890. *********
  891.  
  892. ERROR:root:Input X contains NaN.
  893. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  894. Traceback (most recent call last):
  895. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 766, in <module>
  896. multi_gb.fit(X_train_fold, y_train_fold)
  897. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_gb.py", line 429, in fit
  898. X, y = self._validate_data(
  899. ^^^^^^^^^^^^^^^^^^^^
  900. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  901. X, y = check_X_y(X, y, **check_params)
  902. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  903. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  904. X = check_array(
  905. ^^^^^^^^^^^^
  906. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  907. _assert_all_finite(
  908. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  909. raise ValueError(msg_err)
  910. ValueError: Input X contains NaN.
  911. GradientBoostingClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  912. 16 Jun 2024 19:43
  913.  
  914. *********
  915.  
  916. ERROR:root:Input X contains NaN.
  917. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  918. Traceback (most recent call last):
  919. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 866, in <module>
  920. NB_model.fit(X_train_fold, y_train_fold)
  921. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 267, in fit
  922. return self._partial_fit(
  923. ^^^^^^^^^^^^^^^^^^
  924. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/naive_bayes.py", line 428, in _partial_fit
  925. X, y = self._validate_data(X, y, reset=first_call)
  926. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  927. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  928. X, y = check_X_y(X, y, **check_params)
  929. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  930. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  931. X = check_array(
  932. ^^^^^^^^^^^^
  933. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  934. _assert_all_finite(
  935. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  936. raise ValueError(msg_err)
  937. ValueError: Input X contains NaN.
  938. GaussianNB does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  939. 16 Jun 2024 19:43
  940.  
  941. *********
  942.  
  943. ERROR:root:Input X contains NaN.
  944. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  945. Traceback (most recent call last):
  946. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 923, in <module>
  947. AB_model.fit(X_train_fold, y_train_fold)
  948. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/ensemble/_weight_boosting.py", line 126, in fit
  949. X, y = self._validate_data(
  950. ^^^^^^^^^^^^^^^^^^^^
  951. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  952. X, y = check_X_y(X, y, **check_params)
  953. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  954. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  955. X = check_array(
  956. ^^^^^^^^^^^^
  957. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  958. _assert_all_finite(
  959. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  960. raise ValueError(msg_err)
  961. ValueError: Input X contains NaN.
  962. AdaBoostClassifier does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  963. 16 Jun 2024 19:43
  964.  
  965. *********
  966.  
  967. ERROR:root:Input X contains NaN.
  968. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  969. Traceback (most recent call last):
  970. File "/home/u/Music/All_65_ML_Code/ML_65_Algo_k_fold_5.py", line 974, in <module>
  971. qda_multi.fit(X_train_fold, y_train_fold)
  972. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/discriminant_analysis.py", line 890, in fit
  973. X, y = self._validate_data(X, y)
  974. ^^^^^^^^^^^^^^^^^^^^^^^^^
  975. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/base.py", line 584, in _validate_data
  976. X, y = check_X_y(X, y, **check_params)
  977. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  978. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1106, in check_X_y
  979. X = check_array(
  980. ^^^^^^^^^^^^
  981. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 921, in check_array
  982. _assert_all_finite(
  983. File "/home/u/anaconda3/lib/python3.11/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
  984. raise ValueError(msg_err)
  985. ValueError: Input X contains NaN.
  986. QuadraticDiscriminantAnalysis does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
  987. 16 Jun 2024 19:43
  988.  
  989. *********
  990.  
  991.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement