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

I added MLP probability #206

Closed
wants to merge 17 commits into from
Closed

I added MLP probability #206

wants to merge 17 commits into from

Conversation

dipak5053
Copy link
Collaborator

No description provided.

@zelioluca
Copy link
Collaborator

sorry for this .idea/misc.xml

@zelioluca zelioluca requested a review from nmaarnio October 25, 2023 09:27
@zelioluca
Copy link
Collaborator

I made also some test

@zelioluca
Copy link
Collaborator

But I think I got old PR there was not some file I put there yesterday

@zelioluca zelioluca self-assigned this Oct 25, 2023
Copy link
Collaborator

@nmaarnio nmaarnio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Luca, there are still some style stuff that needs to taken care of. Also I was wondering about keeping training and predicting separate, but maybe I misunderstood some logic? And MLP was now done in sklearn and not keras apparently? Thanks for delivering this one fast!

eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
elif cross_validation_type == "SKFOLD":
return StratifiedKFold(n_splits=number_of_split, shuffle=True)
else:
raise InvalidCrossValidationSelected
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too InvalidParameterValueException

eis_toolkit/deep_learning/mlp_function.py Outdated Show resolved Hide resolved
@zelioluca
Copy link
Collaborator

zelioluca commented Oct 26, 2023 via email

@nmaarnio
Copy link
Collaborator

I can't comment much about how many phases there should be, but I'd prefer if there are no custom classes. It's easier for the plugin to just call some functions that produce relevant output and also keeps the toolkit consistent since we haven't been creating own classes so far

@zelioluca
Copy link
Collaborator

I f we put three fuunction there in mlp it is ok?

@nmaarnio
Copy link
Collaborator

Should be fine I guess. If they are public so user is supposed to call them directly, just make sure they represent logical steps. If they are private helper functions then there's no problem and there could be even more if you see fit

@zelioluca zelioluca force-pushed the add_MLP_probability branch from 498a8b4 to e4c7bc5 Compare October 26, 2023 09:46
@zelioluca zelioluca force-pushed the add_MLP_probability branch from e4c7bc5 to b3544f6 Compare October 26, 2023 10:03
@zelioluca
Copy link
Collaborator

I try to finish it by this evening

@zelioluca zelioluca force-pushed the add_MLP_probability branch from b3544f6 to b6252aa Compare October 26, 2023 10:49
@zelioluca
Copy link
Collaborator

I put all the function separately, but I left alsoi the one with all in one just in case

@zelioluca zelioluca requested a review from nmaarnio October 26, 2023 10:52
@zelioluca
Copy link
Collaborator

let s check the functions before we do for nothing

@nmaarnio
Copy link
Collaborator

Would it make sense to have just two functions, one for training and one for predicting? The training would take care of evaluation too automatically and have more parameters. What do you think if you take a look at what I did in PR #210 ? Just thinking whats the best way to pack these steps. And did you leave the cross-validation loop out on purpose in the new functions?

@zelioluca
Copy link
Collaborator

zelioluca commented Oct 26, 2023 via email

@nmaarnio
Copy link
Collaborator

Sorry but I'm out of office tomorrow and gotta stop working soon, so I don't think I have time to review this again this week. Maybe you can do make some style preparations for the other functions in the meanwhile.

But regarding how to separate these functions, I think something in between these 3 functions and the 1 original function could work. Did you look at the PR I linked? I think the big function you put first was pretty good, but I was just thinking maybe leaving the predictions in the end out if that makes sense? To create, train and validate a model as step 1, and then when the user is happy the model they created they call a different function to predict with unseen data

@zelioluca
Copy link
Collaborator

zelioluca commented Oct 26, 2023 via email

@zelioluca
Copy link
Collaborator

Niko I added two more function let's see which ones are better!

@nmaarnio
Copy link
Collaborator

Hey Luca! Thanks for the update, I took a quick look now and looks pretty good now. I'm thinking about the function interfaces still a little bit. Is your CNN code somewhat similar than this? I am wondering would it make sense to include the CNN code to this PR and look at all of this at the same time 🤔. Also @msmiyels , if you got time beginning of this week, you could take a look at these functions too if you have some ideas!

@zelioluca
Copy link
Collaborator

zelioluca commented Oct 30, 2023 via email

@nmaarnio
Copy link
Collaborator

Yea it can use tensorflow (so keras?). Do you think MLP should still use sklearn or keras too? But if this idea is ok to you, go ahead and include some CNN code in this PR too and maybe it will be easier to pack all of them in a clever way!

@zelioluca
Copy link
Collaborator

zelioluca commented Oct 30, 2023 via email

@zelioluca
Copy link
Collaborator

zelioluca commented Oct 30, 2023 via email

@nmaarnio
Copy link
Collaborator

Yeah no hurry! Tomorrow or even later is ok

@zelioluca
Copy link
Collaborator

I did all the necessary function for the CNN / MLP. I need to implement exception and test and I m ready for the PR!

@zelioluca
Copy link
Collaborator

ahh I also need to tun it couple of tiime as well :-)

@zelioluca
Copy link
Collaborator

hey niko I got this bear type I do not have idea how to fix it

beartype.roar.BeartypeDecorHintNonpepException: Function main.convolutional_body_of_the_cnn() parameter "input_layer" type hint <function Input at 0x7f9d23009f30> either PEP-noncompliant or currently unsupported by @beartype.

@zelioluca
Copy link
Collaborator

without bear type is working now

@zelioluca zelioluca added the modification Change to an existing feature label Nov 1, 2023
@zelioluca
Copy link
Collaborator

OK man I m ready to check the code with you! I removed some bear type cos were little bit pahaa

@nmaarnio
Copy link
Collaborator

nmaarnio commented Nov 3, 2023

Hi Luca, I've been a bit busy but maybe I can get you some comments today, sorry for the wait.

@zelioluca
Copy link
Collaborator

zelioluca commented Nov 3, 2023 via email

@zelioluca
Copy link
Collaborator

What we do here with this big boy???? :-)

@nmaarnio
Copy link
Collaborator

nmaarnio commented Nov 8, 2023

Hey I was just about to say me and Mika finished creating the new CNN and MLP functions. It doesnt include yet multimodal approach and some other stuff I wrote as comments in the beginning of the file. So theres a new file, I didn't modify any of your work even if our functions are based on it. You can already take a look if you want and comment! Still thinking how to best include hyperparameter optimization and CV (although how often is CV used for these methods?)

@zelioluca
Copy link
Collaborator

zelioluca commented Nov 8, 2023 via email

@nmaarnio
Copy link
Collaborator

nmaarnio commented Feb 1, 2024

Closing as not relevant anymore

@nmaarnio nmaarnio closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modification Change to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants