• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# core.Instances类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中weka.core.Instances的典型用法代码示例。如果您正苦于以下问题:C# Instances类的具体用法?C# Instances怎么用?C# Instances使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Instances类属于weka.core命名空间,在下文中一共展示了Instances类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Classify

        public static string Classify(bool useRubine, float duration, bool righthandedness, List<float> SpeakerAngles, PointCollection pointHist, StylusPointCollection S, List<List<int>> hist, List<List<int>> ihist)
        {
            // Convert all parameters to format used in GestureTests
            List<Vector2> InterpretedPoints = new List<Vector2>();
            List<Vector2> StylusPoints = new List<Vector2>();
            List<Vector2> VelocityHistory = new List<Vector2>();
            List<Vector2> InverseVelocityHistory = new List<Vector2>();
            foreach(Point P in pointHist)
                InterpretedPoints.Add(new Vector2((float)P.X,(float)P.Y));
            foreach(StylusPoint P in S)
                StylusPoints.Add(new Vector2((float)P.X,(float)P.Y));
            for (int i = 0; i < hist[0].Count; i++)
            {
                VelocityHistory.Add(new Vector2(hist[0][i], hist[1][i]));
                InverseVelocityHistory.Add(new Vector2(ihist[0][i], ihist[1][i]));
            }

            // Create a new Sample, compute the features, and classify
            GS = new GestureSample(GestureTests.Types.GestureType.unknown, righthandedness,duration,SpeakerAngles,InterpretedPoints,StylusPoints,VelocityHistory,InverseVelocityHistory);
            GS.ComputeFeatures(GestureFeatures.PointsStroke);

            if (useRubine)
                return EC.Recognizer.Classify(GS).ToString();
            WriteARFF();

            Instances test = new Instances(new java.io.FileReader("outfile.arff"));
            test.setClassIndex(0);

            double clsLabel = cls.classifyInstance(test.instance(0));
            test.instance(0).setClassValue(clsLabel);

            // Return the appropriate label
            return ((GestureType2D)((int)clsLabel+1)).ToString();
        }
开发者ID:ISUE,项目名称:Multiwave,代码行数:34,代码来源:WekaHelper.cs


示例2: EndTrainingSession

        public void EndTrainingSession()
        {
            Stream s = new MemoryStream ();
            TextWriter tw = new StreamWriter (s);
            AbstractBasicTextVector.WriteInstancesArff (tw, vectors, "c45recommender", tags, results);
            tw.Flush ();
            s.Position = 0;
            Instances source = new Instances (new InputStreamReader (new InputStreamWrapper (s)));
            tw.Close ();
            s.Close ();

            Instances[] derived = new Instances[this.not];
            classifiers = new AbstractClassifier[this.not];
            int[] args = new int[this.not - 1];
            int l = source.numAttributes () - this.not;
            for (int i = 0; i < this.not-1; i++) {
                args [i] = i + l + 1;
            }
            for (int i = 0; i < this.not; i++) {
                Remove rem = new Remove ();
                rem.setAttributeIndicesArray (args);
                rem.setInputFormat (source);
                derived [i] = Filter.useFilter (source, rem);
                classifiers [i] = GenerateClassifier ();
                derived [i].setClassIndex (derived [i].numAttributes () - 1);
                classifiers [i].buildClassifier (derived [i]);
                if (i < this.not - 1) {
                    args [i] = l + i;
                }
            }
            datasets = derived;
        }
开发者ID:KommuSoft,项目名称:MLTag,代码行数:32,代码来源:AbstractCustomVectorRecommender.cs


