NandaMatt commited on
Commit
ad4e7cd
·
verified ·
1 Parent(s): 77840ec
model/mpl_pequeno_torch/dataset.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Dataset concreto do pipeline ``atualizado`` — dados tabulares + PyTorch.
3
+
4
+ A maior parte da lógica está em :class:`base_dataset.BaseDataset`
5
+ (``docker/base_dataset.py``). Aqui só fica o que é específico:
6
+
7
+ - :py:meth:`build_features` — seleciona colunas numéricas do DataFrame,
8
+ descartando colunas de identificação (``id``, ``image_path``, ...).
9
+ - :py:meth:`get_data_loader` — devolve ``DataLoader`` do PyTorch
10
+ montado em cima dos arrays preparados pela base.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import os
16
+ import sys
17
+ from typing import Optional, Tuple
18
+
19
+ import numpy as np
20
+ import pandas as pd
21
+
22
+ try:
23
+ import torch
24
+ from torch.utils.data import DataLoader, TensorDataset
25
+ _TORCH_AVAILABLE = True
26
+ except ImportError: # pragma: no cover
27
+ _TORCH_AVAILABLE = False
28
+
29
+ # Importa BaseDataset de ../base_dataset.py
30
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
31
+ from base_dataset import BaseDataset # noqa: E402
32
+
33
+
34
+ class TrainingDataset(BaseDataset):
35
+ """Dataset tabular para o pipeline em ``docker/atualizado``."""
36
+
37
+ # ------------------------------------------------------------------
38
+ # Hooks da base
39
+ # ------------------------------------------------------------------
40
+ def build_features(self) -> None:
41
+ if self.df is None:
42
+ raise RuntimeError("self.df está vazio; load_raw_data() não rodou.")
43
+
44
+ # Prioridade: lista explícita no metadata.json
45
+ explicit = self.metadata.get("features")
46
+ if explicit:
47
+ missing = [c for c in explicit if c not in self.df.columns]
48
+ if missing:
49
+ raise ValueError(
50
+ f"Colunas declaradas em metadata['features'] não encontradas no DataFrame: {missing}"
51
+ )
52
+ self.feature_columns = list(explicit)
53
+ self.X = self.df[self.feature_columns].to_numpy(dtype=np.float32)
54
+ return
55
+
56
+ # Fallback: inferência automática de colunas numéricas
57
+ feats = []
58
+ for col in self.df.columns:
59
+ if col == self.target_column:
60
+ continue
61
+ if col.lower() in self.NON_FEATURE_COLS:
62
+ continue
63
+ if not pd.api.types.is_numeric_dtype(self.df[col]):
64
+ continue
65
+ feats.append(col)
66
+
67
+ if not feats:
68
+ raise ValueError(
69
+ "Nenhuma coluna numérica encontrada para usar como feature."
70
+ )
71
+
72
+ self.feature_columns = feats
73
+ self.X = self.df[feats].to_numpy(dtype=np.float32)
74
+
75
+ def get_data_loader(
76
+ self,
77
+ batch_size: int = 32,
78
+ train_ratio: Optional[float] = None,
79
+ seed: Optional[int] = None,
80
+ ) -> Tuple["DataLoader", "DataLoader"]:
81
+ if not _TORCH_AVAILABLE:
82
+ raise RuntimeError(
83
+ "PyTorch não está instalado; instale-o ou use get_arrays()."
84
+ )
85
+
86
+ train_ratio, seed = self._resolve_split_params(train_ratio, seed)
87
+ idx_train, idx_val = self._split_indices(train_ratio, seed)
88
+
89
+ assert self.X is not None and self.y is not None # pra mypy
90
+
91
+ X_train = torch.from_numpy(self.X[idx_train])
92
+ y_train = torch.from_numpy(self.y[idx_train]).long()
93
+ X_val = torch.from_numpy(self.X[idx_val])
94
+ y_val = torch.from_numpy(self.y[idx_val]).long()
95
+
96
+ bs = self._resolve_batch_size(batch_size)
97
+ train_loader = DataLoader(
98
+ TensorDataset(X_train, y_train), batch_size=bs, shuffle=True
99
+ )
100
+ val_loader = DataLoader(
101
+ TensorDataset(X_val, y_val), batch_size=bs, shuffle=False
102
+ )
103
+
104
+ print(
105
+ f" - Train samples: {len(X_train)} | Val samples: {len(X_val)}"
106
+ f" | Batch size: {bs}"
107
+ )
108
+ return train_loader, val_loader
model/mpl_pequeno_torch/help.md ADDED
File without changes
model/mpl_pequeno_torch/hyperparameters.json ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "setting": {
3
+ "name": {
4
+ "text": "Nome do modelo",
5
+ "value": "mpl_pequeno_torch",
6
+ "Help": "Identificação do modelo PyTorch tabular. Pode ser usado para salvar checkpoints ou registros.",
7
+ "default": "mpl_pequeno_torch",
8
+ "type": "string",
9
+ "required": true
10
+ },
11
+ "architecture": {
12
+ "text": "Arquitetura do modelo",
13
+ "value": "MLP tabular",
14
+ "Help": "Arquitetura da rede neural para dados tabulares usando PyTorch.",
15
+ "default": "MLP tabular",
16
+ "type": "string",
17
+ "required": true
18
+ },
19
+ "tipo": {
20
+ "text": "Tipo do modelo",
21
+ "value": "classification",
22
+ "Help": "Define o tipo de tarefa do modelo.",
23
+ "default": "classification",
24
+ "type": "string",
25
+ "required": true
26
+ }
27
+ },
28
+ "train": {
29
+ "batch_size": {
30
+ "text": "Tamanho do batch",
31
+ "Help": "Tamanho do batch usado durante o treinamento.",
32
+ "default": 32,
33
+ "range": {
34
+ "min": 1,
35
+ "max": null
36
+ },
37
+ "type": "integer",
38
+ "required": true
39
+ },
40
+ "epochs": {
41
+ "text": "Número de épocas",
42
+ "Help": "Quantidade de épocas de treinamento.",
43
+ "default": 10,
44
+ "range": {
45
+ "min": 1,
46
+ "max": 1000
47
+ },
48
+ "type": "integer",
49
+ "required": true
50
+ },
51
+ "learning_rate": {
52
+ "text": "Taxa de aprendizado",
53
+ "Help": "Taxa usada pelo otimizador.",
54
+ "default": 0.001,
55
+ "range": {
56
+ "min": 0.000001,
57
+ "max": 1.0
58
+ },
59
+ "type": "float",
60
+ "required": true
61
+ },
62
+ "weight_decay": {
63
+ "text": "Decaimento de peso",
64
+ "Help": "Regularização L2 usada pelo otimizador.",
65
+ "default": 0.0001,
66
+ "range": {
67
+ "min": 0.0,
68
+ "max": 0.1
69
+ },
70
+ "type": "float",
71
+ "required": false
72
+ },
73
+ "optimizer": {
74
+ "text": "Otimizador",
75
+ "Help": "Otimizador usado no treinamento.",
76
+ "default": "adam",
77
+ "type": "string",
78
+ "required": true
79
+ },
80
+ "hidden_dims": {
81
+ "text": "Dimensões ocultas",
82
+ "Help": "Lista de camadas ocultas do MLP.",
83
+ "default": [32, 16],
84
+ "type": "list",
85
+ "required": false
86
+ },
87
+ "dropout": {
88
+ "text": "Dropout",
89
+ "Help": "Taxa de dropout aplicada entre camadas.",
90
+ "default": 0.0,
91
+ "range": {
92
+ "min": 0.0,
93
+ "max": 1.0
94
+ },
95
+ "type": "float",
96
+ "required": false
97
+ }
98
+ },
99
+ "test": {
100
+ "batch_size": {
101
+ "text": "Tamanho do batch",
102
+ "Help": "Tamanho do batch usado na avaliação.",
103
+ "default": 64,
104
+ "range": {
105
+ "min": 1,
106
+ "max": null
107
+ },
108
+ "type": "integer",
109
+ "required": true
110
+ }
111
+ },
112
+ "predict": {
113
+ "batch_size": {
114
+ "text": "Tamanho do batch",
115
+ "Help": "Tamanho do batch usado na predição.",
116
+ "default": 64,
117
+ "range": {
118
+ "min": 1,
119
+ "max": null
120
+ },
121
+ "type": "integer",
122
+ "required": true
123
+ }
124
+ }
125
+ }
model/mpl_pequeno_torch/main.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Entrypoint do pipeline ``atualizado`` (MLP tabular em PyTorch).
3
+
4
+ Toda a orquestração (modos train/test/predict, leitura de config,
5
+ escrita dos artefatos) vive em ``docker/base_main.py``. Aqui só
6
+ registramos as peças concretas desta arquitetura:
7
+
8
+ - ``TrainingDataset`` (de :mod:`dataset`)
9
+ - ``create_model`` (de :mod:`model`)
10
+
11
+ Como o input é tabular, o ``predict_input_loader`` default do
12
+ ``base_main`` (que lê CSV/XLSX) já serve — não precisa passar nada.
13
+ Arquiteturas futuras (ex.: CNN para imagem) podem passar um loader
14
+ próprio na chamada de ``run_pipeline``.
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import os
20
+ import sys
21
+
22
+ # Permite importar base_main.py de ../
23
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
24
+
25
+ from base_main import run_pipeline # noqa: E402
26
+ from dataset import TrainingDataset # noqa: E402
27
+ from model import create_model # noqa: E402
28
+
29
+
30
+ if __name__ == "__main__":
31
+ sys.exit(
32
+ run_pipeline(
33
+ dataset_cls=TrainingDataset,
34
+ model_factory=create_model,
35
+ )
36
+ )
model/mpl_pequeno_torch/model.py ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Implementação concreta (PyTorch) do modelo treinado pelo pipeline.
3
+
4
+ Arquitetura: MLP simples para dados tabulares. A configuração de
5
+ camadas, dropout, otimizador, etc. vem de ``config`` (lido do
6
+ ``config.json`` do treino) ou de defaults razoáveis.
7
+
8
+ A classe ``TabularMLP`` herda de ``BaseModel`` (em ``docker/base_model.py``)
9
+ para manter a API uniforme entre frameworks. Uma função ``create_model``
10
+ fábrica é exposta no fim do arquivo para que ``main.py`` continue
11
+ funcionando sem mudanças.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import os
17
+ import sys
18
+ from typing import Any, Dict, List, Optional
19
+
20
+ import numpy as np
21
+ import torch
22
+ import torch.nn as nn
23
+ import torch.optim as optim
24
+ from torch.utils.data import DataLoader
25
+
26
+ # Permite importar base_model.py de ../
27
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
28
+ from base_model import BaseModel # noqa: E402
29
+ from utils import emit_progress # noqa: E402
30
+
31
+
32
+ # ---------------------------------------------------------------------------
33
+ # Arquitetura MLP
34
+ # ---------------------------------------------------------------------------
35
+ class _MLP(nn.Module):
36
+ def __init__(
37
+ self,
38
+ input_size: int,
39
+ hidden_dims: List[int],
40
+ num_classes: int,
41
+ dropout: float = 0.0,
42
+ ) -> None:
43
+ super().__init__()
44
+ layers: List[nn.Module] = []
45
+ prev = input_size
46
+ for h in hidden_dims:
47
+ layers.append(nn.Linear(prev, h))
48
+ layers.append(nn.ReLU())
49
+ if dropout and dropout > 0:
50
+ layers.append(nn.Dropout(dropout))
51
+ prev = h
52
+ layers.append(nn.Linear(prev, num_classes))
53
+ self.net = nn.Sequential(*layers)
54
+
55
+ def forward(self, x: torch.Tensor) -> torch.Tensor: # noqa: D401
56
+ return self.net(x)
57
+
58
+
59
+ # ---------------------------------------------------------------------------
60
+ # Wrapper que implementa a API de BaseModel
61
+ # ---------------------------------------------------------------------------
62
+ class TabularMLP(BaseModel):
63
+ """MLP tabular em PyTorch, plugável no pipeline."""
64
+
65
+ def build_model(self) -> nn.Module:
66
+ hp = self.config.get("hyperparameters", {})
67
+ hidden_dims = self.config.get("hidden_dims") or hp.get("hidden_dims") or [
68
+ self.config.get("hidden_dim1", 32),
69
+ self.config.get("hidden_dim2", 16),
70
+ ]
71
+ dropout = float(hp.get("dropout", self.config.get("dropout", 0.0)))
72
+
73
+ # device
74
+ self.device = torch.device(
75
+ "cuda"
76
+ if torch.cuda.is_available() and self.config.get("use_cuda", True)
77
+ else "cpu"
78
+ )
79
+
80
+ model = _MLP(
81
+ input_size=self.input_size,
82
+ hidden_dims=list(hidden_dims),
83
+ num_classes=self.num_classes,
84
+ dropout=dropout,
85
+ ).to(self.device)
86
+
87
+ self.criterion = nn.CrossEntropyLoss()
88
+ self._hidden_dims = list(hidden_dims)
89
+ self._dropout = dropout
90
+ return model
91
+
92
+ # ---------------- treinamento ----------------
93
+ def train_model(
94
+ self,
95
+ train_loader: DataLoader,
96
+ val_loader: Optional[DataLoader],
97
+ epochs: int,
98
+ lr: float,
99
+ **kwargs: Any,
100
+ ) -> Dict[str, list]:
101
+ hp = self.config.get("hyperparameters", {})
102
+ epochs = int(hp.get("epochs", epochs))
103
+ lr = float(hp.get("learning_rate", lr))
104
+ weight_decay = float(hp.get("weight_decay", 0.0))
105
+ optimizer_name = str(hp.get("optimizer", "adam")).lower()
106
+
107
+ optimizer = self._build_optimizer(optimizer_name, lr, weight_decay)
108
+
109
+ history = {
110
+ "train_loss": [], "train_acc": [],
111
+ "val_loss": [], "val_acc": [],
112
+ }
113
+
114
+ n_batches = max(len(train_loader), 1)
115
+ total_train_steps = max(epochs * n_batches, 1)
116
+ best_val_acc = -float("inf")
117
+ best_epoch = -1
118
+ for epoch in range(1, epochs + 1):
119
+ self.model.train()
120
+ run_loss = 0.0
121
+ correct = 0
122
+ total = 0
123
+ for batch_idx, (X, y) in enumerate(train_loader, start=1):
124
+ X = X.to(self.device)
125
+ y = y.to(self.device)
126
+
127
+ optimizer.zero_grad()
128
+ logits = self.model(X)
129
+ loss = self.criterion(logits, y)
130
+ loss.backward()
131
+ optimizer.step()
132
+
133
+ run_loss += float(loss.item()) * X.size(0)
134
+ preds = logits.argmax(dim=1)
135
+ correct += int((preds == y).sum().item())
136
+ total += int(y.size(0))
137
+
138
+ global_step = (epoch - 1) * n_batches
139
+ inner_pct = int(global_step * 100 / total_train_steps)
140
+ emit_progress(inner_pct, total_train_steps)
141
+
142
+ train_loss = run_loss / max(total, 1)
143
+ train_acc = correct / max(total, 1)
144
+ history["train_loss"].append(round(train_loss, 6))
145
+ history["train_acc"].append(round(train_acc, 6))
146
+
147
+ val_loss, val_acc = (float("nan"), float("nan"))
148
+ if val_loader is not None:
149
+ val_metrics = self.evaluate(val_loader)
150
+ val_loss = val_metrics["loss"]
151
+ val_acc = val_metrics["accuracy"]
152
+ if val_acc > best_val_acc:
153
+ best_val_acc = val_acc
154
+ best_epoch = epoch
155
+ history["val_loss"].append(round(val_loss, 6))
156
+ history["val_acc"].append(round(val_acc, 6))
157
+
158
+ print(
159
+ f"Epoch [{epoch:>3}/{epochs}] "
160
+ f"train_loss={train_loss:.4f} train_acc={train_acc:.4f} "
161
+ f"val_loss={val_loss:.4f} val_acc={val_acc:.4f}"
162
+ )
163
+
164
+ history["best_epoch"] = best_epoch
165
+ history["best_val_acc"] = round(best_val_acc, 6) if best_epoch > 0 else None
166
+ self.history = history
167
+ return history
168
+
169
+ # ---------------- avaliação ----------------
170
+ def evaluate(self, data_loader: DataLoader) -> Dict[str, float]:
171
+ self.model.eval()
172
+ loss_sum = 0.0
173
+ correct = 0
174
+ total = 0
175
+ with torch.no_grad():
176
+ for X, y in data_loader:
177
+ X = X.to(self.device)
178
+ y = y.to(self.device)
179
+ logits = self.model(X)
180
+ loss = self.criterion(logits, y)
181
+ loss_sum += float(loss.item()) * X.size(0)
182
+ preds = logits.argmax(dim=1)
183
+ correct += int((preds == y).sum().item())
184
+ total += int(y.size(0))
185
+ return {
186
+ "loss": loss_sum / max(total, 1),
187
+ "accuracy": correct / max(total, 1),
188
+ "n": total,
189
+ }
190
+
191
+ # ---------------- inferência ----------------
192
+ def predict(self, inputs: Any) -> np.ndarray:
193
+ self.model.eval()
194
+ with torch.no_grad():
195
+ if isinstance(inputs, DataLoader):
196
+ outs: List[np.ndarray] = []
197
+ for batch in inputs:
198
+ X = batch[0] if isinstance(batch, (tuple, list)) else batch
199
+ X = X.to(self.device)
200
+ outs.append(self.model(X).argmax(dim=1).cpu().numpy())
201
+ return np.concatenate(outs, axis=0)
202
+ if isinstance(inputs, np.ndarray):
203
+ X = torch.from_numpy(inputs.astype(np.float32)).to(self.device)
204
+ elif isinstance(inputs, torch.Tensor):
205
+ X = inputs.to(self.device)
206
+ else:
207
+ X = torch.tensor(inputs, dtype=torch.float32).to(self.device)
208
+ if X.ndim == 1:
209
+ X = X.unsqueeze(0)
210
+ return self.model(X).argmax(dim=1).cpu().numpy()
211
+
212
+ # ---------------- persistência ----------------
213
+ def save_model(self, filename: str) -> str:
214
+ path = os.path.join(self.model_dir, filename)
215
+ torch.save(
216
+ {
217
+ "state_dict": self.model.state_dict(),
218
+ "input_size": self.input_size,
219
+ "num_classes": self.num_classes,
220
+ "hidden_dims": self._hidden_dims,
221
+ "dropout": self._dropout,
222
+ "project_name": self.project_name,
223
+ },
224
+ path,
225
+ )
226
+ print(f"✓ Model saved to {path}")
227
+ return path
228
+
229
+ def load_model(self, filename: str) -> None:
230
+ path = filename if os.path.isabs(filename) else os.path.join(
231
+ self.model_dir, filename
232
+ )
233
+ ckpt = torch.load(path, map_location=self.device)
234
+ self._hidden_dims = ckpt.get("hidden_dims", self._hidden_dims)
235
+ self._dropout = ckpt.get("dropout", self._dropout)
236
+ self.model = _MLP(
237
+ input_size=ckpt["input_size"],
238
+ hidden_dims=self._hidden_dims,
239
+ num_classes=ckpt["num_classes"],
240
+ dropout=self._dropout,
241
+ ).to(self.device)
242
+ self.model.load_state_dict(ckpt["state_dict"])
243
+
244
+ # ---------------- helpers ----------------
245
+ def _build_optimizer(
246
+ self, name: str, lr: float, weight_decay: float
247
+ ) -> optim.Optimizer:
248
+ params = self.model.parameters()
249
+ if name == "sgd":
250
+ return optim.SGD(params, lr=lr, momentum=0.9, weight_decay=weight_decay)
251
+ if name == "rmsprop":
252
+ return optim.RMSprop(params, lr=lr, weight_decay=weight_decay)
253
+ # default: adam
254
+ return optim.Adam(params, lr=lr, weight_decay=weight_decay)
255
+
256
+
257
+ # ---------------------------------------------------------------------------
258
+ # Fábrica usada pelo main.py
259
+ # ---------------------------------------------------------------------------
260
+ def create_model(
261
+ input_size: int,
262
+ num_classes: int,
263
+ project_name: str,
264
+ base_path: str,
265
+ config: Optional[Dict[str, Any]] = None,
266
+ ) -> TabularMLP:
267
+ """Cria um ``TabularMLP`` pronto pra uso pelo main.py."""
268
+ return TabularMLP(
269
+ input_size=input_size,
270
+ num_classes=num_classes,
271
+ project_name=project_name,
272
+ base_path=base_path,
273
+ framework="pytorch",
274
+ config=config or {},
275
+ )
model/mpl_pequeno_torch/python_version.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
model/mpl_pequeno_torch/requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ --extra-index-url https://download.pytorch.org/whl/cpu
2
+
3
+ pandas
4
+ scikit-learn
5
+ joblib
6
+ torch
7
+ openpyxl
8
+ numpy
project/.DS_Store ADDED
Binary file (6.15 kB). View file
 
project/dataset/.DS_Store ADDED
Binary file (6.15 kB). View file
 
project/dataset/metadata.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source": "https://www.kaggle.com/datasets/uciml/pima-indians-diabetes-database/data",
3
+ "target_column": "Outcome",
4
+ "features": [
5
+ "Pregnancies",
6
+ "Glucose",
7
+ "BloodPressure",
8
+ "SkinThickness",
9
+ "Insulin",
10
+ "BMI",
11
+ "DiabetesPedigreeFunction",
12
+ "Age"
13
+ ],
14
+ "problem_type": "classification",
15
+ "classes": [0,1],
16
+ "total_records": 768,
17
+ "format": "xlsx",
18
+ "file": "raw_data.xlsx"
19
+ }
project/dataset/raw_data.xlsx ADDED
Binary file (49 kB). View file
 
project/project.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cancer cell detection torch foo",
3
+ "description": "Classifica\u00c3\u00a7\u00c3\u00a3o de imagens de tecido para detec\u00c3\u00a7\u00c3\u00a3o de c\u00c3\u00a9lulas cancer\u00c3\u00adgenas",
4
+ "models": [
5
+ "mpl_pequeno_torch"
6
+ ],
7
+ "created_at": "2025-05-10T09:00:00Z",
8
+ "project_id": "b7c997c4-e251-450e-8a7d-3f9cbf66e011"
9
+ }
project/readme/README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Model shared by FERNANDA CAETANO DE MATTOS BASTOS CUNHA
2
+
3
+ ORCID: 0009-0009-5070-4480
4
+
5
+ This model was created using QSAR IA, integrating with the Hugging Face Hub and authenticated via ORCID.
project/trains/.DS_Store ADDED
Binary file (6.15 kB). View file
 
