public AssociationRulesMining(WorkSpace workspace, TypeOfPreferrence typeOfPreferrence, float minSupportLevel, bool useVariantSupport)
        {
            _workspace                 = workspace;
            _typeOfPreferrence         = typeOfPreferrence;
            _minSupportLevelPercentage = minSupportLevel;
            minSupportLevel            = minSupportLevel / 100;
            _minSupportLevel           = minSupportLevel * _workspace.SubjectsHash[_workspace.SelectedSubject].PeptideDataTable.Rows.Count;
            _useVariantSupport         = useVariantSupport;

            armArg = new AssociationRulesMiningProgressArg();

            if (typeOfPreferrence == TypeOfPreferrence.Both_PositiveAndNegativePreferrence)
            {
                _lstOfPreferredSites = _workspace.PreferrenceEstimationResultSet.BothPositivelyAndNegativelyPreferredSites;
            }
            else
            if (typeOfPreferrence == TypeOfPreferrence.PositivePreferrence)
            {
                _lstOfPreferredSites = _workspace.PreferrenceEstimationResultSet.PositivelyPreferredSites;
            }
            else
            if (typeOfPreferrence == TypeOfPreferrence.NegativePreferrence)
            {
                _lstOfPreferredSites = _workspace.PreferrenceEstimationResultSet.NegativelyPreferredSites;
            }
        }
Пример #2
0
 private void OnAssociationRuleMiningProgress(object sender, EventArgs e)
 {
     progressStatus     = ((AssociationRulesMiningProgressArg)e);
     lblGeneration.Text = progressStatus.GenerationNo.ToString();
     lblStatus.Text     = progressStatus.status + ": " + progressStatus.Progress.ToString();
     armProgress.Value  = (int)progressStatus.Progress;
     genProgress.Value  = (int)progressStatus.Progress;
     Text = progressStatus.TargetOfStudy;
     Application.DoEvents();
 }