The traditional definitive diagnosis of brain tumors is performed by needle biopsy under the guidance of imaging-based exams. This paradigm is based on the experience of radiogolists, and accuracy could be affected by uncertainty in imaging interpretation and needle placement. Raman spectroscopy has the potential to improve needle biopsy by providing fingerprints of different materials and performing in situ tissue identification. In this paper, we present the development of a supervised machine learning algorithm using random forest (RF) to distinguish the Raman spectrum of different types of tissue. An integral process from raw data collection and preprocessing to model training and evaluation is presented. To illustrate the feasibility of this approach, viable animal tissues were used, including ectocinerea (grey matter), alba (white matter) and blood vessels. Raman spectra were acquired using a custom-built Raman spectrometer. The hyperparameters of the RF model were determined by combining a cross-validation-based algorithm and manually adjusting. The experimental results show the ability of our approach to discriminate different types of tissues with high accuracy.