Exemple #1
0
        public static Type loadFromFile(string fileName, out ModelParent model)
        {
            model = (ModelParent)TMySerializable.DeserializeFrom(fileName, typeof(ModelParent));
            if (model != null && ((ModelParent)model).ApproachName == typeof(ModelParent).ToString()) return typeof(ModelParent);

            model = (LeastSquaresModel)TMySerializable.DeserializeFrom(fileName, typeof(LeastSquaresModel));
            if (model != null && ((ModelParent)model).ApproachName == typeof(LeastSquaresModel).ToString()) return typeof(LeastSquaresModel);

            model = (LeastSquaresModel_MinMax)TMySerializable.DeserializeFrom(fileName, typeof(LeastSquaresModel_MinMax));
            if (model != null && ((ModelParent)model).ApproachName == typeof(LeastSquaresModel_MinMax).ToString()) return typeof(LeastSquaresModel_MinMax);

            model = (KNNModel)TMySerializable.DeserializeFrom(fileName, typeof(KNNModel));
            if (model != null && ((ModelParent)model).ApproachName == typeof(KNNModel).ToString()) return typeof(KNNModel);

            return null;
        }
Exemple #2
0
 public static void saveToFile(string fileName, ModelParent model)
 {
     model.SerializeTo(fileName);
 }
 public ParentAdapterFeatureConnector(FeatureManager manager)
     : base(manager)
 {
     ModelParent.GetImplementation(this.Context).FeatureManager = this.Manager;
 }