Skip to content

Commit

Permalink
error in veda resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
vishallmaurya committed Aug 17, 2024
1 parent 7e29ccf commit 1054323
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 22 deletions.
21 changes: 11 additions & 10 deletions src/VEDA/Veda.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import BalanceData
import DimensionReducer
import FeatureSelector
import OutlierHandler
import Preprocessor
from .BalanceData import AdaptiveBalancer
from .DimensionReducer import DimensionReducer
from .FeatureSelector import FeatureSelection
from .OutlierHandler import OutlierPreprocessor
from .Preprocessor import DataPreprocessor

import pandas as pd

from sklearn.pipeline import Pipeline
Expand All @@ -12,11 +13,11 @@ class Veda(BaseEstimator, TransformerMixin):
def __init__(self, classification=None):
if classification is None:
raise ValueError("Parameter classification can't be empty")
self.preprocess_data = Preprocessor.DataPreprocessor()
self.outlierhandler = OutlierHandler.OutlierPreprocessor()
self.feature_selection = FeatureSelector.FeatureSelection()
self.reduced_dim = DimensionReducer.DimensionReducer()
self.data_balancing = BalanceData.AdaptiveBalancer(classification=classification)
self.preprocess_data = DataPreprocessor()
self.outlierhandler = OutlierPreprocessor()
self.feature_selection = FeatureSelection()
self.reduced_dim = DimensionReducer()
self.data_balancing = AdaptiveBalancer(classification=classification)
self.X = None
self.y = None
self.outliers = None
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions src/tests/test1.py → tests/test1.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from VEDA import BalanceData
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import BalanceData


def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')
X = df.drop(['price'], axis=1)
y = df['price']

Expand Down
7 changes: 5 additions & 2 deletions src/tests/test2.py → tests/test2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from VEDA import DimensionReducer
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import DimensionReducer

def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')
X = df.drop(['price'], axis=1)
y = df['price']

Expand Down
8 changes: 6 additions & 2 deletions src/tests/test3.py → tests/test3.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from VEDA import FeatureSelector
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import FeatureSelector

def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')

X = df.drop(['price'], axis=1)
y = df['price']

Expand Down
8 changes: 6 additions & 2 deletions src/tests/test4.py → tests/test4.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from VEDA import OutlierHandler
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import OutlierHandler

def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')

X = df.drop(['price'], axis=1)
y = df['price']

Expand Down
8 changes: 6 additions & 2 deletions src/tests/test5.py → tests/test5.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from VEDA import Preprocessor
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import Preprocessor

def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')

X = df.drop(['price'], axis=1)
y = df['price']

Expand Down
6 changes: 4 additions & 2 deletions src/tests/test6.py → tests/test6.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from VEDA import Veda
import pytest
import pandas as pd
from sklearn.base import BaseEstimator
import sys
sys.path.insert(0, '../src')
from VEDA import Veda

def test():
df = pd.read_csv('src\\tests\sample_data\sample.csv')
df = pd.read_csv('tests\sample_data\sample.csv')
X = df.drop(['price'], axis=1)
y = df['price']

Expand Down

0 comments on commit 1054323

Please sign in to comment.