Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.20 KB | None | 0 0
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{algorithm}
  5. \usepackage{algorithmic}
  6. \usepackage{relsize}
  7.  
  8. \makeatletter
  9.  
  10. \def\textsubscript#1{\ensuremath{_{\mbox{\textscale{.6}{#1}}}}}
  11. \makeatother
  12.  
  13.  
  14.  
  15. \begin{document}
  16.  
  17. \begin{algorithm}[H]
  18.  
  19. \caption{OneR}\label{euclid}
  20.  
  21. \textbf{Input:} D = {x1, x2, ยท ยท ยท , xn} // Training data
  22.  
  23. \textbf{Output: }OneR Model
  24.  
  25. \textbf{Method:}
  26.  
  27.  
  28. \begin{algorithmic}[1]
  29.  
  30. \FOR {$ \textit{each attribute}, A\textsubscript{i}  \epsilon  D, $}
  31.  \FOR {$ \textit{each attribute value}, A\textsubscript{ij}  \epsilon    A\textsubscript{i},  $}
  32.  
  33.    \STATE $ \textbf{Make a classification rule:}$
  34.    
  35.    \STATE $ \textit{ count how often each class appears} $
  36.    
  37.    \STATE $ \textit{ find the most frequent class }$
  38.    
  39.    \STATE $ \textit{ make the rule assign that class to this  A\textsubscript{ij}} $
  40.    
  41. \ENDFOR
  42.  
  43.   \STATE $ \textit{ Calculate the error rate of this attributeโ€™s  A\textsubscript{ij} rule.} $
  44.  
  45. \ENDFOR
  46.  
  47.   \STATE $ \textit{ Choose the attribute  A\textsubscript{i}} \epsilon D \textit{with the smallest error rate.} $
  48.  
  49. \end{algorithmic}
  50. \end{algorithm}
  51. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement