Exemple #1
0
        public void AnalyzeTest()
        {
            // dataSet is null
            {
                string parameterName = "dataSet";

                ArgumentExceptionAssert.Throw(
                    () =>
                {
                    MultipleCorrespondence.Analyze(
                        null);
                },
                    expectedType: typeof(ArgumentNullException),
                    expectedPartialMessage:
                    ArgumentExceptionAssert.NullPartialMessage,
                    expectedParameterName: parameterName);
            }

            // dataSet must have positive marginal column sums
            {
                var STR_EXCEPT_GDA_MCA_NON_POSITIVE_MARGINAL_SUMS =
                    ImplementationServices.GetResourceString(
                        "STR_EXCEPT_GDA_MCA_NON_POSITIVE_MARGINAL_SUMS");

                string parameterName = "dataSet";

                CategoricalVariable color = new("COLOR")
                {
                    { 0, "Red" },
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="TestableMultipleCorrespondence00" /> class.
 /// </summary>
 TestableMultipleCorrespondence00() : base(
         multipleCorrespondence: MultipleCorrespondence.Analyze(
             dataSet),
         individuals: TestableIndividuals00.Get(),
         categories: TestableCategories00.Get()
         )
 {
 }
Exemple #3
0
 /// <summary>Initializes a new instance of the
 /// <see cref="TestableMultipleCorrespondence"/>
 /// class.</summary>
 /// <param name="multipleCorrespondence">
 /// The multiple correspondence to test.</param>
 /// <param name="individuals">The expected individuals.</param>
 /// <param name="categories">The expected categories.</param>
 public TestableMultipleCorrespondence(
     MultipleCorrespondence multipleCorrespondence,
     TestablePrincipalProjections individuals,
     TestablePrincipalProjections categories
     )
 {
     this.MultipleCorrespondence = multipleCorrespondence;
     this.Individuals            = individuals;
     this.Categories             = categories;
 }