Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ df = pd.DataFrame({
})

# Apply MCGrad
mcboost = methods.MCBoost()
mcboost.fit(
mcgrad = methods.MCGrad()
mcgrad.fit(
df_train=df,
prediction_column_name='prediction',
label_column_name='label',
categorical_feature_column_names=['country', 'content_type']
)

# Get calibrated predictions
calibrated_predictions = mcboost.predict(
calibrated_predictions = mcgrad.predict(
df=df,
prediction_column_name='prediction',
categorical_feature_column_names=['country', 'content_type']
Expand Down
10 changes: 5 additions & 5 deletions website/docs/api/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For detailed Python API documentation with docstrings, please refer to the sourc

```python
from multicalibration import methods
help(methods.MCBoost)
help(methods.MCGrad)
```
:::

Expand All @@ -26,12 +26,12 @@ MCGrad takes base model predictions and features, then builds a lightweight cali
### Basic Usage

```python
from multicalibration.methods import MCBoost
from multicalibration.methods import MCGrad
import pandas as pd
import numpy as np

# Initialize MCGrad
mcboost = MCBoost(
mcgrad = MCGrad(
num_rounds=100,
learning_rate=0.1,
max_depth=3
Expand All @@ -47,7 +47,7 @@ df_train = pd.DataFrame({
})

# Fit on training data
mcboost.fit(
mcgrad.fit(
df_train=df_train,
prediction_column_name='prediction',
label_column_name='label',
Expand All @@ -56,7 +56,7 @@ mcboost.fit(
)

# Get calibrated predictions
calibrated_preds = mcboost.predict(
calibrated_preds = mcgrad.predict(
df=df_train,
prediction_column_name='prediction',
categorical_feature_column_names=['country', 'content_type'],
Expand Down
4 changes: 2 additions & 2 deletions website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ df = pd.DataFrame({
})

# Verify MCGrad can be instantiated and fit
mcboost = methods.MCBoost()
mcboost.fit(
mcgrad = methods.MCGrad()
mcgrad.fit(
df_train=df,
prediction_column_name='prediction',
label_column_name='label',
Expand Down
2 changes: 1 addition & 1 deletion website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MCGrad takes your base model's predictions and automatically finds and fixes mis
```python
from multicalibration import methods

mcgrad = methods.MCBoost()
mcgrad = methods.MCGrad()
mcgrad.fit(
df_train=df,
prediction_column_name='prediction',
Expand Down
6 changes: 3 additions & 3 deletions website/docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ df = pd.DataFrame({
})

# Apply MCGrad
mcboost = methods.MCBoost()
mcboost.fit(
mcgrad = methods.MCGrad()
mcgrad.fit(
df_train=df,
prediction_column_name='prediction',
label_column_name='label',
categorical_feature_column_names=['country', 'content_type', 'surface']
)

# Get calibrated predictions
calibrated_predictions = mcboost.predict(
calibrated_predictions = mcgrad.predict(
df=df,
prediction_column_name='prediction',
categorical_feature_column_names=['country', 'content_type', 'surface']
Expand Down
8 changes: 4 additions & 4 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Feature = ({title, content}) => {
);
};

const codeExample = `from multicalibration import MCBoost
const codeExample = `from multicalibration import MCGrad
import pandas as pd
import numpy as np

Expand All @@ -58,16 +58,16 @@ df = pd.DataFrame({
})

# Train MCGrad
mcboost = MCBoost()
mcboost.fit(
mcgrad = MCGrad()
mcgrad.fit(
df_train=df,
prediction_column_name='prediction',
label_column_name='label',
categorical_feature_column_names=['country', 'content_type', 'surface']
)

# Get multi-calibrated predictions
calibrated_predictions = mcboost.predict(
calibrated_predictions = mcgrad.predict(
df=df,
prediction_column_name='prediction',
categorical_feature_column_names=['country', 'content_type', 'surface']
Expand Down