示例3: setInputFormat

		/// <summary> Sets the format of the input instances.
		/// 
		/// </summary>
		/// <param name="instanceInfo">an Instances object containing the input instance
		/// structure (any instances contained in the object are ignored - only the
		/// structure is required).
		/// </param>
		/// <returns> true if the outputFormat may be collected immediately
		/// </returns>
		/// <exception cref="Exception">if the inputFormat can't be set successfully 
		/// </exception>
		public override bool setInputFormat(Instances instanceInfo)
		{
			
			base.setInputFormat(instanceInfo);
			m_removeFilter = null;
			return false;
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:18,代码来源:RemoveUseless.cs


示例4: EvaluateIncrementalBatches

        public void EvaluateIncrementalBatches(int batchSize)
        {
            //Randomize Filter
            Randomize randomizeFilter = new Randomize();
            randomizeFilter.setInputFormat(this.data);

     

            //RemoveRange Filter

            //number of classes
            int numClasses = this.data.attribute(this.data.numAttributes() - 1).numValues();
            Instances[] classInstances = new Instances[numClasses];
            for (int i = 1; (i <= numClasses); i++)
            {
                //RemoveWithValues Filter
                RemoveWithValues removeValuesFilter = new RemoveWithValues();     
                removeValuesFilter.setInputFormat(this.data);
               // removeValuesFilter.set_AttributeIndex("last");
               // removeValuesFilter.
                removeValuesFilter.set_MatchMissingValues(false);

                
                removeValuesFilter.set_NominalIndices("1-1");
                classInstances[i] = Filter.useFilter(this.data, removeValuesFilter);
            }
           
        }
开发者ID:intille,项目名称:mitessoftware,代码行数:28,代码来源:Evaluator.cs


示例5: buildClassifier

		/// <summary> Generates the classifier.
		/// 
		/// </summary>
		/// <param name="instances">set of instances serving as training data 
		/// </param>
		/// <exception cref="Exception">if the classifier has not been generated successfully
		/// </exception>
		public override void  buildClassifier(Instances instances)
		{
			
			double sumOfWeights = 0;
			
			m_Class = instances.classAttribute();
			m_ClassValue = 0;
			switch (instances.classAttribute().type())
			{
				
				case weka.core.Attribute.NUMERIC: 
					m_Counts = null;
					break;

                case weka.core.Attribute.NOMINAL: 
					m_Counts = new double[instances.numClasses()];
					for (int i = 0; i < m_Counts.Length; i++)
					{
						m_Counts[i] = 1;
					}
					sumOfWeights = instances.numClasses();
					break;
				
				default: 
					throw new System.Exception("ZeroR can only handle nominal and numeric class" + " attributes.");
				
			}
			System.Collections.IEnumerator enu = instances.enumerateInstances();
			//UPGRADE_TODO: Method 'java.util.Enumeration.hasMoreElements' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationhasMoreElements'"
			while (enu.MoveNext())
			{
				//UPGRADE_TODO: Method 'java.util.Enumeration.nextElement' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationnextElement'"
				Instance instance = (Instance) enu.Current;
				if (!instance.classIsMissing())
				{
					if (instances.classAttribute().Nominal)
					{
						//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
						m_Counts[(int) instance.classValue()] += instance.weight();
					}
					else
					{
						m_ClassValue += instance.weight() * instance.classValue();
					}
					sumOfWeights += instance.weight();
				}
			}
			if (instances.classAttribute().Numeric)
			{
				if (Utils.gr(sumOfWeights, 0))
				{
					m_ClassValue /= sumOfWeights;
				}
			}
			else
			{
				m_ClassValue = Utils.maxIndex(m_Counts);
				Utils.normalize(m_Counts, sumOfWeights);
			}
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:67,代码来源:ZeroR.cs


示例6: Build

 public void Build()
 {
     this.featureIndex = new int[this.features.Count];
     for(int i=0;(i< this.features.Count);i++)
     {
         for (int j = 0; (j < Extractor.ArffAttributeLabels.Length); j++)
             if (((string)this.features[i]).Equals(Extractor.ArffAttributeLabels[j]))
             {
                 this.featureIndex[i] = j;
                 break;
             }
     }
     instances = new Instances(new StreamReader(this.filename));
     instances.Class = instances.attribute(this.features.Count);
     classifier = new J48();
     classifier.buildClassifier(instances);
     
     //setup the feature vector 
     //fvWekaAttributes = new FastVector(this.features.Count + 1);
     //for (i = 0; (i < this.features.Count); i++)
     //    fvWekaAttributes.addElement(new weka.core.Attribute(this.features[i]));
     
     
     //Setup the class attribute
     //FastVector fvClassVal = new FastVector();
     //for (i = 0; (i < this.classes.Count); i++)           
      //   fvClassVal.addElement(this.classes[i]);            
     //weka.core.Attribute ClassAttribute = new weka.core.Attribute("activity", fvClassVal);
 }
开发者ID:intille,项目名称:mitessoftware,代码行数:29,代码来源:DTClassifier.cs


示例7: setInputFormat

		/// <summary> Sets the format of the input instances.
		/// 
		/// </summary>
		/// <param name="instanceInfo">an Instances object containing the input 
		/// instance structure (any instances contained in the object are 
		/// ignored - only the structure is required).
		/// </param>
		/// <returns> true if the outputFormat may be collected immediately
		/// </returns>
		/// <exception cref="Exception">if the input format can't be set 
		/// successfully
		/// </exception>
		public virtual bool setInputFormat(Instances instanceInfo)
		{
			
			base.setInputFormat(instanceInfo);
			setOutputFormat(instanceInfo);
			m_ModesAndMeans = null;
			return true;
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:20,代码来源:ReplaceMissingValues.cs


示例8: parse

        public ArffStore parse()
        {
            ArffStore arffStore = new ArffStore();
            instances = new Instances(new StreamReader(this.filename));
            
            //foreach (weka.core.Attribute attribute in instances.enumerateAttributes())
             //   arffStore.Features.Add(attribute.name);

            return arffStore;
           
        }
开发者ID:intille,项目名称:mitessoftware,代码行数:11,代码来源:ArffParser.cs


示例9: setInputFormat

		/// <summary> Sets the format of the input instances.
		/// 
		/// </summary>
		/// <param name="instanceInfo">an Instances object containing the input 
		/// instance structure (any instances contained in the object are 
		/// ignored - only the structure is required).
		/// </param>
		/// <returns> true if the outputFormat may be collected immediately
		/// </returns>
		/// <exception cref="Exception">if the input format can't be set 
		/// successfully
		/// </exception>
		public override bool setInputFormat(Instances instanceInfo)
		{
			
			base.setInputFormat(instanceInfo);
			
			m_Columns.Upper = instanceInfo.numAttributes() - 1;
			
			setOutputFormat();
			m_Indices = null;
			return true;
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:23,代码来源:NominalToBinary.cs


示例10: classifyTest

    // Test the classification result of each map that a user played,
    // with the data available as if they were playing through it
    public static void classifyTest(String dataString, String playerID)
    {
        String results = "";
        try {
            java.io.StringReader stringReader = new java.io.StringReader(dataString);
            java.io.BufferedReader buffReader = new java.io.BufferedReader(stringReader);

            /* NOTE THAT FOR NAIVE BAYES ALL WEIGHTS CAN BE = 1*/
            //weka.core.converters.ConverterUtils.DataSource source = new weka.core.converters.ConverterUtils.DataSource("iris.arff");
            weka.core.Instances data = new weka.core.Instances(buffReader); //source.getDataSet();
            // setting class attribute if the data format does not provide this information
            // For example, the XRFF format saves the class attribute information as well
            if (data.classIndex() == -1)
                data.setClassIndex(data.numAttributes() - 1);

            weka.classifiers.Classifier cl;
            for (int i = 3; i < data.numInstances(); i++) {
                cl = new weka.classifiers.bayes.NaiveBayes();
                //cl = new weka.classifiers.trees.J48();
                //cl = new weka.classifiers.lazy.IB1();
                //cl = new weka.classifiers.functions.MultilayerPerceptron();
                ((weka.classifiers.functions.MultilayerPerceptron)cl).setHiddenLayers("12");

                weka.core.Instances subset = new weka.core.Instances(data,0,i);
                cl.buildClassifier(subset);

                weka.classifiers.Evaluation eval = new weka.classifiers.Evaluation(subset);
         		eval.crossValidateModel(cl, subset, 3, new java.util.Random(1));
                results = results + eval.pctCorrect(); // For accuracy measurement
                /* For Mathews Correlation Coefficient */
                //double TP = eval.numTruePositives(1);
                //double FP = eval.numFalsePositives(1);
                //double TN = eval.numTrueNegatives(1);
                //double FN = eval.numFalseNegatives(1);
                //double correlationCoeff = ((TP*TN)-(FP*FN))/Math.Sqrt((TP+FP)*(TP+FN)*(TN+FP)*(TN+FN));
                //results = results + correlationCoeff;
                if (i != data.numInstances()-1)
                    results = results + ", ";
                if(i == data.numInstances()-1)
                    Debug.Log("Player: " + playerID + ", Num Maps: " + data.numInstances() + ", AUC: " + eval.areaUnderROC(1));
            }
        } catch (java.lang.Exception ex)
        {
            Debug.LogError(ex.getMessage());
        }
        // Write values to file for a matlab read
        // For accuracy
         	StreamWriter writer = new StreamWriter("DataForMatlab/"+playerID+"_CrossFoldValidations_NeuralNet.txt");

        //StreamWriter writer = new StreamWriter("DataForMatlab/"+playerID+"_CrossFoldCorrCoeff.txt"); // For mathews cc
        writer.WriteLine(results);
        writer.Close();
        Debug.Log(playerID + " has been written to file");
    }
开发者ID:AlexanderMazaletskiy,项目名称:PCG-Angry-Bots,代码行数:56,代码来源:wekaAttributeSelectionCounter.cs


示例11: BinC45ModelSelection

        public BinC45ModelSelection(XmlNode model,Instances allData)
        {

            foreach (XmlAttribute xAttribute in model.Attributes)
            {
                if (xAttribute.Name == Constants.MIN_NO_OBJ_ATTRIBUTE)
                    this.m_minNoObj = Convert.ToInt32(xAttribute.Value);
            }

            m_allData = allData;
                    
        }
开发者ID:intille,项目名称:mitessoftware,代码行数:12,代码来源:BinC45ModelSelection.cs


示例12: Evaluator

        public Evaluator(string arffFile)
        {

            this.data = new Instances(new StreamReader(arffFile));
            this.data.ClassIndex = this.data.numAttributes() - 1;
            this.numExamples = this.data.m_Instances.size();
            this.classCount = this.data.attribute(this.data.numAttributes() - 1).numValues();




            // this.trainingSizeMatrix=new double[
        }
开发者ID:intille,项目名称:mitessoftware,代码行数:13,代码来源:Evaluator.cs


示例13: VectorClassif

 public VectorClassif(int nbTags)
 {
     tagsNb = nbTags;
     ArrayList nomi = new ArrayList();
     nomi.add("0");
     nomi.add("1");
     ArrayList attr = new ArrayList();
     weka.core.Attribute stringAttr = new weka.core.Attribute("todoString", (List)null);
     attr.add(stringAttr);
     for (int i = 1; i <= nbTags; i++) {
         attr.add(new weka.core.Attribute("label" + i, nomi));
     }
     oDataSet = new Instances("Todo-Instances", attr, 500);
 }
开发者ID:KommuSoft,项目名称:MLTag,代码行数:14,代码来源:VectorClassif.cs


示例14: EndTrainingSession

 public void EndTrainingSession()
 {
     Console.WriteLine("End");
     stv = new StringToWordVector();
     stv.setAttributeNamePrefix("#");
     stv.setLowerCaseTokens(true);
     stv.setOutputWordCounts(true);
     stv.setInputFormat(oDataSet);
     stv.setStemmer(new weka.core.stemmers.LovinsStemmer());
     stv.setIDFTransform(true);
     dataSet = Filter.useFilter(oDataSet, stv);
     MultiLabelInstances mli = new MultiLabelInstances(dataSet, loadLabelsMeta(dataSet, tagsNb));
     BinaryRelevance br = new mulan.classifier.transformation.BinaryRelevance(new NaiveBayes());
     lps = new mulan.classifier.meta.RAkEL(br);
     br.setDebug(true);
     lps.setDebug(true);
     lps.build(mli);
 }
开发者ID:KommuSoft,项目名称:MLTag,代码行数:18,代码来源:VectorClassif.cs


示例15: Distribution

		/// <summary> Creates a distribution with only one bag according
		/// to instances in source.
		/// 
		/// </summary>
		/// <exception cref="Exception">if something goes wrong
		/// </exception>
		public Distribution(Instances source)
		{
			
			m_perClassPerBag = new double[1][];
			for (int i = 0; i < 1; i++)
			{
				m_perClassPerBag[i] = new double[0];
			}
			m_perBag = new double[1];
			totaL = 0;
			m_perClass = new double[source.numClasses()];
			m_perClassPerBag[0] = new double[source.numClasses()];
			System.Collections.IEnumerator enu = source.enumerateInstances();
			//UPGRADE_TODO: Method 'java.util.Enumeration.hasMoreElements' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationhasMoreElements'"
			while (enu.MoveNext())
			{
				//UPGRADE_TODO: Method 'java.util.Enumeration.nextElement' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationnextElement'"
				add(0, (Instance) enu.Current);
			}
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:26,代码来源:Distribution.cs


示例16: InitializeClassifier

    /* Use when the player logs in to initially create the classifier with data from server */
    public void InitializeClassifier(String dataString)
    {
        try {
            java.io.StringReader stringReader = new java.io.StringReader(dataString);
            java.io.BufferedReader buffReader = new java.io.BufferedReader(stringReader);

            playerData = new weka.core.Instances(buffReader);

            /* State where in each Instance the class attribute is, if its not already specified by the file */
            if (playerData.classIndex() == -1)
                playerData.setClassIndex(playerData.numAttributes() - 1);

            /* NAIVE BAYES */
            //classifier = new weka.classifiers.bayes.NaiveBayes();

            /* NEURAL NET */
            //classifier = new weka.classifiers.functions.MultilayerPerceptron();
            //((weka.classifiers.functions.MultilayerPerceptron)classifier).setHiddenLayers("12");

            /* J48 TREE */
            //classifier = new weka.classifiers.trees.J48();

            /* IB1 NEAREST NEIGHBOUR */
            //classifier = new weka.classifiers.lazy.IB1();

            /* RANDOM FOREST */
            classifier = new weka.classifiers.trees.RandomForest();

            classifier.buildClassifier(playerData);
            Debug.Log("Initialized Classifier");
        }
        catch (java.lang.Exception ex)
        {
            Debug.LogError(ex.getMessage());
        }
    }
开发者ID:AlexanderMazaletskiy,项目名称:PCG-Angry-Bots,代码行数:37,代码来源:PCGWekaClassifier.cs


示例17: loadLabelsMeta

 private LabelsMetaData loadLabelsMeta(Instances data, int numLabels)
 {
     LabelsMetaDataImpl labelsData = new LabelsMetaDataImpl();
     int numAttributes = data.numAttributes();
     for (int index = numAttributes - numLabels; index < numAttributes; index++) {
         String attrName = data.attribute(index).name();
         labelsData.addRootNode(new LabelNodeImpl(attrName));
     }
     return labelsData;
 }
开发者ID:KommuSoft,项目名称:MLTag,代码行数:10,代码来源:MLKNN.cs


示例18: sourceExpression

		/// <summary> Returns a string containing java source code equivalent to the test
		/// made at this node. The instance being tested is called "i".
		/// 
		/// </summary>
		/// <param name="index">index of the nominal value tested
		/// </param>
		/// <param name="data">the data containing instance structure info
		/// </param>
		/// <returns> a value of type 'String'
		/// </returns>
		public override System.String sourceExpression(int index, Instances data)
		{
			
			return "true"; // or should this be false??
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:15,代码来源:NoSplit.cs


示例19: selectModel

		/// <summary> Selects a model for the given train data using the given test data
		/// 
		/// </summary>
		/// <exception cref="Exception">if model can't be selected
		/// </exception>
		public virtual ClassifierSplitModel selectModel(Instances train, Instances test)
		{
			
			throw new System.Exception("Model selection method not implemented");
		}
开发者ID:intille,项目名称:mitessoftware,代码行数:10,代码来源:ModelSelection.cs


示例20: analyze

        // ---- OPERATIONS ----
        ///    
        ///     <summary> * Analyze the time series data. The similarity matrices are created
        ///     * and filled with euclidean distances based on the tolerance values
        ///     * for similarity.
        ///     * </summary>
        ///     * <param name="data"> data to be analyzed </param>
        public override void analyze(Instances data)
        {
            data.setClassIndex(data.numAttributes() - 1);

            m_data = data;
            m_rangeTemplates.setUpper(data.numAttributes());

            //Date startFT = new Date();

            // compute fourier transform
            FourierTransform dftFilter = new FourierTransform();
            dftFilter.setInputFormat(data);
            dftFilter.setNumCoeffs(getNumCoeffs());
            dftFilter.setUseFFT(getUseFFT());
            Instances fourierdata = Filter.useFilter(data, dftFilter);

            Date endFT = new Date();

            // time taken for FT
            //m_DFTTime = new Date(endFT.getTime() - startFT.getTime());

            int numdim = data.numAttributes();
            //ORIGINAL LINE: m_distancesFreq = new double[numdim][numdim];
            //JAVA TO VB & C# CONVERTER NOTE: The following call to the 'RectangularArrays' helper class reproduces the rectangular array initialization that is automatic in Java:
            m_distancesFreq = RectangularArrays.ReturnRectangularDoubleArray(numdim, numdim);
            //ORIGINAL LINE: m_distancesTime = new double[numdim][numdim];
            //JAVA TO VB & C# CONVERTER NOTE: The following call to the 'RectangularArrays' helper class reproduces the rectangular array initialization that is automatic in Java:
            m_distancesTime = RectangularArrays.ReturnRectangularDoubleArray(numdim, numdim);

            //long ftDistTime = 0;
            //long tDistTime = 0;

            // compute similarity matrices
            for (int i = 0; i < data.numAttributes(); ++i)
            {
                for (int j = 0; j < i; j++)
                {
                // not for template sequences
                    if (m_rangeTemplates.isInRange(i) && m_rangeTemplates.isInRange(j))
                    {
                        continue;
                    }

                    //Date startFTDist = new Date();

                // Compute the Euclidean distance between 2 dims using FT
                    double[] reCT = fourierdata.attributeToDoubleArray(2 * i);
                    double[] imCT = fourierdata.attributeToDoubleArray(2 * i + 1);

                    double[] reCS = fourierdata.attributeToDoubleArray(2 * j);
                    double[] imCS = fourierdata.attributeToDoubleArray(2 * j + 1);

                    m_distancesFreq[i][j] = computeEuclidean(reCT, imCT, reCS, imCS);

                // if found similar using FT
                    if (m_distancesFreq[i][j] <= m_epsilon)
                    {
                    // then compute normal Euclidean distances between the 2 dims
                        double[] x = data.attributeToDoubleArray(i);
                        double[] y = data.attributeToDoubleArray(j);

                        m_distancesTime[i][j] = computeEuclidean(x, y);
                    }

                    //Date endFTDist = new Date();

                // time taken for computing similarity based on FT
                    //ftDistTime += (endFTDist.getTime() - startFTDist.getTime());

                //    Date startDist = new Date();

                //// compute similarity matrices (brute force)
                //    double[] x1 = data.attributeToDoubleArray(i);
                //    double[] y1 = data.attributeToDoubleArray(j);

                //    computeEuclidean(x1, y1);

                //    Date endDist = new Date();
                //// time taken for computing similarity based brute force method
                //    tDistTime += (endDist.getTime() - startDist.getTime());

                }
            }

            //m_FTEuclideanTime = new Date(ftDistTime);
            //m_EuclideanTime = new Date(tDistTime);
        }
开发者ID:wushian,项目名称:MLEA,代码行数:94,代码来源:SimilarityAnalysis.cs



注:本文中的weka.core.Instances类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# wmib.Channel类代码示例发布时间:2022-05-26
下一篇:
C# entities.Player类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap