Пример #1
0
        private void BindDataSource()
        {
            List <List <String> > Datasource = new List <List <String> >();

            LinearRegression outputData = new LinearRegression();
            String           path       = Request.PhysicalPath;

            Datasource = outputData.list(path);
            this.FlatGrid.DataSource = Datasource;
            this.FlatGrid.DataBind();
            Model  data       = new Model();
            String pmmlPath   = string.Format("{0}{1}.pmml", path + "../../../Models/LinearRegressionModel/", "lpsa");
            String sourcePath = string.Format("{0}{1}.aspx.cs", path + "../../../LinearRegressionModel/", "Default");
            String sparkPath  = string.Format("{0}{1}.scala", path + "../../../Models/LinearRegressionModel/", "Spark");

            data.setPath(pmmlPath, sourcePath, sparkPath);
            string PMMLconv = data.PMML.Replace("<", "&lt");

            Literal3.Text = PMMLconv;
            JavaScriptSerializer js = new JavaScriptSerializer();

            Session["source"] = js.Serialize(data.Source).Replace("\"", "^");
            Session["spark"]  = js.Serialize(data.Spark).Replace("\"", "^");
        }