- Este tópico contém 1 resposta, 2 vozes e foi atualizado pela última vez 5 meses atrás por Denny Ceccon.
- AutorPosts
- 5 de julho de 2024 às 20:51 #45521
Boa noite!!
Enviei mais cedo essa dúvisa e até o momento não obtive resposta!!!
#metódo do cotovelo->Elbow
wcss = []
for i in range(1, 11):
kmeans_cartao = KMeans(n_clusters=i, random_state=0)
kmeans_cartao.fit(x_cartao)
wcss.append(kmeans_cartao.inertia_)AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_992\2699832174.py in <module>
3 for i in range(1, 11):
4 kmeans_cartao = KMeans(n_clusters=i, random_state=0)
—-> 5 kmeans_cartao.fit(x_cartao)
6 wcss.append(kmeans_cartao.inertia_)
7~\anaconda3\lib\site-packages\sklearn\cluster\_kmeans.py in fit(self, X, y, sample_weight)
1184 return -scores
1185
-> 1186 def _more_tags(self):
1187 return {
1188 “_xfail_checks”: {~\anaconda3\lib\site-packages\sklearn\cluster\_kmeans.py in _kmeans_single_lloyd(X, sample_weight, centers_init, max_iter, verbose, x_squared_norms, tol, n_threads)
623 inertia = _inertia(X, sample_weight, centers, labels, n_threads)
624
–> 625 return labels, inertia, centers, i + 1
626
627~\anaconda3\lib\site-packages\sklearn\utils\fixes.py in threadpool_limits(limits, user_api)
312 maxval : float, default=None
313 Maximum value needed.
–> 314
315 check_contents : bool, default=False
316 Whether to check the values in the arrays and not just their types.~\anaconda3\lib\site-packages\threadpoolctl.py in __init__(self, limits, user_api)
169
170 _symbol_prefixes = (“”, “scipy_”)
–> 171 _symbol_suffixes = (“”, “64_”, “_64”)
172
173 # All variations of “openblas_get_num_threads”, accounting for the affixes~\anaconda3\lib\site-packages\threadpoolctl.py in _set_threadpool_limits(self)
266 return set_func(num_threads)
267
–> 268 def get_version(self):
269 get_version_ = getattr(self.dynlib, “bli_info_get_version_str”, None)
270 if get_version_ is None:~\anaconda3\lib\site-packages\threadpoolctl.py in __init__(self, user_api, prefixes, modules)
338 # returns -1. We map it to 1 for consistency with other libraries.
339 return 1 if num_threads == -1 else num_threads
–> 340
341 def set_num_threads(self, num_threads):
342 set_func = getattr(~\anaconda3\lib\site-packages\threadpoolctl.py in _load_modules(self)
371 backends = []
372 for i in range(n_backends):
–> 373 backend_name = ctypes.create_string_buffer(1024)
374 get_backend_list_(backend_name, 1024, i)
375 if backend_name.value.decode(“utf-8”) != “__FALLBACK__”:~\anaconda3\lib\site-packages\threadpoolctl.py in _find_modules_with_enum_process_module_ex(self)
483 “””Controller class for OpenMP”””
484
–> 485 user_api = “openmp”
486 internal_api = “openmp”
487 filename_prefixes = (“libiomp”, “libgomp”, “libomp”, “vcomp”)~\anaconda3\lib\site-packages\threadpoolctl.py in _make_module_from_path(self, filepath)
513 FlexiBLASController,
514 ]
–> 515
516 # Helpers for the doc and test names
517 _ALL_USER_APIS = list(set(lib.user_api for lib in _ALL_CONTROLLERS))~\anaconda3\lib\site-packages\threadpoolctl.py in __init__(self, filepath, prefix, user_api, internal_api)
604 for lib_controller, original_info in zip(
605 self._controller.lib_controllers, self._original_info
–> 606 ):
607 lib_controller.set_num_threads(original_info[“num_threads”])
608~\anaconda3\lib\site-packages\threadpoolctl.py in get_version(self)
644 )
645
–> 646 return num_threads
647
648 def _check_params(self, limits, user_api):AttributeError: ‘NoneType’ object has no attribute ‘split’
6 de julho de 2024 às 10:44 #45571Olá André,
Devido à quantidade de alunos, nosso tempo de resposta na maioria dos casos é até 24 horas.
Respondi sua dúvida no outro tópico.
- AutorPosts
- Você deve fazer login para responder a este tópico.