<commit_before>package org.mwc.debrief.track_shift.ambiguity;

import java.awt.Color;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;

import org.apache.commons.math3.fitting.PolynomialCurveFitter;
import org.apache.commons.math3.fitting.WeightedObservedPoint;
import org.apache.commons.math3.fitting.WeightedObservedPoints;
import org.jfree.data.time.FixedMillisecond;
import org.jfree.data.time.TimeSeries;
import org.mwc.debrief.track_shift.controls.ZoneChart.ColorProvider;
import org.mwc.debrief.track_shift.controls.ZoneChart.Zone;
import org.mwc.debrief.track_shift.views.StackedDotHelper;

import Debrief.ReaderWriter.Replay.ImportReplay;
import Debrief.Wrappers.FixWrapper;
import Debrief.Wrappers.SensorContactWrapper;
import Debrief.Wrappers.SensorWrapper;
import Debrief.Wrappers.TrackWrapper;
import MWC.GUI.BaseLayer;
import MWC.GUI.Editable;
import MWC.GUI.Layers;
import MWC.GUI.JFreeChart.ColouredDataItem;
import MWC.GenericData.HiResDate;
import MWC.GenericData.TimePeriod;

public class AmbiguityResolver
{
  private static class LegOfCuts extends ArrayList<SensorContactWrapper>
  {

    /**
     * we use a weighting factor to reduce the influence of cuts in the first 1/4 of the leg - to
     * reduce the impact of the cuts while the array is steadying
     */
    private static final double EARLY_CUTS_WEIGHTING = 0.01d;

    /**
     * how many cuts to include in the min leg length
     * 
     */
    private static final int LEG_LENGTH = 8;

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private List<SensorContactWrapper> extractPortion(final WhichPeriod period)
    {<commit_msg>use the correct weighting for the first cuts<commit_after>package org.mwc.debrief.track_shift.ambiguity;

import java.awt.Color;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;

import org.apache.commons.math3.fitting.PolynomialCurveFitter;
import org.apache.commons.math3.fitting.WeightedObservedPoint;
import org.apache.commons.math3.fitting.WeightedObservedPoints;
import org.jfree.data.time.FixedMillisecond;
import org.jfree.data.time.TimeSeries;
import org.mwc.debrief.track_shift.controls.ZoneChart.ColorProvider;
import org.mwc.debrief.track_shift.controls.ZoneChart.Zone;
import org.mwc.debrief.track_shift.views.StackedDotHelper;

import Debrief.ReaderWriter.Replay.ImportReplay;
import Debrief.Wrappers.FixWrapper;
import Debrief.Wrappers.SensorContactWrapper;
import Debrief.Wrappers.SensorWrapper;
import Debrief.Wrappers.TrackWrapper;
import MWC.GUI.BaseLayer;
import MWC.GUI.Editable;
import MWC.GUI.Layers;
import MWC.GUI.JFreeChart.ColouredDataItem;
import MWC.GenericData.HiResDate;
import MWC.GenericData.TimePeriod;

public class AmbiguityResolver
{
  private static class LegOfCuts extends ArrayList<SensorContactWrapper>
  {

    /**
     * we use a weighting factor to reduce the influence of cuts in the first 1/4 of the leg - to
     * reduce the impact of the cuts while the array is steadying
     */
    private static final double EARLY_CUTS_WEIGHTING = 0.001d;

    /**
     * how many cuts to include in the min leg length
     * 
     */
    private static final int LEG_LENGTH = 8;

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private List<SensorContactWrapper> extractPortion(final WhichPeriod period)
    {
{'fraction_non_alphanumeric': 0.08420473307649973, 'fraction_numerical': 0.005778756191524491, 'mean_word_length': 4.541158536585366, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1378542', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1127, 'n_words': 263}