GithubHelp home page GithubHelp logo

karlvmsousa / in1102-machine-learning Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 183 KB

Disciplina IN1102 - 🤖 Aprendizadem de Máquina 🤖, da pós-graduação no CIn - UFPE.

Python 11.05% Common Lisp 88.95%
machine-learning pattern-recognition aprendizagem-de-maquina python pythonprojects cin-ufpe ufpe kaggle-competition kaggle

in1102-machine-learning's People

Contributors

karlvmsousa avatar marciojr avatar

Watchers

 avatar

in1102-machine-learning's Issues

Confidence interval for classifiers accuracy

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

Matriz de covariância

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) ]

Label encoding

Transform labels (forward and backward) between numerical and categorical data

Criar classe para os classificadores

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).

Plot densidade de probabilidade

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()

[Image Segmentation] Randomness in the fuzzy clustering algorithm

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:

  1. Use one specific seed (as a parameter for the predict function) to select a specific random state
  2. A more interesting approach, select multiple random states, and based on the initial cost, continue with the best seed (that returned the lowest cost).

Implementação do Kernel Gaussiano

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.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.