project/trains/treino_lr_alto/.DS_Store ADDED
Binary file (6.15 kB). View file
 
project/trains/treino_lr_alto/config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "treino_lr_alto",
3
+ "created_at": "2025-05-11T10:00:00Z",
4
+ "split": {
5
+ "type": "holdout",
6
+ "ratio": "70/15/15",
7
+ "stratify": true,
8
+ "random_state": 42
9
+ },
10
+ "hyperparameters": {
11
+ "learning_rate": 0.01,
12
+ "epochs": 200,
13
+ "batch_size": 32,
14
+ "optimizer": "adam",
15
+ "dropout": 0.3
16
+ }
17
+ }
project/trains/treino_lr_alto/history.json ADDED
@@ -0,0 +1,812 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_loss": [
3
+ 3.340261,
4
+ 0.809782,
5
+ 0.706409,
6
+ 0.668322,
7
+ 0.710596,
8
+ 0.686781,
9
+ 0.650045,
10
+ 0.647283,
11
+ 0.663013,
12
+ 0.644274,
13
+ 0.646103,
14
+ 0.651018,
15
+ 0.65702,
16
+ 0.645654,
17
+ 0.646554,
18
+ 0.646869,
19
+ 0.645038,
20
+ 0.645864,
21
+ 0.641224,
22
+ 0.646269,
23
+ 0.64423,
24
+ 0.648175,
25
+ 0.646951,
26
+ 0.651255,
27
+ 0.647183,
28
+ 0.646099,
29
+ 0.647832,
30
+ 0.645825,
31
+ 0.64598,
32
+ 0.646589,
33
+ 0.644495,
34
+ 0.740191,
35
+ 0.647618,
36
+ 0.646404,
37
+ 0.651692,
38
+ 0.646996,
39
+ 0.646844,
40
+ 0.646534,
41
+ 0.646752,
42
+ 0.647767,
43
+ 0.646383,
44
+ 0.648853,
45
+ 0.651181,
46
+ 0.64699,
47
+ 0.646778,
48
+ 0.645614,
49
+ 0.645479,
50
+ 0.64215,
51
+ 0.646343,
52
+ 0.646289,
53
+ 0.653316,
54
+ 0.645541,
55
+ 0.647942,
56
+ 0.647248,
57
+ 0.647666,
58
+ 0.647095,
59
+ 0.648304,
60
+ 0.646693,
61
+ 0.646491,
62
+ 0.646023,
63
+ 0.646168,
64
+ 0.646464,
65
+ 0.646827,
66
+ 0.646518,
67
+ 0.646548,
68
+ 0.646915,
69
+ 0.646485,
70
+ 0.646963,
71
+ 0.646673,
72
+ 0.646515,
73
+ 0.646572,
74
+ 0.646955,
75
+ 0.646695,
76
+ 0.646547,
77
+ 0.646603,
78
+ 0.646723,
79
+ 0.646753,
80
+ 0.648157,
81
+ 0.646734,
82
+ 0.646391,
83
+ 0.646519,
84
+ 0.64647,
85
+ 0.646492,
86
+ 0.646401,
87
+ 0.646451,
88
+ 0.646214,
89
+ 0.646521,
90
+ 0.646464,
91
+ 0.646822,
92
+ 0.646633,
93
+ 0.646581,
94
+ 0.646519,
95
+ 0.647135,
96
+ 0.646097,
97
+ 0.647538,
98
+ 0.647549,
99
+ 0.646361,
100
+ 0.646848,
101
+ 0.646592,
102
+ 0.646555,
103
+ 0.646731,
104
+ 0.646347,
105
+ 0.645857,
106
+ 0.646638,
107
+ 0.648232,
108
+ 0.647693,
109
+ 0.646888,
110
+ 0.646543,
111
+ 0.646818,
112
+ 0.647411,
113
+ 0.647269,
114
+ 0.647098,
115
+ 0.646406,
116
+ 0.646469,
117
+ 0.646639,
118
+ 0.648553,
119
+ 0.646473,
120
+ 0.646661,
121
+ 0.646472,
122
+ 0.646888,
123
+ 0.646792,
124
+ 0.646692,
125
+ 0.646622,
126
+ 0.646968,
127
+ 0.64671,
128
+ 0.647677,
129
+ 0.64668,
130
+ 0.646745,
131
+ 0.646549,
132
+ 0.646519,
133
+ 0.64685,
134
+ 0.646456,
135
+ 0.646594,
136
+ 0.646817,
137
+ 0.646724,
138
+ 0.645777,
139
+ 0.646549,
140
+ 0.646043,
141
+ 0.64671,
142
+ 0.646496,
143
+ 0.653081,
144
+ 0.646684,
145
+ 0.64804,
146
+ 0.646754,
147
+ 0.646902,
148
+ 0.647109,
149
+ 0.646574,
150
+ 0.64663,
151
+ 0.646427,
152
+ 0.646466,
153
+ 0.646715,
154
+ 0.646679,
155
+ 0.646234,
156
+ 0.646721,
157
+ 0.647078,
158
+ 0.646506,
159
+ 0.646437,
160
+ 0.646615,
161
+ 0.647108,
162
+ 0.646916,
163
+ 0.646469,
164
+ 0.646548,
165
+ 0.646493,
166
+ 0.646871,
167
+ 0.646426,
168
+ 0.646706,
169
+ 0.64638,
170
+ 0.64663,
171
+ 0.646633,
172
+ 0.646395,
173
+ 0.646428,
174
+ 0.647163,
175
+ 0.646507,
176
+ 0.646662,
177
+ 0.64669,
178
+ 0.646704,
179
+ 0.646966,
180
+ 0.646363,
181
+ 0.646642,
182
+ 0.646731,
183
+ 0.646828,
184
+ 0.64659,
185
+ 0.646396,
186
+ 0.647026,
187
+ 0.646955,
188
+ 0.646671,
189
+ 0.646721,
190
+ 0.646474,
191
+ 0.646498,
192
+ 0.646861,
193
+ 0.646567,
194
+ 0.646654,
195
+ 0.64653,
196
+ 0.646513,
197
+ 0.646472,
198
+ 0.646979,
199
+ 0.646773,
200
+ 0.646509,
201
+ 0.647037,
202
+ 0.646786
203
+ ],
204
+ "train_acc": [
205
+ 0.541899,
206
+ 0.642458,
207
+ 0.653631,
208
+ 0.653631,
209
+ 0.646182,
210
+ 0.651769,
211
+ 0.651769,
212
+ 0.655493,
213
+ 0.649907,
214
+ 0.651769,
215
+ 0.655493,
216
+ 0.64432,
217
+ 0.649907,
218
+ 0.651769,
219
+ 0.651769,
220
+ 0.653631,
221
+ 0.653631,
222
+ 0.653631,
223
+ 0.657356,
224
+ 0.653631,
225
+ 0.653631,
226
+ 0.649907,
227
+ 0.651769,
228
+ 0.649907,
229
+ 0.651769,
230
+ 0.653631,
231
+ 0.649907,
232
+ 0.651769,
233
+ 0.651769,
234
+ 0.651769,
235
+ 0.653631,
236
+ 0.651769,
237
+ 0.651769,
238
+ 0.651769,
239
+ 0.649907,
240
+ 0.651769,
241
+ 0.651769,
242
+ 0.651769,
243
+ 0.651769,
244
+ 0.651769,
245
+ 0.651769,
246
+ 0.651769,
247
+ 0.649907,
248
+ 0.655493,
249
+ 0.648045,
250
+ 0.649907,
251
+ 0.653631,
252
+ 0.657356,
253
+ 0.648045,
254
+ 0.651769,
255
+ 0.649907,
256
+ 0.651769,
257
+ 0.649907,
258
+ 0.651769,
259
+ 0.651769,
260
+ 0.651769,
261
+ 0.651769,
262
+ 0.651769,
263
+ 0.651769,
264
+ 0.651769,
265
+ 0.651769,
266
+ 0.651769,
267
+ 0.651769,
268
+ 0.651769,
269
+ 0.651769,
270
+ 0.651769,
271
+ 0.651769,
272
+ 0.651769,
273
+ 0.651769,
274
+ 0.651769,
275
+ 0.651769,
276
+ 0.651769,
277
+ 0.651769,
278
+ 0.651769,
279
+ 0.651769,
280
+ 0.651769,
281
+ 0.651769,
282
+ 0.651769,
283
+ 0.651769,
284
+ 0.651769,
285
+ 0.651769,
286
+ 0.651769,
287
+ 0.651769,
288
+ 0.651769,
289
+ 0.651769,
290
+ 0.651769,
291
+ 0.651769,
292
+ 0.651769,
293
+ 0.651769,
294
+ 0.651769,
295
+ 0.651769,
296
+ 0.651769,
297
+ 0.651769,
298
+ 0.651769,
299
+ 0.651769,
300
+ 0.651769,
301
+ 0.651769,
302
+ 0.651769,
303
+ 0.651769,
304
+ 0.651769,
305
+ 0.651769,
306
+ 0.651769,
307
+ 0.651769,
308
+ 0.651769,
309
+ 0.649907,
310
+ 0.651769,
311
+ 0.651769,
312
+ 0.651769,
313
+ 0.651769,
314
+ 0.651769,
315
+ 0.651769,
316
+ 0.651769,
317
+ 0.651769,
318
+ 0.651769,
319
+ 0.651769,
320
+ 0.651769,
321
+ 0.651769,
322
+ 0.651769,
323
+ 0.651769,
324
+ 0.651769,
325
+ 0.651769,
326
+ 0.651769,
327
+ 0.651769,
328
+ 0.651769,
329
+ 0.651769,
330
+ 0.651769,
331
+ 0.651769,
332
+ 0.651769,
333
+ 0.651769,
334
+ 0.651769,
335
+ 0.651769,
336
+ 0.651769,
337
+ 0.651769,
338
+ 0.651769,
339
+ 0.651769,
340
+ 0.651769,
341
+ 0.651769,
342
+ 0.651769,
343
+ 0.651769,
344
+ 0.651769,
345
+ 0.651769,
346
+ 0.651769,
347
+ 0.649907,
348
+ 0.651769,
349
+ 0.651769,
350
+ 0.651769,
351
+ 0.651769,
352
+ 0.651769,
353
+ 0.651769,
354
+ 0.651769,
355
+ 0.651769,
356
+ 0.651769,
357
+ 0.651769,
358
+ 0.651769,
359
+ 0.651769,
360
+ 0.651769,
361
+ 0.651769,
362
+ 0.651769,
363
+ 0.651769,
364
+ 0.651769,
365
+ 0.651769,
366
+ 0.651769,
367
+ 0.651769,
368
+ 0.651769,
369
+ 0.651769,
370
+ 0.651769,
371
+ 0.651769,
372
+ 0.651769,
373
+ 0.651769,
374
+ 0.651769,
375
+ 0.651769,
376
+ 0.651769,
377
+ 0.651769,
378
+ 0.651769,
379
+ 0.651769,
380
+ 0.651769,
381
+ 0.651769,
382
+ 0.651769,
383
+ 0.651769,
384
+ 0.651769,
385
+ 0.651769,
386
+ 0.651769,
387
+ 0.651769,
388
+ 0.651769,
389
+ 0.651769,
390
+ 0.651769,
391
+ 0.651769,
392
+ 0.651769,
393
+ 0.651769,
394
+ 0.651769,
395
+ 0.651769,
396
+ 0.651769,
397
+ 0.651769,
398
+ 0.651769,
399
+ 0.651769,
400
+ 0.651769,
401
+ 0.651769,
402
+ 0.651769,
403
+ 0.651769,
404
+ 0.651769
405
+ ],
406
+ "val_loss": [
407
+ 0.689524,
408
+ 0.690965,
409
+ 0.67951,
410
+ 0.639884,
411
+ 0.667519,
412
+ 0.647848,
413
+ 0.647848,
414
+ 0.64794,
415
+ 0.647204,
416
+ 0.647922,
417
+ 0.647853,
418
+ 0.646778,
419
+ 0.647997,
420
+ 0.647855,
421
+ 0.64788,
422
+ 0.647858,
423
+ 0.651534,
424
+ 0.647858,
425
+ 0.649328,
426
+ 0.648444,
427
+ 0.648068,
428
+ 0.647857,
429
+ 0.64785,
430
+ 0.648059,
431
+ 0.647877,
432
+ 0.647848,
433
+ 0.661076,
434
+ 0.669076,
435
+ 0.648157,
436
+ 0.647899,
437
+ 0.647854,
438
+ 0.647865,
439
+ 0.648135,
440
+ 0.647963,
441
+ 0.647849,
442
+ 0.647886,
443
+ 0.647854,
444
+ 0.647848,
445
+ 0.647917,
446
+ 0.647859,
447
+ 0.647865,
448
+ 0.647848,
449
+ 0.647848,
450
+ 0.647863,
451
+ 0.647861,
452
+ 0.646393,
453
+ 0.648363,
454
+ 0.648105,
455
+ 0.647964,
456
+ 0.647872,
457
+ 0.647849,
458
+ 0.647849,
459
+ 0.647853,
460
+ 0.647886,
461
+ 0.647956,
462
+ 0.64786,
463
+ 0.648341,
464
+ 0.647858,
465
+ 0.647848,
466
+ 0.64785,
467
+ 0.647875,
468
+ 0.647849,
469
+ 0.647858,
470
+ 0.647891,
471
+ 0.647975,
472
+ 0.647854,
473
+ 0.647865,
474
+ 0.647855,
475
+ 0.647929,
476
+ 0.647926,
477
+ 0.647937,
478
+ 0.647872,
479
+ 0.647894,
480
+ 0.647887,
481
+ 0.647859,
482
+ 0.647853,
483
+ 0.647855,
484
+ 0.647874,
485
+ 0.648261,
486
+ 0.647975,
487
+ 0.647848,
488
+ 0.647849,
489
+ 0.647848,
490
+ 0.647907,
491
+ 0.647912,
492
+ 0.64786,
493
+ 0.647879,
494
+ 0.647874,
495
+ 0.647904,
496
+ 0.647856,
497
+ 0.647869,
498
+ 0.647851,
499
+ 0.647868,
500
+ 0.647854,
501
+ 0.648083,
502
+ 0.648101,
503
+ 0.647854,
504
+ 0.647918,
505
+ 0.647848,
506
+ 0.64785,
507
+ 0.648,
508
+ 0.647848,
509
+ 0.647851,
510
+ 0.647907,
511
+ 0.647933,
512
+ 0.648194,
513
+ 0.647848,
514
+ 0.647852,
515
+ 0.647848,
516
+ 0.647929,
517
+ 0.647878,
518
+ 0.648198,
519
+ 0.647888,
520
+ 0.647865,
521
+ 0.647883,
522
+ 0.648021,
523
+ 0.647891,
524
+ 0.647858,
525
+ 0.647849,
526
+ 0.647849,
527
+ 0.648011,
528
+ 0.64785,
529
+ 0.647851,
530
+ 0.647875,
531
+ 0.647962,
532
+ 0.647856,
533
+ 0.647917,
534
+ 0.647848,
535
+ 0.647915,
536
+ 0.647866,
537
+ 0.647849,
538
+ 0.647884,
539
+ 0.647849,
540
+ 0.647985,
541
+ 0.647856,
542
+ 0.647879,
543
+ 0.647887,
544
+ 0.647848,
545
+ 0.647864,
546
+ 0.647848,
547
+ 0.647851,
548
+ 0.648111,
549
+ 0.647874,
550
+ 0.647858,
551
+ 0.647878,
552
+ 0.647854,
553
+ 0.647978,
554
+ 0.647923,
555
+ 0.647893,
556
+ 0.647848,
557
+ 0.647851,
558
+ 0.647852,
559
+ 0.647869,
560
+ 0.647893,
561
+ 0.648016,
562
+ 0.647958,
563
+ 0.647852,
564
+ 0.647848,
565
+ 0.64785,
566
+ 0.647879,
567
+ 0.647949,
568
+ 0.64794,
569
+ 0.647891,
570
+ 0.647853,
571
+ 0.647877,
572
+ 0.647857,
573
+ 0.647849,
574
+ 0.647983,
575
+ 0.64791,
576
+ 0.64788,
577
+ 0.647849,
578
+ 0.647904,
579
+ 0.647911,
580
+ 0.64804,
581
+ 0.647964,
582
+ 0.647862,
583
+ 0.647876,
584
+ 0.647895,
585
+ 0.647874,
586
+ 0.648045,
587
+ 0.647851,
588
+ 0.647851,
589
+ 0.647857,
590
+ 0.648078,
591
+ 0.647881,
592
+ 0.647852,
593
+ 0.647965,
594
+ 0.647888,
595
+ 0.647848,
596
+ 0.647879,
597
+ 0.647848,
598
+ 0.647852,
599
+ 0.648108,
600
+ 0.647939,
601
+ 0.647851,
602
+ 0.647897,
603
+ 0.64787,
604
+ 0.647849,
605
+ 0.647926,
606
+ 0.647929
607
+ ],
608
+ "val_acc": [
609
+ 0.701299,
610
+ 0.649351,
611
+ 0.649351,
612
+ 0.679654,
613
+ 0.649351,
614
+ 0.649351,
615
+ 0.649351,
616
+ 0.649351,
617
+ 0.649351,
618
+ 0.649351,
619
+ 0.649351,
620
+ 0.649351,
621
+ 0.649351,
622
+ 0.649351,
623
+ 0.649351,
624
+ 0.649351,
625
+ 0.640693,
626
+ 0.649351,
627
+ 0.649351,
628
+ 0.649351,
629
+ 0.649351,
630
+ 0.649351,
631
+ 0.649351,
632
+ 0.649351,
633
+ 0.649351,
634
+ 0.649351,
635
+ 0.640693,
636
+ 0.640693,
637
+ 0.649351,
638
+ 0.649351,
639
+ 0.649351,
640
+ 0.649351,
641
+ 0.649351,
642
+ 0.649351,
643
+ 0.649351,
644
+ 0.649351,
645
+ 0.649351,
646
+ 0.649351,
647
+ 0.649351,
648
+ 0.649351,
649
+ 0.649351,
650
+ 0.649351,
651
+ 0.649351,
652
+ 0.649351,
653
+ 0.649351,
654
+ 0.649351,
655
+ 0.649351,
656
+ 0.649351,
657
+ 0.649351,
658
+ 0.649351,
659
+ 0.649351,
660
+ 0.649351,
661
+ 0.649351,
662
+ 0.649351,
663
+ 0.649351,
664
+ 0.649351,
665
+ 0.649351,
666
+ 0.649351,
667
+ 0.649351,
668
+ 0.649351,
669
+ 0.649351,
670
+ 0.649351,
671
+ 0.649351,
672
+ 0.649351,
673
+ 0.649351,
674
+ 0.649351,
675
+ 0.649351,
676
+ 0.649351,
677
+ 0.649351,
678
+ 0.649351,
679
+ 0.649351,
680
+ 0.649351,
681
+ 0.649351,
682
+ 0.649351,
683
+ 0.649351,
684
+ 0.649351,
685
+ 0.649351,
686
+ 0.649351,
687
+ 0.649351,
688
+ 0.649351,
689
+ 0.649351,
690
+ 0.649351,
691
+ 0.649351,
692
+ 0.649351,
693
+ 0.649351,
694
+ 0.649351,
695
+ 0.649351,
696
+ 0.649351,
697
+ 0.649351,
698
+ 0.649351,
699
+ 0.649351,
700
+ 0.649351,
701
+ 0.649351,
702
+ 0.649351,
703
+ 0.649351,
704
+ 0.649351,
705
+ 0.649351,
706
+ 0.649351,
707
+ 0.649351,
708
+ 0.649351,
709
+ 0.649351,
710
+ 0.649351,
711
+ 0.649351,
712
+ 0.649351,
713
+ 0.649351,
714
+ 0.649351,
715
+ 0.649351,
716
+ 0.649351,
717
+ 0.649351,
718
+ 0.649351,
719
+ 0.649351,
720
+ 0.649351,
721
+ 0.649351,
722
+ 0.649351,
723
+ 0.649351,
724
+ 0.649351,
725
+ 0.649351,
726
+ 0.649351,
727
+ 0.649351,
728
+ 0.649351,
729
+ 0.649351,
730
+ 0.649351,
731
+ 0.649351,
732
+ 0.649351,
733
+ 0.649351,
734
+ 0.649351,
735
+ 0.649351,
736
+ 0.649351,
737
+ 0.649351,
738
+ 0.649351,
739
+ 0.649351,
740
+ 0.649351,
741
+ 0.649351,
742
+ 0.649351,
743
+ 0.649351,
744
+ 0.649351,
745
+ 0.649351,
746
+ 0.649351,
747
+ 0.649351,
748
+ 0.649351,
749
+ 0.649351,
750
+ 0.649351,
751
+ 0.649351,
752
+ 0.649351,
753
+ 0.649351,
754
+ 0.649351,
755
+ 0.649351,
756
+ 0.649351,
757
+ 0.649351,
758
+ 0.649351,
759
+ 0.649351,
760
+ 0.649351,
761
+ 0.649351,
762
+ 0.649351,
763
+ 0.649351,
764
+ 0.649351,
765
+ 0.649351,
766
+ 0.649351,
767
+ 0.649351,
768
+ 0.649351,
769
+ 0.649351,
770
+ 0.649351,
771
+ 0.649351,
772
+ 0.649351,
773
+ 0.649351,
774
+ 0.649351,
775
+ 0.649351,
776
+ 0.649351,
777
+ 0.649351,
778
+ 0.649351,
779
+ 0.649351,
780
+ 0.649351,
781
+ 0.649351,
782
+ 0.649351,
783
+ 0.649351,
784
+ 0.649351,
785
+ 0.649351,
786
+ 0.649351,
787
+ 0.649351,
788
+ 0.649351,
789
+ 0.649351,
790
+ 0.649351,
791
+ 0.649351,
792
+ 0.649351,
793
+ 0.649351,
794
+ 0.649351,
795
+ 0.649351,
796
+ 0.649351,
797
+ 0.649351,
798
+ 0.649351,
799
+ 0.649351,
800
+ 0.649351,
801
+ 0.649351,
802
+ 0.649351,
803
+ 0.649351,
804
+ 0.649351,
805
+ 0.649351,
806
+ 0.649351,
807
+ 0.649351,
808
+ 0.649351
809
+ ],
810
+ "best_epoch": 1,
811
+ "best_val_acc": 0.701299
812
+ }
project/trains/treino_lr_alto/model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c3abc463b6ba37bc3802cf40d63dec1789eb00f577810581a652931840102db
3
+ size 6269
project/trains/treino_lr_alto/predict/predict_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "predicted_at": "2025-05-12T08:30:00Z",
3
+ "source": "arquivo_externo",
4
+ "input_file": "raw_data.xlsx"
5
+ }
project/trains/treino_lr_alto/predict/predict_result.json ADDED
@@ -0,0 +1,492 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "index": 0,
4
+ "pred_idx": 0,
5
+ "pred_label": "0"
6
+ },
7
+ {
8
+ "index": 1,
9
+ "pred_idx": 0,
10
+ "pred_label": "0"
11
+ },
12
+ {
13
+ "index": 2,
14
+ "pred_idx": 0,
15
+ "pred_label": "0"
16
+ },
17
+ {
18
+ "index": 3,
19
+ "pred_idx": 0,
20
+ "pred_label": "0"
21
+ },
22
+ {
23
+ "index": 4,
24
+ "pred_idx": 0,
25
+ "pred_label": "0"
26
+ },
27
+ {
28
+ "index": 5,
29
+ "pred_idx": 0,
30
+ "pred_label": "0"
31
+ },
32
+ {
33
+ "index": 6,
34
+ "pred_idx": 0,
35
+ "pred_label": "0"
36
+ },
37
+ {
38
+ "index": 7,
39
+ "pred_idx": 0,
40
+ "pred_label": "0"
41
+ },
42
+ {
43
+ "index": 8,
44
+ "pred_idx": 0,
45
+ "pred_label": "0"
46
+ },
47
+ {
48
+ "index": 9,
49
+ "pred_idx": 0,
50
+ "pred_label": "0"
51
+ },
52
+ {
53
+ "index": 10,
54
+ "pred_idx": 0,
55
+ "pred_label": "0"
56
+ },
57
+ {
58
+ "index": 11,
59
+ "pred_idx": 0,
60
+ "pred_label": "0"
61
+ },
62
+ {
63
+ "index": 12,
64
+ "pred_idx": 0,
65
+ "pred_label": "0"
66
+ },
67
+ {
68
+ "index": 13,
69
+ "pred_idx": 0,
70
+ "pred_label": "0"
71
+ },
72
+ {
73
+ "index": 14,
74
+ "pred_idx": 0,
75
+ "pred_label": "0"
76
+ },
77
+ {
78
+ "index": 15,
79
+ "pred_idx": 0,
80
+ "pred_label": "0"
81
+ },
82
+ {
83
+ "index": 16,
84
+ "pred_idx": 0,
85
+ "pred_label": "0"
86
+ },
87
+ {
88
+ "index": 17,
89
+ "pred_idx": 0,
90
+ "pred_label": "0"
91
+ },
92
+ {
93
+ "index": 18,
94
+ "pred_idx": 0,
95
+ "pred_label": "0"
96
+ },
97
+ {
98
+ "index": 19,
99
+ "pred_idx": 0,
100
+ "pred_label": "0"
101
+ },
102
+ {
103
+ "index": 20,
104
+ "pred_idx": 0,
105
+ "pred_label": "0"
106
+ },
107
+ {
108
+ "index": 21,
109
+ "pred_idx": 0,
110
+ "pred_label": "0"
111
+ },
112
+ {
113
+ "index": 22,
114
+ "pred_idx": 0,
115
+ "pred_label": "0"
116
+ },
117
+ {
118
+ "index": 23,
119
+ "pred_idx": 0,
120
+ "pred_label": "0"
121
+ },
122
+ {
123
+ "index": 24,
124
+ "pred_idx": 0,
125
+ "pred_label": "0"
126
+ },
127
+ {
128
+ "index": 25,
129
+ "pred_idx": 0,
130
+ "pred_label": "0"
131
+ },
132
+ {
133
+ "index": 26,
134
+ "pred_idx": 0,
135
+ "pred_label": "0"
136
+ },
137
+ {
138
+ "index": 27,
139
+ "pred_idx": 0,
140
+ "pred_label": "0"
141
+ },
142
+ {
143
+ "index": 28,
144
+ "pred_idx": 0,
145
+ "pred_label": "0"
146
+ },
147
+ {
148
+ "index": 29,
149
+ "pred_idx": 0,
150
+ "pred_label": "0"
151
+ },
152
+ {
153
+ "index": 30,
154
+ "pred_idx": 0,
155
+ "pred_label": "0"
156
+ },
157
+ {
158
+ "index": 31,
159
+ "pred_idx": 0,
160
+ "pred_label": "0"
161
+ },
162
+ {
163
+ "index": 32,
164
+ "pred_idx": 0,
165
+ "pred_label": "0"
166
+ },
167
+ {
168
+ "index": 33,
169
+ "pred_idx": 0,
170
+ "pred_label": "0"
171
+ },
172
+ {
173
+ "index": 34,
174
+ "pred_idx": 0,
175
+ "pred_label": "0"
176
+ },
177
+ {
178
+ "index": 35,
179
+ "pred_idx": 0,
180
+ "pred_label": "0"
181
+ },
182
+ {
183
+ "index": 36,
184
+ "pred_idx": 0,
185
+ "pred_label": "0"
186
+ },
187
+ {
188
+ "index": 37,
189
+ "pred_idx": 0,
190
+ "pred_label": "0"
191
+ },
192
+ {
193
+ "index": 38,
194
+ "pred_idx": 0,
195
+ "pred_label": "0"
196
+ },
197
+ {
198
+ "index": 39,
199
+ "pred_idx": 0,
200
+ "pred_label": "0"
201
+ },
202
+ {
203
+ "index": 40,
204
+ "pred_idx": 0,
205
+ "pred_label": "0"
206
+ },
207
+ {
208
+ "index": 41,
209
+ "pred_idx": 0,
210
+ "pred_label": "0"
211
+ },
212
+ {
213
+ "index": 42,
214
+ "pred_idx": 0,
215
+ "pred_label": "0"
216
+ },
217
+ {
218
+ "index": 43,
219
+ "pred_idx": 0,
220
+ "pred_label": "0"
221
+ },
222
+ {
223
+ "index": 44,
224
+ "pred_idx": 0,
225
+ "pred_label": "0"
226
+ },
227
+ {
228
+ "index": 45,
229
+ "pred_idx": 0,
230
+ "pred_label": "0"
231
+ },
232
+ {
233
+ "index": 46,
234
+ "pred_idx": 0,
235
+ "pred_label": "0"
236
+ },
237
+ {
238
+ "index": 47,
239
+ "pred_idx": 0,
240
+ "pred_label": "0"
241
+ },
242
+ {
243
+ "index": 48,
244
+ "pred_idx": 0,
245
+ "pred_label": "0"
246
+ },
247
+ {
248
+ "index": 49,
249
+ "pred_idx": 0,
250
+ "pred_label": "0"
251
+ },
252
+ {
253
+ "index": 50,
254
+ "pred_idx": 0,
255
+ "pred_label": "0"
256
+ },
257
+ {
258
+ "index": 51,
259
+ "pred_idx": 0,
260
+ "pred_label": "0"
261
+ },
262
+ {
263
+ "index": 52,
264
+ "pred_idx": 0,
265
+ "pred_label": "0"
266
+ },
267
+ {
268
+ "index": 53,
269
+ "pred_idx": 0,
270
+ "pred_label": "0"
271
+ },
272
+ {
273
+ "index": 54,
274
+ "pred_idx": 0,
275
+ "pred_label": "0"
276
+ },
277
+ {
278
+ "index": 55,
279
+ "pred_idx": 0,
280
+ "pred_label": "0"
281
+ },
282
+ {
283
+ "index": 56,
284
+ "pred_idx": 0,
285
+ "pred_label": "0"
286
+ },
287
+ {
288
+ "index": 57,
289
+ "pred_idx": 0,
290
+ "pred_label": "0"
291
+ },
292
+ {
293
+ "index": 58,
294
+ "pred_idx": 0,
295
+ "pred_label": "0"
296
+ },
297
+ {
298
+ "index": 59,
299
+ "pred_idx": 0,
300
+ "pred_label": "0"
301
+ },
302
+ {
303
+ "index": 60,
304
+ "pred_idx": 0,
305
+ "pred_label": "0"
306
+ },
307
+ {
308
+ "index": 61,
309
+ "pred_idx": 0,
310
+ "pred_label": "0"
311
+ },
312
+ {
313
+ "index": 62,
314
+ "pred_idx": 0,
315
+ "pred_label": "0"
316
+ },
317
+ {
318
+ "index": 63,
319
+ "pred_idx": 0,
320
+ "pred_label": "0"
321
+ },
322
+ {
323
+ "index": 64,
324
+ "pred_idx": 0,
325
+ "pred_label": "0"
326
+ },
327
+ {
328
+ "index": 65,
329
+ "pred_idx": 0,
330
+ "pred_label": "0"
331
+ },
332
+ {
333
+ "index": 66,
334
+ "pred_idx": 0,
335
+ "pred_label": "0"
336
+ },
337
+ {
338
+ "index": 67,
339
+ "pred_idx": 0,
340
+ "pred_label": "0"
341
+ },
342
+ {
343
+ "index": 68,
344
+ "pred_idx": 0,
345
+ "pred_label": "0"
346
+ },
347
+ {
348
+ "index": 69,
349
+ "pred_idx": 0,
350
+ "pred_label": "0"
351
+ },
352
+ {
353
+ "index": 70,
354
+ "pred_idx": 0,
355
+ "pred_label": "0"
356
+ },
357
+ {
358
+ "index": 71,
359
+ "pred_idx": 0,
360
+ "pred_label": "0"
361
+ },
362
+ {
363
+ "index": 72,
364
+ "pred_idx": 0,
365
+ "pred_label": "0"
366
+ },
367
+ {
368
+ "index": 73,
369
+ "pred_idx": 0,
370
+ "pred_label": "0"
371
+ },
372
+ {
373
+ "index": 74,
374
+ "pred_idx": 0,
375
+ "pred_label": "0"
376
+ },
377
+ {
378
+ "index": 75,
379
+ "pred_idx": 0,
380
+ "pred_label": "0"
381
+ },
382
+ {
383
+ "index": 76,
384
+ "pred_idx": 0,
385
+ "pred_label": "0"
386
+ },
387
+ {
388
+ "index": 77,
389
+ "pred_idx": 0,
390
+ "pred_label": "0"
391
+ },
392
+ {
393
+ "index": 78,
394
+ "pred_idx": 0,
395
+ "pred_label": "0"
396
+ },
397
+ {
398
+ "index": 79,
399
+ "pred_idx": 0,
400
+ "pred_label": "0"
401
+ },
402
+ {
403
+ "index": 80,
404
+ "pred_idx": 0,
405
+ "pred_label": "0"
406
+ },
407
+ {
408
+ "index": 81,
409
+ "pred_idx": 0,
410
+ "pred_label": "0"
411
+ },
412
+ {
413
+ "index": 82,
414
+ "pred_idx": 0,
415
+ "pred_label": "0"
416
+ },
417
+ {
418
+ "index": 83,
419
+ "pred_idx": 0,
420
+ "pred_label": "0"
421
+ },
422
+ {
423
+ "index": 84,
424
+ "pred_idx": 0,
425
+ "pred_label": "0"
426
+ },
427
+ {
428
+ "index": 85,
429
+ "pred_idx": 0,
430
+ "pred_label": "0"
431
+ },
432
+ {
433
+ "index": 86,
434
+ "pred_idx": 0,
435
+ "pred_label": "0"
436
+ },
437
+ {
438
+ "index": 87,
439
+ "pred_idx": 0,
440
+ "pred_label": "0"
441
+ },
442
+ {
443
+ "index": 88,
444
+ "pred_idx": 0,
445
+ "pred_label": "0"
446
+ },
447
+ {
448
+ "index": 89,
449
+ "pred_idx": 0,
450
+ "pred_label": "0"
451
+ },
452
+ {
453
+ "index": 90,
454
+ "pred_idx": 0,
455
+ "pred_label": "0"
456
+ },
457
+ {
458
+ "index": 91,
459
+ "pred_idx": 0,
460
+ "pred_label": "0"
461
+ },
462
+ {
463
+ "index": 92,
464
+ "pred_idx": 0,
465
+ "pred_label": "0"
466
+ },
467
+ {
468
+ "index": 93,
469
+ "pred_idx": 0,
470
+ "pred_label": "0"
471
+ },
472
+ {
473
+ "index": 94,
474
+ "pred_idx": 0,
475
+ "pred_label": "0"
476
+ },
477
+ {
478
+ "index": 95,
479
+ "pred_idx": 0,
480
+ "pred_label": "0"
481
+ },
482
+ {
483
+ "index": 96,
484
+ "pred_idx": 0,
485
+ "pred_label": "0"
486
+ },
487
+ {
488
+ "index": 97,
489
+ "pred_idx": 0,
490
+ "pred_label": "0"
491
+ }
492
+ ]
project/trains/treino_lr_alto/predict/raw_data.xlsx ADDED
Binary file (15.5 kB). View file
 
