Improve and generalize estimator interface.
This commit is contained in:
+10
-2
@@ -232,13 +232,21 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
a, b := review.FitPowerLaw(weights, reps, date, 14.0)
|
||||
//a, b := review.FitPowerLaw(weights, reps, date, 14.0)
|
||||
est, err := review.Fit(weights, reps, date,
|
||||
review.WithAllModels(),
|
||||
review.WithHalfLife(14.0),
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Printf("Error estimating performance: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
for i := 1; i<=10; i++ {
|
||||
adj := 0.0
|
||||
if isbw {
|
||||
adj = ps[len(ps)-1].Bodyweight
|
||||
}
|
||||
fmt.Printf("%d: %0.0f\n", i, review.EstimateMaxWeight(a, b, float64(i)) - adj)
|
||||
fmt.Printf("%d: %0.0f\n", i, est.EstimateMaxWeight(float64(i)) - adj)
|
||||
}
|
||||
case "predict":
|
||||
if flag.NArg() != 3 {
|
||||
|
||||
Reference in New Issue
Block a user