Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ewis:laboratoare:08 [2023/04/26 17:04]
alexandru.predescu [Machine Learning. Supervised Learning]
ewis:laboratoare:08 [2023/04/26 17:55] (current)
alexandru.predescu [Exercises]
Line 181: Line 181:
 Download the {{:​ewis:​laboratoare:​lab8:​lab8.zip|Project Archive}} and install the required packages via //​requirements.txt//​ Download the {{:​ewis:​laboratoare:​lab8:​lab8.zip|Project Archive}} and install the required packages via //​requirements.txt//​
  
-<note important>​**Get your unique code (//UCODE//) via moodle.** </​note>​ +=== Task 1 (1p) ===
- +
-=== Task 1 (2p) ===+
  
 Run //​task1.py//:​ Run //​task1.py//:​
Line 190: Line 188:
   * The predictions are evaluated to find out the accuracy of the model and the decision tree is then shown as (pseudo)code (if else statements) and graph representation as //​dtree1.png//​.   * The predictions are evaluated to find out the accuracy of the model and the decision tree is then shown as (pseudo)code (if else statements) and graph representation as //​dtree1.png//​.
  
-<note important>​Use //​n_train_percent//​ to change ​the amount of data used for training the model and evaluate ​the results. Set //​n_train_percent=UCODE//​ and report ​the results:  +Change ​the amount of data used for training the model and evaluate the results: 
-  * prediction accuracy and generated output ​//​dtree1.png//​+  * prediction accuracy and generated output
   * how large is the decision tree regarding the number of leaf nodes?   * how large is the decision tree regarding the number of leaf nodes?
-</​note>​ 
- 
  
 === Task 2 (2p) === === Task 2 (2p) ===
Line 204: Line 200:
   * The results are plotted on a chart, showing the effect of the amount (percent) of training data on the prediction accuracy   * The results are plotted on a chart, showing the effect of the amount (percent) of training data on the prediction accuracy
  
-<note important>​Write down your observations regarding ​the results: +Evaluate ​the results: 
-  * How much training data (percent) is required in this case to obtain most accurate predictions?​ +  * How much training data (percent) is required in this case to obtain ​the most accurate predictions?​
-</​note>​+
  
 === Task 3 (3p) === === Task 3 (3p) ===
  
-Run //task31.py//:+Run //task3.py//:
  
-  * //task31.py// is similar to //​task1.py//,​ using another dataset about wine quality: //winequality-white.csv//, //winequality-red.csv// to train a decision tree that should predict the quality of the wine based on measured properties.+  * //task3.py// is similar to //​task1.py//,​ using another dataset about wine quality: //winequality_white.csv//, //winequality_red.csv// to train a decision tree that should predict the quality of the wine based on measured properties.
   * A brief description of the dataset:   * A brief description of the dataset:
  
Line 233: Line 228:
 </​code>​ </​code>​
  
-<note important>​Use //​n_train_percent//​ to change the amount of data used for training the model and evaluate ​the results. Set //​n_train_percent=UCODE//​ and report ​the results:  +Use //​n_train_percent//​ to change the amount of data used for training the model and evaluate the results:  
-  * prediction accuracy and generated output ​//​dtree31.png//​+  * prediction accuracy and generated output
   * how large is the decision tree regarding the number of leaf nodes?   * how large is the decision tree regarding the number of leaf nodes?
-</​note>​ 
    
-=== Task 4 (3p + 2p bonus) ===+=== Task 4 (4p) ===
  
-Run //task31_sol.py//:+Create ​//task4.py//:
  
-  * //task31_sol.py// is similar to //task2.py// and evaluates ​the accuracy on the wine quality dataset using both decision trees and random forest models. The accuracy of the two models is compared on the plot for different amounts of training data, specified by //​n_train_percent//​. +  * //task4.py// is similar to //task4.py// and should evaluate ​the accuracy on the wine quality dataset using both decision trees and random forest models. The accuracy of the two models is compared on the plot for different amounts of training data, specified by //​n_train_percent//​. 
-  * Run //task31_sol.py// for both red (//winequality-red.csv//) and white (//winequality-white.csv//) wine datasets+  * Run //task4.py// for both red (//winequality_red.csv//) and white (//winequality_white.csv//) wine datasets
  
-<note important>​Write down your observations regarding ​the results: +Evaluate ​the results: 
-  * How much training data (percent) is required in this case to obtain most accurate predictions?​ +  * How much training data (percent) is required in this case to obtain ​the most accurate predictions?​ 
-  * What is the average accuracy for each model (decision tree, random forest) ​**(+1p)** +  * What is the average accuracy for each model (decision tree, random forest)
-  * Which type of wine (red/white) is easier to predict (more accurate) based on the results **(+1p)** +
-</​note>​+
  
 /* /*
ewis/laboratoare/08.1682517852.txt.gz · Last modified: 2023/04/26 17:04 by alexandru.predescu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0