package com.tzld.piaoquan.recommend.server.service.score.model;


import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Map;

public abstract class Model {
    protected Map<String, Object> params;

    public abstract int getModelSize();

    public abstract boolean loadFromStream(InputStreamReader in) throws Exception;

    public boolean loadFromStream(InputStream is) throws Exception {
        return loadFromStream(new InputStreamReader(is));
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;

    }
}

