#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import os
import os.path

import packager.behavior
import packager.taint
import model.prediction_model


class Core(object):
    def __init__(self):
        logger = logging.getLogger()
        self.predict_model = model.prediction_model.PredictionModel()

    def train(self, groups):
        self.predict_model.train(groups)




    def save(self, directory=None):
        if not directory:
            self.predict_model.save()
        else:
            if not os.path.exists(directory):
                os.makedirs(directory)
            self.predict_model.save(feature_model_directory=os.path.join(directory, "feature"))
        return self
