mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-07 09:58:51 -06:00
Move feature classes to features.py
This commit is contained in:
@@ -7,7 +7,8 @@ from typing import Any, List, TYPE_CHECKING, Tuple, Dict, Hashable
|
||||
import numpy as np
|
||||
|
||||
from miplearn.instance import Instance
|
||||
from miplearn.types import LearningSolveStats, TrainingSample, Features
|
||||
from miplearn.types import LearningSolveStats
|
||||
from miplearn.features import TrainingSample, Features
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from miplearn.solvers.learning import LearningSolver
|
||||
@@ -49,7 +50,7 @@ class Component:
|
||||
their own statistics here. For example, PrimalSolutionComponent adds
|
||||
statistics regarding the number of predicted variables. All statistics in
|
||||
this dictionary are exported to the benchmark CSV file.
|
||||
features: Features
|
||||
features: miplearn.features.Features
|
||||
Features describing the model.
|
||||
training_data: TrainingSample
|
||||
A dictionary containing data that may be useful for training machine
|
||||
|
||||
@@ -11,7 +11,8 @@ from miplearn import Classifier
|
||||
from miplearn.classifiers.counting import CountingClassifier
|
||||
from miplearn.classifiers.threshold import MinProbabilityThreshold, Threshold
|
||||
from miplearn.components.component import Component
|
||||
from miplearn.types import TrainingSample, Features, LearningSolveStats
|
||||
from miplearn.types import LearningSolveStats
|
||||
from miplearn.features import TrainingSample, Features
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ from miplearn.classifiers import Regressor
|
||||
from miplearn.classifiers.sklearn import ScikitLearnRegressor
|
||||
from miplearn.components.component import Component
|
||||
from miplearn.instance import Instance
|
||||
from miplearn.types import TrainingSample, LearningSolveStats, Features
|
||||
from miplearn.types import LearningSolveStats
|
||||
from miplearn.features import TrainingSample, Features
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from miplearn.solvers.learning import LearningSolver
|
||||
|
||||
@@ -22,11 +22,10 @@ from miplearn.components import classifier_evaluation_dict
|
||||
from miplearn.components.component import Component
|
||||
from miplearn.instance import Instance
|
||||
from miplearn.types import (
|
||||
TrainingSample,
|
||||
Solution,
|
||||
LearningSolveStats,
|
||||
Features,
|
||||
)
|
||||
from miplearn.features import TrainingSample, Features
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user