mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-08 02:18:51 -06:00
Reorganize imports; start moving data to instance.training_data
This commit is contained in:
@@ -5,10 +5,12 @@
|
||||
import gzip
|
||||
import json
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any
|
||||
from typing import Any, List
|
||||
|
||||
import numpy as np
|
||||
|
||||
from miplearn.types import TrainingSample
|
||||
|
||||
|
||||
class Instance(ABC):
|
||||
"""
|
||||
@@ -20,6 +22,9 @@ class Instance(ABC):
|
||||
into arrays of features, which can be provided as inputs to machine learning models.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.training_data: List[TrainingSample] = []
|
||||
|
||||
@abstractmethod
|
||||
def to_model(self) -> Any:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user