Preparing report...

Report for github.com/ryanbressler/CloudForest

B    Not bad!    Found 53 issues across 56 files

Tweet

gofmt73%

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!


gocyclo76%

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.

    • CloudForest/data_test.go
    • Line 323: warning: cyclomatic complexity 25 of function TestIris() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 19 of function TestTreeTargets() is high (> 15) (gocyclo)

golint12%

Golint is a linter for Go source code.

    • CloudForest/sumballotbox.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 63: warning: exported method SumBallotBox.TallyNum should have comment or be unexported (golint)
    • CloudForest/dentropytarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 26: warning: comment on exported method DEntropyTarget.SetCosts should be of the form "SetCosts ..." (golint)
    • Line 35: warning: comment on exported method DEntropyTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 73: warning: exported method DEntropyTarget.ImpFromCounts should have comment or be unexported (golint)
    • Line 85: warning: exported method DEntropyTarget.FindPredicted should have comment or be unexported (golint)
    • Line 86: warning: don't use underscores in Go names; var prob_true should be probTrue (golint)
    • Line 116: warning: comment on exported method DEntropyTarget.Impurity should be of the form "Impurity ..." (golint)
    • CloudForest/gradboostclasstarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 8: warning: exported function Logit should have comment or be unexported (golint)
    • Line 12: warning: exported function Expit should have comment or be unexported (golint)
    • Line 32: warning: don't use underscores in Go names; struct field Pos_class should be PosClass (golint)
    • Line 35: warning: exported function NewGradBoostClassTarget should have comment or be unexported (golint)
    • Line 35: warning: don't use underscores in Go names; func parameter pos_class should be posClass (golint)
    • Line 74: warning: exported method GradBoostClassTarget.Intercept should have comment or be unexported (golint)
    • Line 78: warning: comment on exported method GradBoostClassTarget.Boost should be of the form "Boost ..." (golint)
    • Line 87: warning: exported method GradBoostClassTarget.Predicted should have comment or be unexported (golint)
    • Line 103: warning: exported method GradBoostClassTarget.FindPredicted should have comment or be unexported (golint)
    • CloudForest/l1target.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 14: warning: comment on exported method L1Target.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 39: warning: comment on exported method L1Target.Impurity should be of the form "Impurity ..." (golint)
    • CloudForest/libsvm.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 13: warning: exported function ParseLibSVM should have comment or be unexported (golint)
    • Line 99: warning: exported function WriteLibSvm should have comment or be unexported (golint)
    • Line 150: warning: exported function WriteLibSvmCases should have comment or be unexported (golint)
    • CloudForest/regrettarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 27: warning: comment on exported method RegretTarget.SetCosts should be of the form "SetCosts ..." (golint)
    • Line 36: warning: comment on exported method RegretTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • CloudForest/transduction.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 54: warning: comment on exported method TransTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 83: warning: exported method TransTarget.Impurity should have comment or be unexported (golint)
    • Line 94: warning: comment on exported method TransTarget.Density should be of the form "Density ..." (golint)
    • Line 134: warning: comment on exported method TransTarget.FindPredicted should be of the form "FindPredicted ..." (golint)
    • CloudForest/tree.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 178: warning: exported method Tree.GrowJungle should have comment or be unexported (golint)
    • CloudForest/densenumfeature.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 87: warning: comment on exported method DenseNumFeature.GetStr should be of the form "GetStr ..." (golint)
    • Line 208: warning: comment on exported method DenseNumFeature.DecodeSplit should be of the form "DecodeSplit ..." (golint)
    • Line 394: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 406: warning: don't use underscores in Go names; var sum_sqr should be sumSqr (golint)
    • Line 435: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 442: warning: don't use underscores in Go names; var MVsum_sqr should be MVsumSqr (golint)
    • Line 470: warning: exported method DenseNumFeature.SumAndSumSquares should have comment or be unexported (golint)
    • Line 470: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 470: warning: don't use underscores in Go names; method result sum_sqr should be sumSqr (golint)
    • Line 474: warning: don't use underscores in Go names; var sum_sqr should be sumSqr (golint)
    • Line 481: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 490: warning: don't use underscores in Go names; var sum_sqr should be sumSqr (golint)
    • Line 499: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 516: warning: receiver name target should be consistent with previous receiver name f for DenseNumFeature (golint)
    • Line 580: warning: comment on exported method DenseNumFeature.FindPredicted should be of the form "FindPredicted ..." (golint)
    • Line 666: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • CloudForest/featurematrix.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 22: warning: exported method FeatureMatrix.StripStrings should have comment or be unexported (golint)
    • Line 63: warning: exported method FeatureMatrix.EncodeToNum should have comment or be unexported (golint)
    • Line 84: warning: exported method FeatureMatrix.OneHot should have comment or be unexported (golint)
    • Line 343: warning: comment on exported function ParseAFM should be of the form "ParseAFM ..." (golint)
    • CloudForest/sampeling.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 7: warning: exported type Bagger should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function NewBalancedSampler should be of the form "NewBalancedSampler ..." (golint)
    • Line 80: warning: exported method SecondaryBalancedSampler.Sample should have comment or be unexported (golint)
    • CloudForest/forestreader.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 28: warning: comment on exported method ForestReader.ReadForest should be of the form "ReadForest ..." (golint)
    • Line 71: warning: comment on exported method ForestReader.ReadTree should be of the form "ReadTree ..." (golint)
    • CloudForest/node.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 11: warning: exported type CodedRecursable should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type Node should be of the form "Node ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported method Node.Climb should be of the form "Climb ..." (golint)
    • Line 72: warning: exported method Node.CodedRecurse should have comment or be unexported (golint)
    • CloudForest/sklearn_tree.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 17: warning: exported type ScikitNode should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type ScikitTree should be of the form "ScikitTree ..." (with optional leading article) (golint)
    • Line 60: warning: exported function NewScikitTree should have comment or be unexported (golint)
    • Line 76: warning: comment on exported function BuildScikitTree should be of the form "BuildScikitTree ..." (golint)
    • CloudForest/NPtarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 153: warning: comment on exported method NPTarget.Impurity should be of the form "Impurity ..." (golint)
    • CloudForest/ordinaltarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 35: warning: comment on exported method OrdinalTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 60: warning: exported method OrdinalTarget.Predicted should have comment or be unexported (golint)
    • Line 60: warning: receiver name f should be consistent with previous receiver name target for OrdinalTarget (golint)
    • Line 64: warning: exported method OrdinalTarget.Mode should have comment or be unexported (golint)
    • Line 64: warning: receiver name f should be consistent with previous receiver name target for OrdinalTarget (golint)
    • Line 83: warning: comment on exported method OrdinalTarget.Impurity should be of the form "Impurity ..." (golint)
    • Line 91: warning: exported method OrdinalTarget.FindPredicted should have comment or be unexported (golint)
    • CloudForest/splitallocations.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 25: warning: don't use underscores in Go names; struct field Lsum_sqr should be LsumSqr (golint)
    • Line 26: warning: don't use underscores in Go names; struct field Rsum_sqr should be RsumSqr (golint)
    • Line 27: warning: don't use underscores in Go names; struct field Msum_sqr should be MsumSqr (golint)
    • CloudForest/growforest/growforest.go
    • Line 71: warning: don't use underscores in Go names; var trans_alpha should be transAlpha (golint)
    • Line 74: warning: don't use underscores in Go names; var trans_beta should be transBeta (golint)
    • Line 118: warning: don't use underscores in Go names; var NP_pos should be NPPos (golint)
    • Line 121: warning: don't use underscores in Go names; var NP_a should be NPA (golint)
    • Line 124: warning: don't use underscores in Go names; var NP_k should be NPK (golint)
    • CloudForest/forrest.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 32: warning: exported function GrowRandomForest should have comment or be unexported (golint)
    • CloudForest/data_test.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 454: warning: don't use underscores in Go names; var pos_class should be posClass (golint)
    • Line 740: warning: don't use underscores in Go names; var boston_housing should be bostonHousing (golint)
    • CloudForest/densitytarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 16: warning: exported method DensityTarget.GetName should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method DensityTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 45: warning: comment on exported method DensityTarget.Impurity should be of the form "Impurity ..." (golint)
    • Line 63: warning: comment on exported method DensityTarget.FindPredicted should be of the form "FindPredicted ..." (golint)
    • Line 82: warning: exported method DensityTarget.NCats should have comment or be unexported (golint)
    • CloudForest/entropytarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 20: warning: comment on exported method EntropyTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 58: warning: exported method EntropyTarget.ImpFromCounts should have comment or be unexported (golint)
    • Line 70: warning: comment on exported method EntropyTarget.Impurity should be of the form "Impurity ..." (golint)
    • CloudForest/hdistancetarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 13: warning: don't use underscores in Go names; struct field Pos_class should be PosClass (golint)
    • Line 17: warning: don't use underscores in Go names; func parameter pos_class should be posClass (golint)
    • Line 21: warning: comment on exported method HDistanceTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 38: warning: exported method HDistanceTarget.HDist should have comment or be unexported (golint)
    • Line 46: warning: don't use underscores in Go names; var total_0 should be total0 (golint)
    • Line 47: warning: don't use underscores in Go names; var total_1 should be total1 (golint)
    • Line 65: warning: exported method HDistanceTarget.FindPredicted should have comment or be unexported (golint)
    • Line 67: warning: don't use underscores in Go names; var prob_true should be probTrue (golint)
    • Line 82: warning: comment on exported method HDistanceTarget.Impurity should be of the form "Impurity ..." (golint)
    • CloudForest/adacosttarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 35: warning: comment on exported method AdaCostTarget.SetCosts should be of the form "SetCosts ..." (golint)
    • Line 131: warning: receiver name t should be consistent with previous receiver name target for AdaCostTarget (golint)
    • CloudForest/featureinterfaces.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 9: warning: don't use underscores in Go names; const constant_cutoff should be constantCutoff (golint)
    • Line 98: warning: exported type TargetWithIntercept should have comment or be unexported (golint)
    • CloudForest/forestwriter.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 41: warning: comment on exported method ForestWriter.WriteTreeHeader should be of the form "WriteTreeHeader ..." (golint)
    • Line 50: warning: comment on exported method ForestWriter.WriteForestHeader should be of the form "WriteForestHeader ..." (golint)
    • CloudForest/numadaboostingtarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 7: warning: comment on exported type NumAdaBoostTarget should be of the form "NumAdaBoostTarget ..." (with optional leading article) (golint)
    • Line 17: warning: exported function NewNumAdaBoostTarget should have comment or be unexported (golint)
    • Line 21: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 29: warning: comment on exported method NumAdaBoostTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 54: warning: comment on exported method NumAdaBoostTarget.Impurity should be of the form "Impurity ..." (golint)
    • Line 67: warning: comment on exported method NumAdaBoostTarget.Boost should be of the form "Boost ..." (golint)
    • Line 80: warning: receiver name t should be consistent with previous receiver name target for NumAdaBoostTarget (golint)
    • CloudForest/utils.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 13: warning: exported function ParseFloat should have comment or be unexported (golint)
    • CloudForest/adaboosttarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 115: warning: receiver name t should be consistent with previous receiver name target for AdaBoostTarget (golint)
    • CloudForest/densecatfeature.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 59: warning: exported method DenseCatFeature.OneHot should have comment or be unexported (golint)
    • Line 945: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 963: warning: comment on exported method DenseCatFeature.MoveCountsRtoL should be of the form "MoveCountsRtoL ..." (golint)
    • Line 964: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 981: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1013: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1024: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1032: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1056: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1070: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • Line 1081: warning: receiver name target should be consistent with previous receiver name f for DenseCatFeature (golint)
    • CloudForest/gradboosttarget.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 16: warning: exported function NewGradBoostTarget should have comment or be unexported (golint)
    • Line 39: warning: exported method GradBoostTarget.Intercept should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method GradBoostTarget.Boost should be of the form "Boost ..." (golint)
    • Line 64: warning: receiver name target should be consistent with previous receiver name f for GradBoostTarget (golint)
    • Line 74: warning: exported method GradBoostTarget.Sum should have comment or be unexported (golint)
    • Line 74: warning: receiver name target should be consistent with previous receiver name f for GradBoostTarget (golint)
    • Line 82: warning: exported function FriedmanScore should have comment or be unexported (golint)
    • Line 95: warning: comment on exported method GradBoostTarget.SplitImpurity should be of the form "SplitImpurity ..." (golint)
    • Line 97: warning: receiver name target should be consistent with previous receiver name f for GradBoostTarget (golint)
    • Line 106: warning: exported method GradBoostTarget.UpdateSImpFromAllocs should have comment or be unexported (golint)
    • Line 106: warning: receiver name target should be consistent with previous receiver name f for GradBoostTarget (golint)
    • CloudForest/numballotbox.go
    • Line 1: warning: don't use MixedCaps in package name; CloudForest should be cloudforest (golint)
    • Line 10: warning: comment on exported type NumBallotBox should be of the form "NumBallotBox ..." (with optional leading article) (golint)
    • Line 16: warning: comment on exported function NewNumBallotBox should be of the form "NewNumBallotBox ..." (golint)
    • Line 35: warning: comment on exported method NumBallotBox.TallyNum should be of the form "TallyNum ..." (golint)
    • Line 42: warning: exported method NumBallotBox.Tally should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method NumBallotBox.TallySquaredError should be of the form "TallySquaredError ..." (golint)
    • Line 84: warning: comment on exported method NumBallotBox.TallyError should be of the form "TallyError ..." (golint)
    • Line 113: warning: comment on exported method NumBallotBox.TallyR2Score should be of the form "TallyR2Score ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • CloudForest/utils/toafm/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/ryanbressler/CloudForest (invalid package name: "") (ineffassign)
    • Line 11: warning: "strings" imported but not used (ineffassign)
    • CloudForest/growforest/growforest.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/ryanbressler/CloudForest (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/ryanbressler/CloudForest/stats (invalid package name: "") (ineffassign)
    • Line 31: warning: costs declared but not used (ineffassign)
    • Line 33: warning: dentropy declared but not used (ineffassign)
    • Line 35: warning: adacosts declared but not used (ineffassign)
    • Line 38: warning: rfweights declared but not used (ineffassign)
    • CloudForest/sortablefeature.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/ryanbressler/CloudForest/sortby (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/ryanbressler/CloudForest/sortby (invalid package name: "") (ineffassign)

misspell64%

Misspell Finds commonly misspelled English words

    • CloudForest/sampeling.go
    • Line 17: warning: "initalizes" is a misspelling of "initializes" (misspell)
    • Line 47: warning: "origional" is a misspelling of "original" (misspell)
    • Line 54: warning: "initalized" is a misspelling of "initialized" (misspell)
    • CloudForest/transduction.go
    • Line 11: warning: "embeded" is a misspelling of "embedded" (misspell)
    • Line 101: warning: "diffrent" is a misspelling of "different" (misspell)
    • Line 101: warning: "diffrent" is a misspelling of "different" (misspell)
    • Line 105: warning: "origional" is a misspelling of "original" (misspell)
    • CloudForest/data_test.go
    • Line 11: warning: "predictible" is a misspelling of "predictable" (misspell)
    • Line 110: warning: "Denisty" is a misspelling of "Density" (misspell)
    • Line 208: warning: "clasification" is a misspelling of "clarification" (misspell)
    • Line 287: warning: "clasification" is a misspelling of "clarification" (misspell)
    • Line 301: warning: "clasification" is a misspelling of "clarification" (misspell)
    • Line 315: warning: "clasification" is a misspelling of "clarification" (misspell)
    • CloudForest/growforest/growforest.go
    • Line 119: warning: "percision" is a misspelling of "precision" (misspell)
    • Line 122: warning: "percision" is a misspelling of "precision" (misspell)
    • Line 497: warning: "postive" is a misspelling of "positive" (misspell)
    • Line 501: warning: "postive" is a misspelling of "positive" (misspell)
    • Line 698: warning: "ouput" is a misspelling of "output" (misspell)
    • Line 958: warning: "Percision" is a misspelling of "Precision" (misspell)