karlvmsousa / in1102-machine-learning Goto Github PK
View Code? Open in Web Editor NEWDisciplina IN1102 - 🤖 Aprendizadem de Máquina 🤖, da pós-graduação no CIn - UFPE.
Disciplina IN1102 - 🤖 Aprendizadem de Máquina 🤖, da pós-graduação no CIn - UFPE.
Considering the accuracy obtained by the repeated k-folds, show a point estimate and its confidence interval:
IC ( μ, (1-⍺/2)% ) = μ - σ_x * z_⍺/2, μ + σ_x * z_⍺/2
Será considerada a aproximação em que as covariância entre diferentes atributos é zero. Ou seja, os valores não-nulos serão somente os da diagonal, e assumindo um mesmo valor para todos os atributos.
classes, classes_num = np.unique(np.sort(dataset.index), return_counts=True)
k = len(classes)
varShape = dataShape.groupby(dataShape.index).var().var(axis=1)
varRGB = dataRGB.groupby(dataRGB.index).var().var(axis=1)
covShape = [ np.eye(np.size(dataShape, 1)) * varShape[i] for i in range(k) ]
covRGB = [ np.eye(np.size(dataRGB, 1)) * varRGB[i] for i in range(k) ]
In the main.py, would be a good choice run the kNN for different values of n_neighbors, and select the best choice.
In the main file, the info function in class FuzzyClustering isn't working
Para o classificador:
Transform labels (forward and backward) between numerical and categorical data
A partir das métricas obtidas na validação cruzada estratificada, "30 times 10-fold", aplicar o teste de Wilcoxon. Usar a tabela do teste para comparar o valor obtido no teste com um nível de significância (alpha).
Modularizar o código, "empacotando" a parte de treinamento e previsão do classificador para posterior utilização.
Até agora estava implementando o classificador diretamente. Resta então criar uma classe usando cada parte do que já foi desenvolvido, e colocando métodos (train, predict).
Tentei plotar o gráfico da densidade de probabilidade pra checar se estava razoavelmente fazendo sentido...
sigmaShape = (dataShape.groupby(dataShape.index).mean()).values
sigmaRGB = (dataRGB.groupby(dataRGB.index).mean()).values
varShape = dataShape.groupby(dataShape.index).var().var(axis=1)
varRGB = dataRGB.groupby(dataRGB.index).var().var(axis=1)
covShape = [ np.eye(np.size(dataShape, 1)) * varShape[i] for i in range(k) ]
covRGB = [ np.eye(np.size(dataRGB, 1)) * varRGB[i] for i in range(k) ]
densShape = [ multivariate_normal.pdf(dataShape.values, sigmaShape[i], covShape[i]) for i in range(k) ]
densRGB = [ multivariate_normal.pdf(dataRGB.values, sigmaRGB[i], covRGB[i]) for i in range(k) ]
# Plot da densidade de probabilidade (está muito estranha!!!)
#x_axis = range(210)
#plt.plot(dataShape.values, multivariate_normal.pdf(dataShape.values, sigmaShape[0], covShape[0]))
#plt.show()
Use the train data to fit the standard scaler, and transform the train and test data. Test the accuracy results for the bayesian gaussian classifier with/without the normalization.
Since the initial values for the membership degree is selected randomly, every time that you run the algorithm, you'll get a different solution (based on this randomness). So, two approaches can be followed:
Implementar uma função que retorne o valor do kernel gaussiano entre dois exemplos (dois pontos), para um dado atributo.
Além da função do kernel gaussiano em si, é importante fazer o cálculo do termo 2*sigma²
Como dito no artigo, o cálculo de 2*sigma² é feito para cada atributo como a média entre os quartis 0,1 e 0,9 de ||xij - xkj||² com i != j.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.