-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## 16.03.2019 | ||
|
||
Transformation functions are introduced. Before this step `leaves` was able to output only raw predictions. Here is new bool option named `loadTransformation` adedd to all model load functions: `XGEnsembleFromReader`, `XGEnsembleFromFile`, `XGBLinearFromReader`, `XGBLinearFromFile`, `SKEnsembleFromReader`, `SKEnsembleFromFile`, `LGEnsembleFromJSON`, `LGEnsembleFromReader`, `LGEnsembleFromFile`. | ||
|
||
For example, line: | ||
```go | ||
model, err := leaves.LGEnsembleFromFile("lg_breast_cancer.model") | ||
``` | ||
|
||
Should be changed to: | ||
```go | ||
model, err := leaves.LGEnsembleFromFile("lg_breast_cancer.model", false) | ||
``` | ||
|
||
if one wants to leave old behaviour. | ||
|
||
|
||
Also, `NClasses` `Ensemble` method will be renamed to `NRawOutputGroups` while keeping the same meaning - number of values that model provides for every object in raw predictions. There is also added `NOutputGroups` - number of values that model provides for every object after applying transformation function. Generally, that means that transformation function can change outputs dimensionality. Please note, if current transformation funciton is `raw`: | ||
|
||
```go | ||
model.Transformation().Name() == "raw" | ||
``` | ||
|
||
then | ||
|
||
```go | ||
model.RawOutputGroups() == model.NOutputGroups() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters