當前位置: 首頁>>代碼示例>>C#>>正文


C# Altaxo.ContainsDataColumn方法代碼示例

本文整理匯總了C#中Altaxo.ContainsDataColumn方法的典型用法代碼示例。如果您正苦於以下問題:C# Altaxo.ContainsDataColumn方法的具體用法?C# Altaxo.ContainsDataColumn怎麽用?C# Altaxo.ContainsDataColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Altaxo的用法示例。


在下文中一共展示了Altaxo.ContainsDataColumn方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PlotCrossPredictedVersusActualY

		/// <summary>
		/// Plots the cross predicted versus actual Y (concentration) into a provided layer.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		/// <param name="layer">The layer to plot into.</param>
		/// <param name="whichY">The number of the component (y, concentration etc.) for which to plot the residuals.</param>
		/// <param name="numberOfFactors">The number of factors used for calculation of the residuals.</param>
		public static void PlotCrossPredictedVersusActualY(Altaxo.Data.DataTable table, XYPlotLayer layer, int whichY, int numberOfFactors)
		{
			string ypredcolname = WorksheetAnalysis.GetYCrossPredicted_ColumnName(whichY, numberOfFactors);
			string yactcolname = WorksheetAnalysis.GetYOriginal_ColumnName(whichY);
			if (!table.ContainsDataColumn(ypredcolname))
			{
				GetAnalysis(table).CalculateCrossPredictedAndResidual(table, whichY, numberOfFactors, true, false, false);
			}

			PlotOnlyLabel(layer, table, table[yactcolname], table[ypredcolname], table[WorksheetAnalysis.GetMeasurementLabel_ColumnName()]);

			layer.DefaultXAxisTitleString = string.Format("Y original{0}", whichY);
			layer.DefaultYAxisTitleString = string.Format("Y cross predicted{0} (#factors:{1})", whichY, numberOfFactors);
		}
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:21,代碼來源:ChemometricCommands.cs

示例2: PlotPredictionScores

		/// <summary>
		/// Plots all preprocessed spectra into a newly created graph.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		public static void PlotPredictionScores(Altaxo.Data.DataTable table)
		{
			MultivariateContentMemento plsMemo = table.GetTableProperty("Content") as MultivariateContentMemento;
			if (plsMemo == null)
				return;
			if (plsMemo.PreferredNumberOfFactors <= 0)
				QuestPreferredNumberOfFactors(plsMemo);

			GetAnalysis(table).CalculateAndStorePredictionScores(table, plsMemo.PreferredNumberOfFactors);

			AscendingIntegerCollection sel = new AscendingIntegerCollection();

			for (int i = 0; i < plsMemo.NumberOfConcentrationData; i++)
			{
				string name = WorksheetAnalysis.GetPredictionScore_ColumnName(i, plsMemo.PreferredNumberOfFactors);
				if (table.ContainsDataColumn(name))
					sel.Add(table.DataColumns.GetColumnNumber(table[name]));
			}

			string newName = string.Format("GPredScores#{0}F", plsMemo.PreferredNumberOfFactors);
			newName = Main.ProjectFolder.CreateFullName(table.Name, newName);
			Worksheet.Commands.PlotCommands.PlotLine(table, sel, true, false, newName);
		}
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:27,代碼來源:ChemometricCommands.cs

示例3: PlotXResiduals

		/// <summary>
		/// Plots the x (spectral) residuals into a provided layer.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		/// <param name="layer">The layer to plot into.</param>
		/// <param name="whichY">The number of the component (y, concentration etc.) for which to plot the residuals.</param>
		/// <param name="numberOfFactors">The number of factors used for calculation of the residuals.</param>
		public static void PlotXResiduals(Altaxo.Data.DataTable table, XYPlotLayer layer, int whichY, int numberOfFactors)
		{
			string xresidualcolname = WorksheetAnalysis.GetXResidual_ColumnName(whichY, numberOfFactors);
			string yactcolname = WorksheetAnalysis.GetYOriginal_ColumnName(whichY);

			if (!table.ContainsDataColumn(xresidualcolname))
			{
				GetAnalysis(table).CalculateXResidual(table, whichY, numberOfFactors);
			}

			PlotOnlyLabel(layer, table, table[yactcolname], table[xresidualcolname], table[WorksheetAnalysis.GetMeasurementLabel_ColumnName()]);

			layer.DefaultXAxisTitleString = string.Format("Y original{0}", whichY);
			layer.DefaultYAxisTitleString = string.Format("X residual{0} (#factors:{1})", whichY, numberOfFactors);
		}
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:22,代碼來源:ChemometricCommands.cs

示例4: PlotXLeverage

		/// <summary>
		/// Plots the x (spectral) leverage into a provided layer.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		/// <param name="layer">The layer to plot into.</param>
		/// <param name="preferredNumberOfFactors">The number of factors used for leverage calculation.</param>
		public static void PlotXLeverage(Altaxo.Data.DataTable table, XYPlotLayer layer, int preferredNumberOfFactors)
		{
			string xcolname = WorksheetAnalysis.GetMeasurementLabel_ColumnName();
			string ycolname = WorksheetAnalysis.GetXLeverage_ColumnName(preferredNumberOfFactors);

			if (!table.ContainsDataColumn(ycolname))
			{
				GetAnalysis(table).CalculateXLeverage(table, preferredNumberOfFactors);
			}

			PlotOnlyLabel(layer, table, table[xcolname], table[ycolname], table[WorksheetAnalysis.GetMeasurementLabel_ColumnName()]);

			layer.DefaultXAxisTitleString = string.Format("Measurement");
			layer.DefaultYAxisTitleString = string.Format("Score leverage (#factors:{0})", preferredNumberOfFactors);
		}
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:21,代碼來源:ChemometricCommands.cs


注:本文中的Altaxo.ContainsDataColumn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。