Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MaxHalford/xgp
/ functions
Functions
428 in github.com/MaxHalford/xgp
⨍
Functions
428
◇
Types & classes
75
↓ 60 callers
Method
Run
(t *testing.T)
metrics/metric_test_case.go:22
↓ 45 callers
Method
Simplify
()
op/operator.go:17
↓ 24 callers
Method
Arity
()
op/operator.go:14
↓ 23 callers
Method
Eval
(X [][]float64)
op/operator.go:13
↓ 21 callers
Method
Apply
( minHeight uint, maxHeight uint, newOp func(leaf bool, rng *rand.Rand) op.Operator, rng *rand.Rand,
init.go:11
↓ 18 callers
Method
Diff
(i uint)
op/operator.go:18
↓ 17 callers
Method
Apply
(yTrue, yPred, weights []float64)
metrics/metric.go:7
↓ 17 callers
Method
Name
()
op/operator.go:19
↓ 17 callers
Method
String
()
op/operator.go:20
↓ 15 callers
Function
MakeConfusionMatrix
MakeConfusionMatrix returns a ConfusionMatrix from a slice of true classes and another slice of predicted classes.
metrics/confusion_matrix.go:132
↓ 13 callers
Method
Classes
Classes returns a slice of classes included in a ConfusionMatrix. The result is ordered in ascending order.
metrics/confusion_matrix.go:21
↓ 12 callers
Method
Operand
(i uint)
op/operator.go:15
↓ 11 callers
Function
parenthesize
(op Operator)
op/display.go:90
↓ 10 callers
Function
walk
walk performs tree traversal on an Operator and applies a given function to each suboperator. The given function specifies if the traversal should sto
op/operator.go:26
↓ 9 callers
Method
TruePositives
TruePositives returns the number of times a class was correctly predicted.
metrics/confusion_matrix.go:35
↓ 8 callers
Method
Predict
(X [][]float64, proba bool)
cmd/xgp/cmd/model.go:4
↓ 8 callers
Method
SetOperand
(i uint, op Operator)
op/operator.go:16
↓ 8 callers
Method
String
()
metrics/metric.go:11
↓ 7 callers
Method
BestProgram
BestProgram returns the GP's best obtained Program.
gp.go:48
↓ 7 callers
Method
Classification
()
metrics/metric.go:8
↓ 7 callers
Method
NeedsProbabilities
()
metrics/metric.go:10
↓ 7 callers
Function
newRand
newRand returns a new random number generator with a random seed.
util.go:11
↓ 6 callers
Method
FalseNegatives
FalseNegatives returns the number of times a class was wrongly not predicted.
metrics/confusion_matrix.go:61
↓ 5 callers
Function
Count
Count returns the number of Operators that match a condition.
op/operator.go:63
↓ 5 callers
Method
FalsePositives
FalsePositives returns the number of times a class was wrongly predicted.
metrics/confusion_matrix.go:45
↓ 5 callers
Method
NewGP
NewGP returns an GP from a GPConfig.
gp_config.go:82
↓ 4 callers
Method
Fit
Fit an GP to a dataset.
gp.go:108
↓ 4 callers
Method
Mutate
Mutate is required to implement eaopt.Genome.
ga.go:36
↓ 4 callers
Function
dataFrameToFloat64
dataFrameToFloat64 converts a dataframe.DataFrame to a slice of float64 slices.
cmd/xgp/cmd/util.go:29
↓ 4 callers
Function
fmtScore
(score float64)
metrics/metric_test_case.go:18
↓ 4 callers
Function
readFile
readFile loads a file with the appropriate method based on the file's extension.
cmd/xgp/cmd/io.go:23
↓ 4 callers
Function
safeDiv
(a, b float64)
op/inv.go:5
↓ 3 callers
Method
Apply
(Operator)
op/display.go:10
↓ 3 callers
Method
Evaluate
Evaluate is required to implement eaopt.Genome.
ga.go:12
↓ 3 callers
Function
NewDefaultGPConfig
NewDefaultGPConfig returns a GPConfig with default values.
gp_config.go:195
↓ 3 callers
Function
expit
Logistic function.
meta/gradient_boosting.go:70
↓ 3 callers
Function
readModel
(path string)
cmd/xgp/cmd/io.go:79
↓ 3 callers
Function
removeString
removeString is a pure function to remove a slice from a slice.
cmd/xgp/cmd/util.go:6
↓ 2 callers
Method
BiggerIsBetter
()
metrics/metric.go:9
↓ 2 callers
Function
CountOps
CountOps returns the number of Operators in an Operator.
op/operator.go:75
↓ 2 callers
Method
Gradients
(yTrue, yPred []float64)
metrics/metric.go:17
↓ 2 callers
Method
NClasses
NClasses returns the number of classes in a ConfusionMatrix.
metrics/confusion_matrix.go:15
↓ 2 callers
Function
ParseFunc
ParseFunc parses a name and returns the corresponding Operator.
op/serial.go:10
↓ 2 callers
Method
Predict
Predict predicts the output of a slice of features.
program.go:35
↓ 2 callers
Function
Select
Select returns the nth Operator in an Operator.
op/operator.go:111
↓ 2 callers
Method
Solve
(f func(x float64) float64)
meta/line_search.go:10
↓ 2 callers
Function
clip
(f, min, max float64)
metrics/util.go:51
↓ 2 callers
Function
containsString
containsString checks if a string is in a slice.
cmd/xgp/cmd/util.go:18
↓ 2 callers
Function
countDistinct
countDistinct returns the number of unique elements in a slice of float64s.
util.go:34
↓ 2 callers
Function
fmtDuration
fmtDuration the "hours:minutes:seconds" representation of a time.Duration.
util.go:45
↓ 2 callers
Function
fmtDuration
fmtDuration the "hours:minutes:seconds" representation of a time.Duration.
meta/util.go:18
↓ 2 callers
Function
munge
(data)
cmd/xgp/examples/titanic/create_datasets.py:7
↓ 2 callers
Method
newOperator
(rng *rand.Rand)
gp.go:228
↓ 2 callers
Method
newVar
(rng *rand.Rand)
gp.go:212
↓ 2 callers
Function
polishProgram
(prog Program, rng *rand.Rand)
polish.go:12
↓ 2 callers
Method
progress
(start time.Time)
gp.go:55
↓ 2 callers
Function
randomInts
Sample k unique integers in range [min, max) using reservoir sampling, specifically Vitter's Algorithm R.
meta/util.go:30
↓ 2 callers
Function
selectCols
(X [][]float64, cols []int)
meta/util.go:44
↓ 2 callers
Method
shouldMonitor
(round uint)
meta/gradient_boosting.go:88
↓ 2 callers
Function
sign
(y []float64)
meta/gradient_boosting.go:78
↓ 2 callers
Method
simplify
The Add operator is symmetric so we have to check u+v as well as v+u.
op/add.go:49
↓ 2 callers
Method
simplify
The Mul operator is symmetric so we have to check u*v as well as v*u.
op/mul.go:49
↓ 1 callers
Function
CalcHeight
CalcHeight returns the height of an Operator. The height of an Operator is the height of it's root node. The height of a node is the number of edges o
op/operator.go:51
↓ 1 callers
Method
Crossover
Crossover is required to implement eaopt.Genome.
ga.go:59
↓ 1 callers
Method
Error
()
cmd/xgp/cmd/errors.go:9
↓ 1 callers
Method
Fit
Fit iteratively trains a GP on the gradient of the loss.
meta/gradient_boosting.go:116
↓ 1 callers
Function
GetConsts
GetConsts returns the Consts contained in an Operator. Pre-order traversal is used.
op/operator.go:191
↓ 1 callers
Method
MarshalJSON
MarshalJSON serializes a Program.
program.go:74
↓ 1 callers
Method
Name
Name of Const is it's value.
op/const.go:47
↓ 1 callers
Method
Name
Name of Var is "xi" where i is the Var's Index.
op/var.go:47
↓ 1 callers
Method
Predict
Predict accumulates the predictions of each stored Program.
meta/gradient_boosting.go:309
↓ 1 callers
Method
PredictPartial
PredictPartial is a convenience function on top of Predict to make predictions on a single instance.
gp.go:198
↓ 1 callers
Function
Replace
Replace replaces an Operator if a given condition is met.
op/operator.go:153
↓ 1 callers
Function
ReplaceAt
ReplaceAt replaces op's suboperator at position pos.
op/operator.go:178
↓ 1 callers
Function
Sample
Sample returns a random suboperator.
op/operator.go:127
↓ 1 callers
Function
SetConsts
SetConsts sets the value of each Const. Pre-order traversal is used.
op/operator.go:206
↓ 1 callers
Method
TrueNegatives
TrueNegatives returns the number of times a class was correctly not predicted.
metrics/confusion_matrix.go:78
↓ 1 callers
Method
UnmarshalJSON
UnmarshalJSON parses a Program.
program.go:82
↓ 1 callers
Method
Validate
Validate is necessary to implement eaopt.Model.
ga.go:112
↓ 1 callers
Method
bestRound
bestRound returns the number of the round where the validation score is the lowest. If there are no validation scores then the number of the round wit
meta/gradient_boosting.go:95
↓ 1 callers
Method
classification
Classification determines if the Program has to perform classification or not. It does so by looking at the GP's LossMetric.
program.go:25
↓ 1 callers
Function
mean
mean computes the mean of a float64 slice.
meta/util.go:10
↓ 1 callers
Method
mutateOperator
(operator op.Operator, rng *rand.Rand)
gp.go:252
↓ 1 callers
Method
newConst
(rng *rand.Rand)
gp.go:206
↓ 1 callers
Function
newFitCmd
()
cmd/xgp/cmd/fit.go:235
↓ 1 callers
Method
newFunction
(rng *rand.Rand)
gp.go:216
↓ 1 callers
Method
newFunctionOfArity
(arity uint, rng *rand.Rand)
gp.go:220
↓ 1 callers
Function
newPredictCmd
()
cmd/xgp/cmd/predict.go:75
↓ 1 callers
Method
newProgram
(rng *rand.Rand)
gp.go:245
↓ 1 callers
Function
newScoreCmd
()
cmd/xgp/cmd/score.go:60
↓ 1 callers
Function
newToDOTCmd
()
cmd/xgp/cmd/todot.go:67
↓ 1 callers
Method
polishBest
polishBest takes the best Program and polishes it.
gp.go:88
↓ 1 callers
Function
randInt
randInt returns a random int in [min, max].
util.go:16
↓ 1 callers
Function
readCSV
readCSV loads a CSV file.
cmd/xgp/cmd/io.go:38
↓ 1 callers
Function
selectRows
(X [][]float64, rows []int)
meta/util.go:52
↓ 1 callers
Function
writeGradientBoosting
(gb *meta.GradientBoosting, path string)
cmd/xgp/cmd/io.go:67
↓ 1 callers
Function
writeProgram
(prog xgp.Program, path string)
cmd/xgp/cmd/io.go:55
Method
Apply
Apply FullInit returns an Operator of height maxHeight, hence minHeight is not taken into account.
init.go:24
Method
Apply
Apply GrowInit.
init.go:43
Method
Apply
Apply RampedHaldAndHalfInit.
init.go:68
next →
1–100 of 428, ranked by callers