Skip to content

Commit

Permalink
Update ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMeissnerDS committed Jun 30, 2023
1 parent 3d32618 commit 64e0b26
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 12 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ y_probs, y_classes = automl.predict(df_val)

#### Explanatory analysis

BlueCast offers a simple way to get a first overview of the data. This is

#### Enable cross-validation

While the default behaviour of BlueCast is to use a simple
train-test-split, cross-validation can be enabled easily:
BlueCast offers a simple way to get a first overview of the data:

```sh
from bluecast.eda.analyse import (
Expand Down Expand Up @@ -138,6 +133,31 @@ correlation_to_target(train_data.loc[
"EC1",)
```

#### Enable cross-validation

While the default behaviour of BlueCast is to use a simple
train-test-split, cross-validation can be enabled easily:

```sh
from bluecast.blueprints.cast import BlueCast
from bluecast.config.training_config import TrainingConfig, XgboostTuneParamsConfig


# Create a custom training config and adjust general training parameters
train_config = TrainingConfig()
train_config.hypertuning_cv_folds = 5 # default is 1

# Pass the custom configs to the BlueCast class
automl = BlueCast(
class_problem="binary",
target_column="target"
conf_training=train_config,
)

automl.fit(df_train, target_col="target")
y_probs, y_classes = automl.predict(df_val)
```

#### Categorical encoding

By default, BlueCast uses target encoding.
Expand Down
32 changes: 26 additions & 6 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ y_probs, y_classes = automl.predict(df_val)

#### Explanatory analysis

BlueCast offers a simple way to get a first overview of the data. This is

#### Enable cross-validation

While the default behaviour of BlueCast is to use a simple
train-test-split, cross-validation can be enabled easily:
BlueCast offers a simple way to get a first overview of the data:

```sh
from bluecast.eda.analyse import (
Expand Down Expand Up @@ -138,6 +133,31 @@ correlation_to_target(train_data.loc[
"EC1",)
```

#### Enable cross-validation

While the default behaviour of BlueCast is to use a simple
train-test-split, cross-validation can be enabled easily:

```sh
from bluecast.blueprints.cast import BlueCast
from bluecast.config.training_config import TrainingConfig, XgboostTuneParamsConfig


# Create a custom training config and adjust general training parameters
train_config = TrainingConfig()
train_config.hypertuning_cv_folds = 5 # default is 1

# Pass the custom configs to the BlueCast class
automl = BlueCast(
class_problem="binary",
target_column="target"
conf_training=train_config,
)

automl.fit(df_train, target_col="target")
y_probs, y_classes = automl.predict(df_val)
```

#### Categorical encoding

By default, BlueCast uses target encoding.
Expand Down

0 comments on commit 64e0b26

Please sign in to comment.