public void Train(IExampleCollection <LblT, BinaryVector <int> .ReadOnly> dataset)
 {
     Utils.ThrowException(dataset == null ? new ArgumentNullException("dataset") : null);
     Utils.ThrowException(dataset.Count == 0 ? new ArgumentValueException("dataset") : null);
     m_lambda = null; // allow GC to collect this
     m_lambda = MaxEnt.Gis(dataset, m_cut_off, m_num_iter, m_move_data, /*mtx_file_name=*/ null, ref m_idx_to_lbl, m_num_threads);
 }
 public void Train(ILabeledExampleCollection <LblT, BinaryVector> dataset)
 {
     Utils.ThrowException(dataset == null ? new ArgumentNullException("dataset") : null);
     Utils.ThrowException(dataset.Count == 0 ? new ArgumentValueException("dataset") : null);
     mLambda = null;                                                                                                                     // allow GC to collect this
     mLambda = MaxEnt.Gis(dataset, mCutOff, mNumIter, mMoveData, /*mtxFileName=*/ null, ref mIdxToLbl, mNumThreads, /*allowedDiff=*/ 0); // *** allowedDiff
 }
        public void Train(ILabeledExampleCollection <LblT, BinaryVector> dataset)
        {
            Utils.ThrowException(dataset == null ? new ArgumentNullException("dataset") : null);
            Utils.ThrowException(dataset.Count == 0 ? new ArgumentValueException("dataset") : null);
            mLambda = null;                                                                                                                                   // allow GC to collect this
            SparseMatrix <double> lambda
                = MaxEnt.Gis(dataset, mCutOff, mNumIter, mMoveData, /*mtxFileName=*/ null, ref mIdxToLbl, mNumThreads, /*allowedDiff=*/ 0, mLblCmp, mLogger); // *** allowedDiff

            mLambda = MaxEnt.PrepareForFastPrediction(lambda);
        }
 public ClassifierResult <LblT> Classify(BinaryVector <int> .ReadOnly example)
 {
     Utils.ThrowException(m_lambda == null ? new InvalidOperationException() : null);
     Utils.ThrowException(example == null ? new ArgumentNullException("example") : null);
     return(MaxEnt.Classify(example, m_lambda, m_idx_to_lbl));
 }
 public Prediction <LblT> Predict(BinaryVector example)
 {
     Utils.ThrowException(mLambda == null ? new InvalidOperationException() : null);
     Utils.ThrowException(example == null ? new ArgumentNullException("example") : null);
     return(MaxEnt.Classify(example, mLambda, mIdxToLbl, mNormalize));
 }