Preparing report...

Report for github.com/sjwhitworth/golearn

A+    Excellent!    Found 82 issues across 153 files

Tweet

gofmt89%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


golint53%

Golint is a linter for Go source code.

    • golearn/base/filters.go
    • Line 3: warning: comment on exported type FilteredAttribute should be of the form "FilteredAttribute ..." (with optional leading article) (golint)
    • Line 10: warning: comment on exported type Filter should be of the form "Filter ..." (with optional leading article) (golint)
    • golearn/linear_models/liblinear.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported type Problem should have comment or be unexported (golint)
    • Line 11: warning: don't use underscores in Go names; struct field c_prob should be cProb (golint)
    • Line 14: warning: exported type Parameter should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; struct field c_param should be cParam (golint)
    • Line 18: warning: exported type Model should have comment or be unexported (golint)
    • Line 19: warning: don't use underscores in Go names; struct field c_model should be cModel (golint)
    • Line 23: warning: exported const L2R_LR should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function NewParameter should have comment or be unexported (golint)
    • Line 33: warning: don't use underscores in Go names; func parameter solver_type should be solverType (golint)
    • Line 45: warning: exported function NewProblem should have comment or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; var c_y should be cY (golint)
    • Line 61: warning: exported function Train should have comment or be unexported (golint)
    • Line 68: warning: exported function Export should have comment or be unexported (golint)
    • Line 76: warning: exported function Load should have comment or be unexported (golint)
    • Line 84: warning: exported function Predict should have comment or be unexported (golint)
    • Line 85: warning: don't use underscores in Go names; var c_x should be cX (golint)
    • Line 86: warning: don't use underscores in Go names; var c_y should be cY (golint)
    • Line 90: warning: don't use underscores in Go names; func convert_vector should be convertVector (golint)
    • Line 91: warning: don't use underscores in Go names; var n_ele should be nEle (golint)
    • Line 97: warning: don't use underscores in Go names; var n_ele should be nEle (golint)
    • Line 99: warning: don't use underscores in Go names; var c_x should be cX (golint)
    • Line 116: warning: don't use underscores in Go names; func convert_features should be convertFeatures (golint)
    • Line 117: warning: don't use underscores in Go names; var n_samples should be nSamples (golint)
    • Line 118: warning: don't use underscores in Go names; var n_elements should be nElements (golint)
    • Line 129: warning: don't use underscores in Go names; var x_space should be xSpace (golint)
    • Line 133: warning: don't use underscores in Go names; var c_x should be cX (golint)
    • golearn/base/binary.go
    • Line 9: warning: comment on exported type BinaryAttribute should be of the form "BinaryAttribute ..." (with optional leading article) (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • golearn/base/group.go
    • Line 7: warning: comment on exported type AttributeGroup should be of the form "AttributeGroup ..." (with optional leading article) (golint)
    • golearn/base/util_instances.go
    • Line 25: warning: comment on exported function CopyDenseInstances should be of the form "CopyDenseInstances ..." (golint)
    • Line 155: warning: comment on exported function GetClassDistributionByCategoricalValue should be of the form "GetClassDistributionByCategoricalValue ..." (golint)
    • Line 421: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • golearn/pca/pca.go
    • Line 1: warning: package comment should be of the form "Package pca ..." (golint)
    • Line 8: warning: exported type PCA should have comment or be unexported (golint)
    • Line 9: warning: don't use underscores in Go names; struct field Num_components should be NumComponents (golint)
    • Line 13: warning: comment on exported function NewPCA should be of the form "NewPCA ..." (golint)
    • Line 14: warning: don't use underscores in Go names; func parameter num_components should be numComponents (golint)
    • Line 18: warning: comment on exported method PCA.FitTransform should be of the form "FitTransform ..." (golint)
    • Line 43: warning: comment on exported method PCA.Transform should be of the form "Transform ..." (golint)
    • Line 49: warning: don't use underscores in Go names; var num_samples should be numSamples (golint)
    • Line 49: warning: don't use underscores in Go names; var num_features should be numFeatures (golint)
    • golearn/ensemble/multisvc.go
    • Line 85: warning: exported method MultiLinearSVC.GetClassifierMetadata should have comment or be unexported (golint)
    • Line 94: warning: exported method MultiLinearSVC.Save should have comment or be unexported (golint)
    • Line 108: warning: exported method MultiLinearSVC.SaveWithPrefix should have comment or be unexported (golint)
    • Line 130: warning: exported method MultiLinearSVC.GetMetadata should have comment or be unexported (golint)
    • Line 139: warning: exported method MultiLinearSVC.Load should have comment or be unexported (golint)
    • Line 153: warning: exported method MultiLinearSVC.LoadWithPrefix should have comment or be unexported (golint)
    • golearn/meta/bagging.go
    • Line 204: warning: exported method BaggedModel.Save should have comment or be unexported (golint)
    • Line 214: warning: exported method BaggedModel.Load should have comment or be unexported (golint)
    • Line 225: warning: comment on exported method BaggedModel.SaveWithPrefix should be of the form "SaveWithPrefix ..." (golint)
    • Line 291: warning: comment on exported method BaggedModel.LoadWithPrefix should be of the form "LoadWithPrefix ..." (golint)
    • golearn/meta/one_v_all.go
    • Line 132: warning: exported method OneVsAllModel.Load should have comment or be unexported (golint)
    • Line 143: warning: exported method OneVsAllModel.LoadWithPrefix should have comment or be unexported (golint)
    • Line 243: warning: exported method OneVsAllModel.GetMetadata should have comment or be unexported (golint)
    • Line 252: warning: exported method OneVsAllModel.Save should have comment or be unexported (golint)
    • Line 260: warning: exported method OneVsAllModel.SaveWithPrefix should have comment or be unexported (golint)
    • golearn/base/dense.go
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • golearn/base/serialize.go
    • Line 16: warning: exported const SerializationFormatVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 180: warning: exported method ClassifierDeserializer.GetStringForKey should have comment or be unexported (golint)
    • Line 202: warning: comment on exported method ClassifierDeserializer.GetU64ForKey should be of the form "GetU64ForKey ..." (golint)
    • Line 362: warning: comment on exported method ClassifierSerializer.WriteInstancesForKey should be of the form "WriteInstancesForKey ..." (golint)
    • golearn/linear_models/logistic.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported type LogisticRegression should have comment or be unexported (golint)
    • Line 14: warning: exported function NewLogisticRegression should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; var solver_type should be solverType (golint)
    • Line 21: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 30: warning: exported method LogisticRegression.Fit should have comment or be unexported (golint)
    • Line 38: warning: exported method LogisticRegression.Predict should have comment or be unexported (golint)
    • golearn/naive/bernoulli_nb.go
    • Line 9: warning: comment on exported type BernoulliNBClassifier should be of the form "BernoulliNBClassifier ..." (with optional leading article) (golint)
    • Line 63: warning: exported method BernoulliNBClassifier.GetMetadata should have comment or be unexported (golint)
    • Line 72: warning: exported method BernoulliNBClassifier.Save should have comment or be unexported (golint)
    • Line 82: warning: exported method BernoulliNBClassifier.Load should have comment or be unexported (golint)
    • Line 91: warning: exported method BernoulliNBClassifier.LoadWithPrefix should have comment or be unexported (golint)
    • Line 138: warning: exported method BernoulliNBClassifier.SaveWithPrefix should have comment or be unexported (golint)
    • Line 177: warning: comment on exported function NewBernoulliNBClassifier should be of the form "NewBernoulliNBClassifier ..." (golint)
    • Line 187: warning: comment on exported method BernoulliNBClassifier.Fit should be of the form "Fit ..." (golint)
    • Line 251: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (golint)
    • Line 268: warning: comment on exported method BernoulliNBClassifier.PredictOne should be of the form "PredictOne ..." (golint)
    • golearn/trees/isolation.go
    • Line 10: warning: exported type IsolationForest should have comment or be unexported (golint)
    • Line 128: warning: comment on exported function NewIsolationForest should be of the form "NewIsolationForest ..." (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 172: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 207: warning: comment on exported method IsolationForest.Predict should be of the form "Predict ..." (golint)
    • golearn/base/filtered.go
    • Line 21: warning: comment on exported function NewLazilyFilteredInstances should be of the form "NewLazilyFilteredInstances ..." (golint)
    • golearn/metrics/pairwise/chebyshev.go
    • Line 10: warning: exported type Chebyshev should have comment or be unexported (golint)
    • Line 12: warning: exported function NewChebyshev should have comment or be unexported (golint)
    • Line 16: warning: exported method Chebyshev.Distance should have comment or be unexported (golint)
    • golearn/linear_models/linear_regression.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: error var NotEnoughDataError should have name of the form ErrFoo (golint)
    • Line 14: warning: exported var NotEnoughDataError should have comment or be unexported (golint)
    • Line 15: warning: error var NoTrainingDataError should have name of the form ErrFoo (golint)
    • Line 18: warning: exported type LinearRegression should have comment or be unexported (golint)
    • Line 26: warning: exported function NewLinearRegression should have comment or be unexported (golint)
    • Line 30: warning: exported method LinearRegression.Fit should have comment or be unexported (golint)
    • Line 110: warning: exported method LinearRegression.Predict should have comment or be unexported (golint)
    • golearn/linear_models/linearsvc.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 217: warning: exported method LinearSVC.GetMetadata should have comment or be unexported (golint)
    • Line 251: warning: exported method LinearSVC.SaveWithPrefix should have comment or be unexported (golint)
    • Line 294: warning: exported method LinearSVC.Load should have comment or be unexported (golint)
    • Line 306: warning: exported method LinearSVC.LoadWithPrefix should have comment or be unexported (golint)
    • golearn/linear_models/util.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 32: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 51: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • golearn/trees/id3.go
    • Line 35: warning: exported method DecisionTreeRule.MarshalJSON should have comment or be unexported (golint)
    • Line 86: warning: exported method DecisionTreeRule.UnmarshalJSON should have comment or be unexported (golint)
    • Line 137: warning: exported method DecisionTreeNode.SaveWithPrefix should have comment or be unexported (golint)
    • Line 414: warning: exported type ClassProba should have comment or be unexported (golint)
    • Line 419: warning: exported type ClassesProba should have comment or be unexported (golint)
    • Line 431: warning: comment on exported method ID3DecisionTree.PredictProba should be of the form "PredictProba ..." (golint)
    • Line 559: warning: exported method ID3DecisionTree.GetMetadata should have comment or be unexported (golint)
    • Line 568: warning: exported method ID3DecisionTree.Save should have comment or be unexported (golint)
    • Line 577: warning: exported method ID3DecisionTree.SaveWithPrefix should have comment or be unexported (golint)
    • Line 581: warning: exported method ID3DecisionTree.Load should have comment or be unexported (golint)
    • Line 589: warning: exported method ID3DecisionTree.LoadWithPrefix should have comment or be unexported (golint)
    • golearn/metrics/pairwise/cranberra.go
    • Line 10: warning: exported type Cranberra should have comment or be unexported (golint)
    • Line 12: warning: exported function NewCranberra should have comment or be unexported (golint)
    • Line 23: warning: exported method Cranberra.Distance should have comment or be unexported (golint)
    • golearn/base/error.go
    • Line 10: warning: exported type GoLearnError should have comment or be unexported (golint)
    • Line 67: warning: exported function DescribeError should have comment or be unexported (golint)
    • Line 75: warning: exported function WrapError should have comment or be unexported (golint)
    • Line 82: warning: exported function FormatError should have comment or be unexported (golint)
    • golearn/base/float.go
    • Line 50: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 59: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 73: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 78: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 83: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 89: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 96: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 111: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 120: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • Line 126: warning: receiver name Attr should be consistent with previous receiver name f for FloatAttribute (golint)
    • golearn/base/arff.go
    • Line 44: warning: exported function SerializeInstancesToWriterDenseARFFWithAttributes should have comment or be unexported (golint)
    • golearn/base/view.go
    • Line 8: warning: comment on exported type InstancesView should be of the form "InstancesView ..." (with optional leading article) (golint)
    • Line 203: warning: comment on exported method InstancesView.MapOverRows should be of the form "MapOverRows ..." (golint)
    • Line 224: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golearn/trees/sorter.go
    • Line 7: warning: exported type Slice should have comment or be unexported (golint)
    • Line 12: warning: exported method Slice.Swap should have comment or be unexported (golint)
    • Line 17: warning: exported function NewSlice should have comment or be unexported (golint)
    • golearn/knn/knn.go
    • Line 180: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 203: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 214: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 431: warning: exported method KNNRegressor.Fit should have comment or be unexported (golint)
    • Line 440: warning: exported method KNNRegressor.Predict should have comment or be unexported (golint)
    • golearn/base/attributes.go
    • Line 12: warning: exported const BinaryType should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported type Attribute should be of the form "Attribute ..." (with optional leading article) (golint)
    • golearn/perceptron/average.go
    • Line 8: warning: exported const MaxEpochs should have comment or be unexported (golint)
    • Line 10: warning: exported type AveragePerceptron should have comment or be unexported (golint)
    • Line 31: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 68: warning: exported method AveragePerceptron.Fit should have comment or be unexported (golint)
    • Line 99: warning: comment on exported method AveragePerceptron.Predict should be of the form "Predict ..." (golint)
    • Line 175: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 188: warning: exported function NewAveragePerceptron should have comment or be unexported (golint)
    • golearn/neural/funcs.go
    • Line 7: warning: comment on exported var Sigmoid should be of the form "Sigmoid ..." (golint)
    • Line 15: warning: comment on exported var Linear should be of the form "Linear ..." (golint)
    • Line 21: warning: comment on exported var SoftplusRectifier should be of the form "SoftplusRectifier ..." (golint)
    • golearn/trees/cart_regressor.go
    • Line 15: warning: exported const MAE should have comment (or a comment on this block) or be unexported (golint)
    • Line 118: warning: comment on exported function NewDecisionTreeRegressor should be of the form "NewDecisionTreeRegressor ..." (golint)
    • Line 333: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 339: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 347: warning: don't use underscores in Go names; method parameter X_test should be XTest (golint)
    • Line 358: warning: don't use underscores in Go names; var i_pred should be iPred (golint)
    • Line 379: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 395: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 399: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • golearn/kdtree/kdtree.go
    • Line 24: warning: exported type SortData should have comment or be unexported (golint)
    • Line 56: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • golearn/filters/float.go
    • Line 8: warning: comment on exported type FloatConvertFilter should be of the form "FloatConvertFilter ..." (with optional leading article) (golint)
    • Line 53: warning: exported method FloatConvertFilter.Transform should have comment or be unexported (golint)
    • golearn/base/fixed.go
    • Line 8: warning: comment on exported type FixedAttributeGroup should be of the form "FixedAttributeGroup ..." (with optional leading article) (golint)
    • golearn/base/serialize_instances.go
    • Line 14: warning: exported function SerializeInstancesToFile should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function SerializeInstancesToCSV should be of the form "SerializeInstancesToCSV ..." (golint)
    • golearn/clustering/clustering.go
    • Line 1: warning: package comment should be of the form "Package clustering ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 14: warning: exported type ClusterParameters should have comment or be unexported (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • golearn/trees/cart_classifier.go
    • Line 15: warning: exported const GINI should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported type CARTDecisionTreeClassifier should be of the form "CARTDecisionTreeClassifier ..." (with optional leading article) (golint)
    • Line 128: warning: comment on exported function NewDecisionTreeClassifier should be of the form "NewDecisionTreeClassifier ..." (golint)
    • Line 362: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 368: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 374: warning: comment on exported method CARTDecisionTreeClassifier.Predict should be of the form "Predict ..." (golint)
    • Line 375: warning: don't use underscores in Go names; method parameter X_test should be XTest (golint)
    • Line 392: warning: comment on exported method CARTDecisionTreeClassifier.Evaluate should be of the form "Evaluate ..." (golint)
    • Line 424: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 428: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • golearn/base/mat.go
    • Line 9: warning: exported type Mat64Instances should have comment or be unexported (golint)
    • Line 94: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • Line 109: warning: comment on exported method Mat64Instances.RowString should be of the form "RowString ..." (golint)
    • golearn/base/bag.go
    • Line 8: warning: comment on exported type BinaryAttributeGroup should be of the form "BinaryAttributeGroup ..." (with optional leading article) (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golearn/filters/binary.go
    • Line 8: warning: comment on exported type BinaryConvertFilter should be of the form "BinaryConvertFilter ..." (with optional leading article) (golint)
    • golearn/clustering/em.go
    • Line 14: warning: error var NoTrainingDataError should have name of the form ErrFoo (golint)
    • Line 14: warning: exported var NoTrainingDataError should have comment or be unexported (golint)
    • Line 15: warning: error var InsufficientComponentsError should have name of the form ErrFoo (golint)
    • Line 16: warning: error var InsufficientDataError should have name of the form ErrFoo (golint)
    • Line 19: warning: exported type ExpectationMaximization should have comment or be unexported (golint)
    • Line 20: warning: don't use underscores in Go names; struct field n_comps should be nComps (golint)
    • Line 27: warning: exported type Params should have comment or be unexported (golint)
    • Line 32: warning: comment on exported function NewExpectationMaximization should be of the form "NewExpectationMaximization ..." (golint)
    • Line 33: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 47: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 48: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 76: warning: don't use underscores in Go names; var y_new should be yNew (golint)
    • Line 77: warning: don't use underscores in Go names; var p_new should be pNew (golint)
    • Line 94: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 95: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 122: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 123: warning: don't use underscores in Go names; var y_new should be yNew (golint)
    • Line 128: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 129: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 132: warning: don't use underscores in Go names; var p_new should be pNew (golint)
    • Line 138: warning: don't use underscores in Go names; var X_yk should be XYk (golint)
    • Line 139: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 140: warning: don't use underscores in Go names; var covs_k_reg should be covsKReg (golint)
    • Line 160: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 161: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 161: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 176: warning: don't use underscores in Go names; var y_new should be yNew (golint)
    • Line 178: warning: don't use underscores in Go names; var max_ix should be maxIx (golint)
    • Line 179: warning: don't use underscores in Go names; var max_pr should be maxPr (golint)
    • Line 196: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 196: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 213: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 213: warning: don't use underscores in Go names; func parameter n_feats should be nFeats (golint)
    • Line 229: warning: don't use underscores in Go names; func parameter n_comps should be nComps (golint)
    • Line 229: warning: don't use underscores in Go names; func parameter n_feats should be nFeats (golint)
    • Line 240: warning: don't use underscores in Go names; func parameter p_new should be pNew (golint)
    • Line 242: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 242: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 244: warning: don't use underscores in Go names; var means_i should be meansI (golint)
    • Line 245: warning: don't use underscores in Go names; var means_new_i should be meansNewI (golint)
    • Line 256: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 268: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 280: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 290: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 290: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 293: warning: don't use underscores in Go names; var sum_j should be sumJ (golint)
    • Line 305: warning: don't use underscores in Go names; var n_obs should be nObs (golint)
    • Line 305: warning: don't use underscores in Go names; var n_feats should be nFeats (golint)
    • Line 316: warning: don't use underscores in Go names; var X_i should be XI (golint)
    • golearn/base/filewrapper.go
    • Line 83: warning: comment on exported function ParseCSVToTemplatedInstances should be of the form "ParseCSVToTemplatedInstances ..." (golint)
    • golearn/utilities/utilities.go
    • Line 27: warning: exported function SortIntMap should have comment or be unexported (golint)
    • Line 40: warning: exported function FloatsToMatrix should have comment or be unexported (golint)
    • Line 44: warning: exported function VectorToMatrix should have comment or be unexported (golint)
    • golearn/naive/naive.go
    • Line 4: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • golearn/base/csv.go
    • Line 232: warning: comment on exported function ParseMatchAttributes should be of the form "ParseMatchAttributes ..." (golint)
    • golearn/ensemble/randomforest.go
    • Line 38: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 65: warning: exported method RandomForest.GetMetadata should have comment or be unexported (golint)
    • Line 74: warning: exported method RandomForest.Save should have comment or be unexported (golint)
    • Line 85: warning: exported method RandomForest.SaveWithPrefix should have comment or be unexported (golint)
    • Line 89: warning: exported method RandomForest.Load should have comment or be unexported (golint)
    • Line 97: warning: exported method RandomForest.LoadWithPrefix should have comment or be unexported (golint)
    • golearn/neural/neural.go
    • Line 8: warning: exported type ActivationFunction should have comment or be unexported (golint)
    • Line 10: warning: comment on exported type NeuralFunction should be of the form "NeuralFunction ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type LayerFunc should be of the form "LayerFunc ..." (with optional leading article) (golint)

gocyclo92%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • golearn/base/csv.go
    • Line 286: warning: cyclomatic complexity 17 of function ParseCSVToInstancesWithAttributeGroupsFromReader() is high (> 15) (gocyclo)
    • golearn/base/serialize_instances.go
    • Line 81: warning: cyclomatic complexity 24 of function DeserializeInstancesFromTarReader() is high (> 15) (gocyclo)
    • Line 250: warning: cyclomatic complexity 17 of function SerializeInstancesToTarWriter() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words