Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 0e7b6b11

Přidáno uživatelem Roman Kalivoda před téměř 4 roky(ů)

Re #9049 Implementation of GetDataFileNames and Load methods

Zobrazit rozdíly:

Server/ServerApp/Predictor/NaiveBayesClassifier.cs
39 39
            _mlContext = new MLContext();
40 40
        }
41 41

  
42
        public NaiveBayesClassifier(string filename) : this()
43
        {
44
            DataViewSchema modelSchema;
45
            this._trainedModel = _mlContext.Model.Load(filename, out modelSchema);
46
            // TODO check if the loaded model has valid input and output schema
47
            this._predictionEngine = _mlContext.Model.CreatePredictionEngine<ModelInput, ModelOutput>(this._trainedModel);
48
        }
49

  
42 50
        public void Fit(IEnumerable<ModelInput> trainInput)
43 51
        {
44 52
            this._trainingDataView = _mlContext.Data.LoadFromEnumerable(trainInput);

Také k dispozici: Unified diff