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

[#23] - Feature/methods describer #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Conradox
Copy link
Contributor

Neste PR está a primeira definição do que seria o descritor dos métodos junto a uma função que possibilita a filtragem dos métodos com base nas características desejadas.
Alguns exemplos do uso dessa função:

###Comando
methodsFilter(:problem_type => :Classification)
###Output
# Generate_blobs
number of features: Dynamic
amount of samples: Dynamic
problem type: Classification
###Comando
methodsFilter(:problem_type => :Regression)
###Output
# Generate_s_curve
number of features: 2
amount of samples: Dynamic
problem type: Regression
###Comando
methodsFilter(:problem_typee => :Classification)
###Output
┌ Warning: problem_typee isn't a property of MethodDescriber
└ @ Main ~/Codes/JULIA/SyntheticDatasets.jl/src/descriptor.jl:48

Para adição de mais características na filtragem é só usar como argumento um array de pares.

methodsFilter([problem_type => :Classification, n_features => :Dynamic])

@Conradox Conradox added the enhancement New feature or request label Sep 10, 2020
@filipebraida
Copy link
Contributor

@Conradox Conradox linked an issue Sep 10, 2020 that may be closed by this pull request
@Conradox Conradox changed the title Feature/methods describer [#23] - Feature/methods describer Sep 10, 2020
@codecov
Copy link

codecov bot commented Sep 10, 2020

Codecov Report

Merging #31 into master will decrease coverage by 24.74%.
The diff coverage is 27.27%.

Impacted file tree graph

@@             Coverage Diff              @@
##            master      #31       +/-   ##
============================================
- Coverage   100.00%   75.25%   -24.75%     
============================================
  Files            3        4        +1     
  Lines           62       97       +35     
============================================
+ Hits            62       73       +11     
- Misses           0       24       +24     
Impacted Files Coverage Δ
src/SyntheticDatasets.jl 100.00% <ø> (ø)
src/descriptor.jl 27.27% <27.27%> (ø)
src/sklearn.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8323b30...e961698. Read the comment docs.

@filipebraida
Copy link
Contributor

Poderia ter um campo do tipo Function que é o link para função

@nicolasmagalhaes
Copy link
Member

e se o método filtrasse por string usando o occursin(), assim não dependendo de categorias predefinidas e sendo mais intuitivo de buscar o que cada um procura? funcionaria como um ctrl + f

@Conradox
Copy link
Contributor Author

Conradox commented Sep 10, 2020

e se o método filtrasse por string usando o occursin(), assim não dependendo de categorias predefinidas e sendo mais intuitivo de buscar o que cada um procura? funcionaria como um ctrl + f

Eu acho que isso pode gerar problemas, algum tipo de erro, pois parâmetros errados podem passar despercebidos e serem levados em consideração na filtragem dos métodos. Acho melhor só transformar o inputs e as propriedades dos métodos usando o lowercase e comparar eles.

src/descriptor.jl Outdated Show resolved Hide resolved
src/descriptor.jl Outdated Show resolved Hide resolved
src/descriptor.jl Show resolved Hide resolved
src/descriptor.jl Outdated Show resolved Hide resolved
src/descriptor.jl Show resolved Hide resolved

methodsFilter(parameters::Union{Pair, Array{Pair}}) = methodsFilter(METHODS, parameters)

function Base.show(io::IO, methods::MethodDescriberSet)
Copy link
Contributor

Choose a reason for hiding this comment

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

eu percebi que está imprimindo com vários \n no final.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isso deve ser por causa dos println. Mas fiz isso pra separar em linhas distintas as características.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Criação de uma estrutura que irá listar todos os métodos
3 participants