public void btnBuildEstimate_Click(IRibbonControl e) { //check if "Correlation" sheet exists & create if not. Otherwise just grab it. EstimateSheet estimateSheet = ThisAddIn.Model.EstimateSheets[0]; CorrelationSheet correlSheet = ThisAddIn.Model.correlationSheet; correlSheet.ClearSheet(); var estimate = new Estimate(estimateSheet, correlSheet, 10); correlSheet.CorrelationMatrix = estimate.CorrelMatrix; MessageBox.Show($"Transitivity test: {correlSheet.CheckTransitivity()}"); correlSheet.PrintCorrelationMatrix(); }
//private double[] new_eigenvalues { get; set; } public CorrelationMatrix(Estimate Parent) { this.Parent = Parent; Correlations = GetCorrelationMatrix(); foreach (Correlation correl in Correlations) { correl.CalculateTransitivity(); } eigenvalues = GetEigenvalues(GetCoefficientsMatrix()); if (eigenvalues.Min() < 0) { AdjustToPositiveSemiDefinite(); } }