<reponame>TgithubJ/h1st<gh_stars>0
from typing import Any, Dict

from h1st_ml import MLModel


class MyMLModel(MLModel):
    def preprocess(self, data: Dict[str, Any]) -> Dict[str, Any]:
        raw_data = data['X']
        return {
            'X': self.scaler.transform(raw_data)
        }
    
    def predict(self, data: Dict[str, Any]) -> Dict[str, Any]:
        preprocess_data = self.preprocess(data)
        y = self.base_model.predict(preprocess_data['X'])
        return {'species': [self.targets[item] for item in y]}
from typing import Any, Dict

from h1st_ml import MLModel


class MyMLModel(MLModel):
    def preprocess(self, data: Dict[str, Any]) -> Dict[str, Any]:
        raw_data = data['X']
        return {
            'X': self.scaler.transform(raw_data)
        }
    
    def predict(self, data: Dict[str, Any]) -> Dict[str, Any]:
        preprocess_data = self.preprocess(data)
        y = self.base_model.predict(preprocess_data['X'])
        return {'species': [self.targets[item] for item in y]}