ImsInformed.Filters.TrackFilter.IsLowR2 C# (CSharp) Method

IsLowR2() public method

The is low r 2.
public IsLowR2 ( double r2, double r2Threshold = 0.9 ) : bool
r2 double /// The r 2. ///
r2Threshold double /// The r 2 threshold. ///
return bool
        public bool IsLowR2(double r2, double r2Threshold = 0.9)
        {
            return r2 < r2Threshold;
        }

Usage Example

        /// <summary>
        /// The conclude status.
        /// </summary>
        /// <param name="minFitPoints">
        /// The min fit points.
        /// </param>
        /// <param name="minR2">
        /// The min r 2.
        /// </param>
        /// <returns>
        /// The <see cref="AnalysisStatus"/>.
        /// </returns>
        private AnalysisStatus ConcludeStatus(int minFitPoints, double minR2)
        {
            TrackFilter filter = new TrackFilter();
            bool lowFitPoints = filter.FilterLowFitPointNumber(this.ObservedPeaks.Count(), minFitPoints);
            bool lowR2 = filter.IsLowR2(this.mobilityInfo.RSquared, minR2);

            return lowFitPoints ? AnalysisStatus.NotSufficientPoints :
                lowR2 ? AnalysisStatus.Rejected : AnalysisStatus.Positive;
        }