project/trains/treino_lr_alto/predict/raw_data_predito.xlsx ADDED
Binary file (9.1 kB). View file
 
project/trains/treino_lr_alto/test/acuracia.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "accuracy": 0.649351,
3
+ "n": 231
4
+ }
project/trains/treino_lr_alto/test/matriz_confusao.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "classes": [
3
+ "0",
4
+ "1"
5
+ ],
6
+ "matrix": [
7
+ [
8
+ 150,
9
+ 0
10
+ ],
11
+ [
12
+ 81,
13
+ 0
14
+ ]
15
+ ],
16
+ "description": "linha=real, coluna=predito"
17
+ }
project/trains/treino_lr_alto/test/precisao.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "per_class": [
3
+ {
4
+ "class": "0",
5
+ "precision": 0.649351,
6
+ "recall": 1.0,
7
+ "f1_score": 0.787402,
8
+ "support": 150
9
+ },
10
+ {
11
+ "class": "1",
12
+ "precision": 0.0,
13
+ "recall": 0.0,
14
+ "f1_score": 0.0,
15
+ "support": 81
16
+ }
17
+ ],
18
+ "macro_avg": {
19
+ "precision": 0.324675,
20
+ "recall": 0.5,
21
+ "f1_score": 0.393701
22
+ }
23
+ }
project/trains/treino_lr_alto/train_result.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "concluido",
3
+ "epochs_run": 200,
4
+ "best_epoch": 1,
5
+ "train_loss": 0.646786,
6
+ "val_loss": 0.647929,
7
+ "val_accuracy": 0.701299,
8
+ "started_at": "2026-05-19T23:48:38Z",
9
+ "finished_at": "2026-05-19T23:48:49Z",
10
+ "duration_seconds": 11
11
+ }