Skip to content

Commit

Permalink
updating instructions to include zprofile
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Feb 17, 2024
1 parent 94c2915 commit 51bb28c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
14 changes: 4 additions & 10 deletions notebooks/Outliers_in_SageWorks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
"cell_type": "code",
"execution_count": 99,
"id": "2b4bacba",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -217,9 +215,7 @@
"cell_type": "code",
"execution_count": 95,
"id": "fea63b62",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -543,9 +539,7 @@
"cell_type": "code",
"execution_count": 98,
"id": "5108a463",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"def generate_data(dist_type, size):\n",
Expand Down Expand Up @@ -651,7 +645,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
12 changes: 7 additions & 5 deletions src/sageworks/algorithms/dataframe/row_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pandas as pd

# SageWorks Imports
from sageworks.algorithms.table.light import feature_spider
from sageworks.algorithms.dataframe import feature_spider


# Class: RowTagger
Expand All @@ -18,7 +18,7 @@ def __init__(
dataframe: pd.DataFrame,
features: list,
id_column: str,
target: str,
target_column: str,
min_dist: float,
min_target_diff: float,
):
Expand All @@ -28,11 +28,13 @@ def __init__(
self.min_target_diff = min_target_diff

# Do a validation check on the dataframe
self.df = dataframe
self.df = dataframe.copy()
self.validate_input_data()

# We need the feature spider for the more advanced tags
self.f_spider = feature_spider.FeatureSpider(self.df, features, id_column=self.id_column, target=target)
self.f_spider = feature_spider.FeatureSpider(self.df, features,
id_column=self.id_column,
target_column=target_column)

# Add a 'tags' column (if it doesn't already exist)
if "tags" not in self.df.columns:
Expand Down Expand Up @@ -120,7 +122,7 @@ def test():
data_df,
features=["feat1", "feat2", "feat3"],
id_column="ID",
target="price",
target_column="price",
min_dist=2.0,
min_target_diff=1.0,
)
Expand Down
2 changes: 1 addition & 1 deletion src/sageworks/utils/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def platform_specific_instructions(self):
).format(self.site_config_path)

elif os_name in ["Linux", "Darwin"]: # Darwin is macOS
shell_files = {"Linux": "~/.bashrc or ~/.profile", "Darwin": "~/.bash_profile, ~/.zshrc, or ~/.profile"}
shell_files = {"Linux": "~/.bashrc or ~/.profile", "Darwin": "~/.bash_profile, ~/.zshrc, or ~/.zprofile"}
instructions = (
"\nTo set the SAGEWORKS_CONFIG environment variable permanently on {}:\n"
"1. Open {} in a text editor.\n"
Expand Down

0 comments on commit 51bb28c

Please sign in to comment.