Computes the [skewness](https://en.wikipedia.org/wiki/Skewness) for sequence.
```
skewPop(expr)
```
**Parameters**
`expr` — [Expression](../syntax.md#syntax-expressions) returning a number.
**Returned value**
The skewness of given distribution. Type — [Float64](../../data_types/float.md)
**Example of Use**
```sql
SELECTskewPop(value)FROMseries_with_value_column
```
## skewSamp
Computes the [sample skewness](https://en.wikipedia.org/wiki/Skewness) for sequence.
It represents an unbiased estimate of the skewness of a random variable, if passed values form it's sample.
```
skewSamp(expr)
```
**Parameters**
`expr` — [Expression](../syntax.md#syntax-expressions) returning a number.
**Returned value**
The skewness of given distribution. Type — [Float64](../../data_types/float.md). If `n <= 1` (`n` is a size of the sample), then the function returns `nan`.
**Example of Use**
```sql
SELECTskewSamp(value)FROMseries_with_value_column
```
## kurtPop
Computes the [kurtosis](https://en.wikipedia.org/wiki/Kurtosis) for sequence.
```
kurtPop(expr)
```
**Parameters**
`expr` — [Expression](../syntax.md#syntax-expressions) returning a number.
**Returned value**
The kurtosis of given distribution. Type — [Float64](../../data_types/float.md)
**Example of Use**
```sql
SELECTkurtPop(value)FROMseries_with_value_column
```
## kurtSamp
Computes the [sample kurtosis](https://en.wikipedia.org/wiki/Kurtosis) for sequence.
It represents an unbiased estimate of the kurtosis of a random variable, if passed values form it's sample.
```
kurtSamp(expr)
```
**Parameters**
`expr` — [Expression](../syntax.md#syntax-expressions) returning a number.
**Returned value**
The kurtosis of given distribution. Type — [Float64](../../data_types/float.md). If `n <= 1` (`n` is a size of the sample), then the function returns `nan`.
Here we also need to insert data into `train_data` table. The number of parameters is not fixed, it depends only on number of arguments, passed into `linearRegressionState`. They all must be numeric values.
Note that the column with target value(which we would like to learn to predict) is inserted as the first argument.
...
...
@@ -671,7 +762,7 @@ To predict we use function `evalMLMethod`, which takes a state as an argument as
evalMLMethod(model, param1, param2) FROM test_data
```
The query will return a column of predicted values. Note that first argument of `evalMLMethod` is `AggregateFunctionState` object, next are columns of features.
`test_data` is a table like `train_data` but may not contain target value.
**Some notes**
...
...
@@ -681,12 +772,12 @@ To predict we use function `evalMLMethod`, which takes a state as an argument as
SELECTstate1+state2FROMyour_models
```
where `your_models` table contains both models. This query will return new `AggregateFunctionState` object.
2. User may fetch weights of the created model for its own purposes without saving the model if no `-State` combinator is used.
Such query will fit the model and return its weights - first are weights, which correspond to the parameters of the model, the last one is bias. So in the example above the query will return a column with 3 values.
Such query will fit the model and return its weights - first are weights, which correspond to the parameters of the model, the last one is bias. So in the example above the query will return a column with 3 values.
## logisticRegression
...
...
@@ -696,8 +787,8 @@ This function implements stochastic logistic regression. It can be used for bina
#### Parameters
Parameters are exactly the same as in stochasticLinearRegression: