Intro to Errors
Errors contains statistical error functions.
Currently there are no functions or classes to get error regarding classifiers
Usage
Premade Errors
Errors comes with a lot of error functions already implemented. Following are the functions that comes pre loaded with Errors:
- error :- Returns a list of y^ - y,
- MAE,
- MSE,
- RSS,
- RSME
Custom Error
You can use StatError class to create a custom error.
Note: While creating custom error do not use anonymous functions
You can use StatError class’s object to create a custom error.
-
use(func: Function): StatErrorReturn : Takes in a function and use it to transform loss value for each row. Can’t be chained,
-
apply(func: Function): StatErrorReturn : Takes in a function and use it to compute result value. Can be chained.
Note: You should always pass a named function inside use and apply or else they’ll throw Error
Example
The RSS error function is implemented as follows:
Extra Funtions
Errors comes with 3 more extra functions
- mean,
- sum,
- square
You can use these instead of creating one from scratch.