Pular para conteúdo

Utilitarios

DataUtils

Helpers for generating, normalizing, and splitting datasets.

aplicar_normalizacao(X, params) staticmethod

Apply a previously fitted normalization configuration.

carregar_dataset_diabetes(normalizar=None) staticmethod

Load the packaged Diabetes regression dataset.

carregar_dataset_iris(normalizar=None) staticmethod

Load the packaged Iris dataset.

carregar_dataset_real(nome, normalizar=None) staticmethod

Load a packaged real dataset and optionally normalize its features.

carregar_dataset_wine(normalizar=None) staticmethod

Load the packaged Wine dataset.

decodificar_one_hot(y) staticmethod

Convert one-hot arrays or logits into class indices.

dividir_treino_teste(X, y, test_size=0.2, random_state=42) staticmethod

Split aligned feature and label arrays into train and test sets.

gerar_dataset_classificacao(n_samples=1000, n_features=2, noise=0.1, random_state=42) staticmethod

Generate a simple synthetic binary classification dataset.

gerar_dataset_multiclasse(n_samples=600, n_features=2, n_classes=3, noise=0.12, random_state=42) staticmethod

Generate a synthetic multi-class dataset using Gaussian blobs.

gerar_dataset_regressao(n_samples=240, n_features=3, noise=0.15, random_state=42) staticmethod

Generate a smooth synthetic regression dataset with mild nonlinearity.

gerar_xor_dataset() staticmethod

Return the classic XOR dataset.

listar_datasets_reais() staticmethod

List packaged real datasets available in the project.

normalizar_dados(X, metodo='padrao') staticmethod

Normalize a 2D dataset using standard, min-max, or robust scaling.

one_hot_encode(y, n_classes=None) staticmethod

Convert integer labels to one-hot encoding.

MetricUtils

Helpers for binary and multi-class classification metrics.

matriz_confusao(y_true, y_pred, limiar=0.5, labels=None) staticmethod

Compute a confusion matrix for binary or multi-class classification.

metricas_classificacao(y_true, y_pred, limiar=0.5, labels=None) staticmethod

Compute generic classification metrics for binary or multi-class tasks.

metricas_regressao(y_true, y_pred) staticmethod

Compute core regression metrics for educational experiments.

precisao_recall_f1(y_true, y_pred, limiar=0.5) staticmethod

Compute classic binary precision, recall, and F1-score.

VisualizationUtils

Helpers for plotting training history and classification data.

plotar_dados_classificacao(X, y, titulo='Dataset de classificacao', salvar=None, mostrar=True) staticmethod

Plot a classification dataset using the first two features.

plotar_fronteira_decisao(rede_neural, X, y, resolucao=100, titulo='Fronteira de decisao', salvar=None, mostrar=True) staticmethod

Plot the decision surface for a trained network on 2D data.

plotar_historico_treinamento(historico_erro, historico_acuracia, historico_validacao_erro=None, historico_validacao_acuracia=None, salvar=None, mostrar=True) staticmethod

Plot training and optional validation history.

plotar_matriz_confusao(matriz, labels=None, titulo='Matriz de confusao', salvar=None, mostrar=True) staticmethod

Plot a confusion matrix with numeric annotations.

plotar_regressao(y_true, y_pred, titulo='Valores reais vs previstos', salvar=None, mostrar=True) staticmethod

Plot regression predictions against true values.

FileUtils

Helpers for small CSV-based experiment artifacts.

carregar_csv(caminho) staticmethod

Load a CSV file into a dictionary of columns.

salvar_csv(dados, caminho) staticmethod

Persist a dictionary of equal-length columns to CSV.

salvar_linhas_csv(linhas, caminho) staticmethod

Persiste uma lista de dicionarios, preenchendo colunas ausentes com vazio.