Documentation ¶
Index ¶
- type LogisticRegression
- func (lr *LogisticRegression) Beta0() *big.Float
- func (lr *LogisticRegression) Beta1() *big.Float
- func (lr *LogisticRegression) BigBeta0() *big.Int
- func (lr *LogisticRegression) BigBeta1() *big.Int
- func (lr *LogisticRegression) PlotSigmoid(xValues, yValues []float64, blockNumber uint64) error
- func (lr *LogisticRegression) Predict(x *big.Float) *big.Float
- func (lr *LogisticRegression) Train(x []*big.Int, y []*big.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogisticRegression ¶
type LogisticRegression struct {
// contains filtered or unexported fields
}
LogisticRegression represents a logistic regression model.
func NewLogisticRegression ¶
func NewLogisticRegression(beta0, beta1 *big.Float) *LogisticRegression
NewLogisticRegression initializes a new LogisticRegression model.
func (*LogisticRegression) Beta0 ¶
func (lr *LogisticRegression) Beta0() *big.Float
Beta0 returns the model's bias (intercept) term.
func (*LogisticRegression) Beta1 ¶
func (lr *LogisticRegression) Beta1() *big.Float
Beta1 returns the model's weight (slope) term.
func (*LogisticRegression) BigBeta0 ¶
func (lr *LogisticRegression) BigBeta0() *big.Int
BigBeta0 returns the model's bias (intercept) term.
func (*LogisticRegression) BigBeta1 ¶
func (lr *LogisticRegression) BigBeta1() *big.Int
BigBeta1 returns the model's weight (slope) term.
func (*LogisticRegression) PlotSigmoid ¶
func (lr *LogisticRegression) PlotSigmoid(xValues, yValues []float64, blockNumber uint64) error
Plot the given trained logistic regression values with Beta0 and Beta1
Click to show internal directories.
Click to hide internal directories.