Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QuadraticDiscriminantAnalysis #152

Closed
Thilakraj1998 opened this issue Oct 18, 2021 · 6 comments
Closed

Add QuadraticDiscriminantAnalysis #152

Thilakraj1998 opened this issue Oct 18, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest For participants in Hacktoberfest

Comments

@Thilakraj1998
Copy link
Contributor

Add QuadraticDiscriminantAnalysis model into the library.

API Reference for required parameters:
https://scikit-learn.org/stable/modules/generated/sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.html

Dependencies if any, must be appropriately added. Test run of the train function on a classification problem(ClassificationTest.py) must pass, and the function must attempt to train an QuadraticDiscriminantAnalysis as a potential best fit model.

@Thilakraj1998 Thilakraj1998 added enhancement New feature or request good first issue Good for newcomers Hacktoberfest For participants in Hacktoberfest labels Oct 18, 2021
@vikneshwara-r-b
Copy link

vikneshwara-r-b commented Oct 18, 2021

Hello @Thilakraj1998 . Shall I contribute to this issue?

@vikneshwara-r-b
Copy link

vikneshwara-r-b commented Oct 19, 2021

Hi @Thilakraj1998 . I have installed all dependencies in requirements.txt and tensorflow in the autoai repository using cond env. For doing sanity check I executed the ClassificationTest.py , but I recieved the following error.

Traceback (most recent call last): File "/Users/user_name/Desktop/foss/autoai/ClassificationTest.py", line 25, in <module> model=bc.train(file=file_path,target=target,features=features) # function to test AutoAI Process File "/Users/user_name/Desktop/foss/autoai/blobcity/main/driver.py", line 51, in train modelClass = modelSearch(CleanedDF,target,dc) File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 125, in modelSearch best=trainOnFull(dataframe,target,modelsList,trainOnSample(dataframe,target,modelsList,DictClass),DictClass) File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 87, in trainOnSample modelScore={m:cvScore(models[m][0](),X,Y,k) for m in tqdm_notebook(models) } File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 87, in <dictcomp> modelScore={m:cvScore(models[m][0](),X,Y,k) for m in tqdm_notebook(models) } File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 60, in cvScore accuracy = cross_val_score(model, X, Y, cv = k,n_jobs=-2) File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/sklearn/model_selection/_validation.py", line 510, in cross_val_score cv_results = cross_validate( File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/sklearn/model_selection/_validation.py", line 267, in cross_validate results = parallel( File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/parallel.py", line 1056, in __call__ self.retrieve() File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/parallel.py", line 935, in retrieve self._output.extend(job.get(timeout=self.timeout)) File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result return future.result(timeout=timeout) File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/concurrent/futures/_base.py", line 445, in result return self.__get_result() File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result raise self._exception joblib.externals.loky.process_executor.TerminatedWorkerError: A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker. The exit codes of the workers are {SIGSEGV(-11)}

Hardware setup
OS - MacOS Big Sur (Version 11.3.1)
Processor - 2.6Ghz 6 Core Intel Core i7
Memory - 16GB

I have attached the env info in txt file below.How to resolve the issue?

autoai_env.txt

@Thilakraj1998
Copy link
Contributor Author

@vikneshwara-r-b cross_val_score(model, X, Y, cv = k,n_jobs=-2) here -2 is not a valid value for n_job. either number of core present in the system or -1 to consider all cores

@vikneshwara-r-b
Copy link

vikneshwara-r-b commented Oct 19, 2021

@Thilakraj1998 After changing n_jobs=-1 or no of cores present in the system n_jobs=6, I still recieve the same error

Traceback (most recent call last):
File "/Users/user_name/Desktop/foss/autoai/ClassificationTest.py", line 25, in
model=bc.train(file=file_path,target=target,features=features) # function to test AutoAI Process
File "/Users/user_name/Desktop/foss/autoai/blobcity/main/driver.py", line 51, in train
modelClass = modelSearch(CleanedDF,target,dc)
File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 125, in modelSearch
best=trainOnFull(dataframe,target,modelsList,trainOnSample(dataframe,target,modelsList,DictClass),DictClass)
File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 87, in trainOnSample
modelScore={m:cvScore(models[m]0,X,Y,k) for m in tqdm_notebook(models) }
File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 87, in
modelScore={m:cvScore(models[m]0,X,Y,k) for m in tqdm_notebook(models) }
File "/Users/user_name/Desktop/foss/autoai/blobcity/main/modelSelection.py", line 60, in cvScore
accuracy = cross_val_score(model, X, Y, cv = k,n_jobs=-1)
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/sklearn/model_selection/_validation.py", line 510, in cross_val_score
cv_results = cross_validate(
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/sklearn/model_selection/_validation.py", line 267, in cross_validate
results = parallel(
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/parallel.py", line 1056, in call
self.retrieve()
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/parallel.py", line 935, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/concurrent/futures/_base.py", line 445, in result
return self.__get_result()
File "/Users/user_name/opt/miniconda3/envs/autoai/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
joblib.externals.loky.process_executor.TerminatedWorkerError: A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker.

The exit codes of the workers are {SIGSEGV(-11)}

@Thilakraj1998
Copy link
Contributor Author

@vikneshwara-r-b do check the whether the version of joblib is latest

@vikneshwara-r-b
Copy link

Yes.Iam using the latest one

@Thilakraj1998 Thilakraj1998 self-assigned this Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest For participants in Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants